File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -638,10 +638,8 @@ impl WebGpuError for QueueSubmitError {
638638/// [`submit`]: `PendingSubmission::submit`
639639pub ( crate ) struct PendingSubmission < ' a > {
640640 queue : & ' a Queue ,
641- // Declared before `snatch_guard` so that it is dropped first. `snatch_guard`
642- // is acquired by the caller and `command_index_guard` in
643- // `Queue::allocate_submission`, so releasing in field order would release the
644- // older guard first — which `--cfg wgpu_validate_locks` rejects.
641+ // NOTE: Guards must be declared in reverse of acquisition order, so `wgpu_validate_locks`
642+ // succeeds.
645643 command_index_guard : RwLockWriteGuard < ' a , CommandIndices > ,
646644 snatch_guard : SnatchGuard < ' a > ,
647645 // Command buffers to be executed, along with trackers for the resources they use.
You can’t perform that action at this time.
0 commit comments