mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
1dc5347b14
* Better handle destroying textures and buffers Before this commit, explicitly destroying a texture or a buffer (without dropping it) schedules the asynchronous destruction of its raw resources but does not actually mark it as destroyed. This can cause some incorrect behavior, for example mapping a buffer after destroying it does not cause a validation error (and later panics due to the map callback being dropped without being called). This Commit adds `Storage::take_and_mark_destroyed` for use in `destroy` methods. Since it puts the resource in the error state, other methods properly catch that the resource is no longer usable when attempting to access it and raise validation errors. There are other resource types that require similar treatment and will be addressed in followup work. * Add a changelog entry |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE.APACHE | ||
LICENSE.MIT |