[core] check that indirect buffers have not been destroyed (#7534)

This commit is contained in:
Teodor Tanasoaia 2025-04-14 17:06:32 +02:00 committed by GitHub
parent 8a27fabc78
commit 78d05f5f71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -865,6 +865,7 @@ fn dispatch_indirect(
.require_downlevel_flags(wgt::DownlevelFlags::INDIRECT_EXECUTION)?;
buffer.check_usage(wgt::BufferUsages::INDIRECT)?;
buffer.check_destroyed(&state.snatch_guard)?;
if offset % 4 != 0 {
return Err(ComputePassErrorInner::UnalignedIndirectBufferOffset(offset));

View File

@ -2523,6 +2523,7 @@ fn multi_draw_indirect(
indirect_buffer.same_device_as(cmd_buf.as_ref())?;
indirect_buffer.check_usage(BufferUsages::INDIRECT)?;
indirect_buffer.check_destroyed(state.snatch_guard)?;
if offset % 4 != 0 {
return Err(RenderPassErrorInner::UnalignedIndirectBufferOffset(offset));