You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's been a bit of discussion in the community about the difficulties in the current BufferSlice api. As such, we have been thinking about removing it entirely. However there was some discussion about potential use cases of it in #6309, so we figured we should make an issue to discuss what the api of BufferSlice should be, if it is to exist at all.
I’ll try to have some thoughts about what would be an “actually actively-good version of BufferSlice”, but I don't have them right now. Some comments:
It is a deviation from the spec.
Note that it's easier in JavaScript to create an ad-hoc object, copy or inherit properties, etc., so it may be easier to deal with not having useful predefined struct types there.
Users try to keep the BufferSlice around, but because of the strict lifetime, you can't keep it for more than a short period.
This could be fixed by making BufferSlice generic or Cow-ish to allow owning the buffer, now that wgpu objects are all Clone-with-refcounting.
There's been a bit of discussion in the community about the difficulties in the current
BufferSlice
api. As such, we have been thinking about removing it entirely. However there was some discussion about potential use cases of it in #6309, so we figured we should make an issue to discuss what the api ofBufferSlice
should be, if it is to exist at all.cc @kpreid
Some Arguments Against the Current Api:
BufferSlice
implies that you can access the data inside the buffer.BufferSlice
around, but because of the strict lifetime, you can't keep it for more than a short period.The text was updated successfully, but these errors were encountered: