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

Closed
opened 2026-12-01 20:21:00 +00:00 by github-bot · 1 comment
Owner

@⁠Androtim on GitHub · 2026-11-30 10:17 UTC · original

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** on GitHub · 2026-11-30 10:17 UTC · [original](https://github.com/Androtim/MiniVI/issues/234) 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:21:00 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-12-02 14:18 UTC · original

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

**@⁠Androtim** on GitHub · 2026-12-02 14:18 UTC · [original](https://github.com/Androtim/MiniVI/issues/234#issuecomment-7348315968) Closing as superseded by #276 and merged staging/write-watch/remap improvements (#322, #324, #328).
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI#234
No description provided.