@@ -3,10 +3,11 @@ use super::{
33 CreateIndirectValidationPipelineError ,
44} ;
55use crate :: {
6+ command:: RenderPassErrorInner ,
67 device:: { queue:: TempResource , Device , DeviceError } ,
78 lock:: { rank, Mutex } ,
89 pipeline:: { CreateComputePipelineError , CreateShaderModuleError } ,
9- resource:: { StagingBuffer , Trackable } ,
10+ resource:: { RawResourceAccess as _ , StagingBuffer , Trackable } ,
1011 snatch:: SnatchGuard ,
1112 track:: TrackerIndex ,
1213 FastHashMap ,
@@ -199,7 +200,7 @@ impl Draw {
199200 temp_resources : & mut Vec < TempResource > ,
200201 encoder : & mut dyn hal:: DynCommandEncoder ,
201202 batcher : DrawBatcher ,
202- ) -> Result < ( ) , DeviceError > {
203+ ) -> Result < ( ) , RenderPassErrorInner > {
203204 let mut batches = batcher. batches ;
204205
205206 if batches. is_empty ( ) {
@@ -378,6 +379,9 @@ impl Draw {
378379 encoder. set_bind_group ( pipeline_layout, 0 , Some ( metadata_bind_group) , & [ ] ) ;
379380 }
380381
382+ // Make sure the indirect buffer is still valid.
383+ batch. src_buffer . try_raw ( snatch_guard) ?;
384+
381385 let src_bind_group = batch
382386 . src_buffer
383387 . indirect_validation_bind_groups
0 commit comments