fix(core): validate dst_buffer isn't destroyed when resolving query sets

This commit is contained in:
Erich Gubler 2024-11-21 16:03:35 -05:00
parent f1ec934dbc
commit 6365e2dd75
2 changed files with 4 additions and 2 deletions

View File

@ -135,6 +135,7 @@ By @ErichDonGubler in [#6456](https://github.com/gfx-rs/wgpu/pull/6456), [#6148]
- Check the status of the `TIMESTAMP_QUERY` feature before other validation.
- Check that indices are in-bounds for the query set.
- Check that begin and end indices are not equal.
- Reject destroyed buffers in query set resolution. By @ErichDonGubler in [#6579](https://github.com/gfx-rs/wgpu/pull/6579).
#### Naga

View File

@ -387,13 +387,14 @@ impl Global {
dst_buffer.same_device_as(cmd_buf.as_ref())?;
let snatch_guard = dst_buffer.device.snatchable_lock.read();
dst_buffer.check_destroyed(&snatch_guard)?;
let dst_pending = cmd_buf_data
.trackers
.buffers
.set_single(&dst_buffer, hal::BufferUses::COPY_DST);
let snatch_guard = dst_buffer.device.snatchable_lock.read();
let dst_barrier = dst_pending.map(|pending| pending.into_hal(&dst_buffer, &snatch_guard));
dst_buffer