perf(gpu): eliminate CPU->GPU shadow copies, guards lock contention, and submission lock waits #234

Closed
opened 2026-11-30 10:17:17 +00:00 by Androtim · 1 comment
Androtim commented 2026-11-30 10:17:17 +00:00 (Migrated from github.com)
Contributor

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-30T10:17:17Z.


Measured on RTX 4060 Ti 8 GB (Series X 1440p -PlayParity, warm shader cache, <playtest-log>):

  • Frame preparing: 59.7–65.3 ms/frame (including 23.9–28.1 ms copying 49.9–51.7 MB/frame in host shadows and 25.5–27.3 ms in guards).
  • Submitting thread 29148 (20.2–20.5 submissions/frame): 59.0–59.2 ms user + 18.4–20.7 ms kernel time in submissions, with 28.4–32.1 ms/frame waiting on the submission lock.
  • victory_gpu::copystat write-tracker lock waits (all threads): 149–165 guards waits/frame = 74.17–78.53 ms/frame, plus 346–359 write faults/frame (6.22–8.01 ms).

Proposed Direction

  • Eliminate CPU->GPU shadow copy overhead using ReBAR / D3D12_HEAP_TYPE_GPU_UPLOAD heaps where supported.
  • Shard or make watch guard metadata lock-free to eliminate 74–78.5 ms/frame of cross-thread guard lock contention.
  • Coalesce submissions / pipeline preparation off the submission lock.

Related to #170.

<!-- greyfinch-sync:Androtim/MiniVI:issue:6693953259 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/issues/234). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-30T10:17:17Z. --- Measured on RTX 4060 Ti 8 GB (Series X 1440p `-PlayParity`, warm shader cache, `<playtest-log>`): - Frame preparing: `59.7–65.3 ms/frame` (including `23.9–28.1 ms` copying `49.9–51.7 MB/frame` in host shadows and `25.5–27.3 ms` in guards). - Submitting thread `29148` (`20.2–20.5` submissions/frame): `59.0–59.2 ms` user + `18.4–20.7 ms` kernel time in submissions, with `28.4–32.1 ms/frame` waiting on the submission lock. - `victory_gpu::copystat` write-tracker lock waits (all threads): `149–165` `guards` waits/frame = `74.17–78.53 ms/frame`, plus `346–359` write faults/frame (`6.22–8.01 ms`). ### Proposed Direction - Eliminate CPU->GPU shadow copy overhead using ReBAR / `D3D12_HEAP_TYPE_GPU_UPLOAD` heaps where supported. - Shard or make `watch` guard metadata lock-free to eliminate `74–78.5 ms/frame` of cross-thread guard lock contention. - Coalesce submissions / pipeline preparation off the submission lock. Related to #170.
Androtim commented 2026-12-02 14:18:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-02T14:18:04Z.


Closing as superseded by #276 and merged staging/write-watch/remap improvements (#322, #324, #328).

<!-- greyfinch-sync:Androtim/MiniVI:comment:7348315968 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/issues/234#issuecomment-7348315968). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-02T14:18:04Z. --- Closing as superseded by #276 and merged staging/write-watch/remap improvements (#322, #324, #328).
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Androtim/MiniVI#234
No description provided.