mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
[core] check that indirect buffers have not been destroyed (#7534)
This commit is contained in:
parent
8a27fabc78
commit
78d05f5f71
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user