Commit 1717d91
committed
fix(core): drop
`PendingSubmission` holds a `SnatchGuard` acquired by its caller and a
`CommandIndices` write guard acquired later in `Queue::allocate_submission`,
but declares them in that same order. Struct fields drop in declaration
order, so the older guard was released first.
`--cfg wgpu_validate_locks` enforces stack-ordered release, so this trips
its assertion on the first submission that goes through this path — which
makes the validator unusable on the buffer-mapping path, since
`flush_writes_for_buffer` reaches it.
Swap the two declarations. No runtime behaviour changes without the cfg;
both guards are still released before the struct's other fields.PendingSubmission's guards in reverse acquisition order1 parent 22c5a70 commit 1717d91
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
641 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
642 | 645 | | |
| 646 | + | |
643 | 647 | | |
644 | 648 | | |
645 | 649 | | |
| |||
0 commit comments