Files
reims-vgpu/crates
Anees Iqbal 5852a1ba93 🐎 Hold a render pass descriptor behind one lock
A render pass descriptor held its runtime descriptor, rate map, sources and
raw values behind four Mutexes. Each attachment set took three of them, and
an encoder's creation took four, then copied the runtime descriptor and the
sources, an Arc clone and drop per texture. On RADV each locked instruction
between two recorded commands costs about 0.49 us, since the command buffers
are write-combined memory (metal2vulkan's measurement on an RX 7900 XTX),
and lane lockcount saw these sites among reims's largest on the draw
threads.

Now one Mutex holds the four. Each set takes it once. An encoder's creation
takes it once and reads the pass in place. It borrows the runtime descriptor
when the pass has no rate map and no resolve texture, since nothing is then
dropped from it, and copies it only otherwise.

The guest and the host see nothing new. The same values reach the runtime in
the same order, and a resolve is dropped, refused or kept by the same tests
as before. Only the locking inside the descriptor changed, which the contract
leaves free.
2026-11-18 13:34:37 -08:00
..