Per-call card time on an RTX 5070 Ti (Proton): two compute passes take ~18 ms a frame, inline clamps most of the rest #1186

Open
opened 2026-11-26 03:59:07 +00:00 by github-bot · 2 comments
Owner

@⁠Marukooh on GitHub · 2026-11-25 23:11 UTC · original

Where the card's time goes, per call: RTX 5070 Ti, Proton, prologue

I timed one in 64 title draws, dispatches, mesh draws and indirect executions, plus one in 64 copies, clears, barriers and resolves. Each sampled call gets two timestamps around it in the card meter's ring, and the samples are grouped by pipeline (shader hashes). Timestamps around one call overlap with its neighbours, so the table below is a ranking, not a sum. Base 0b0074e plus local work, argument clamps inline.

RTX 5070 Ti 16 GB, driver 620.73, CachyOS, Proton Experimental, vkd3d-proton, 3840x2160 swap chain. Prologue, 2,500-6,000 draws a frame, pipelines ready; 17 tables of 10 s each.

pipeline per call per frame (estimate)
indirect compute 982f3cccd5c04294 (8x8 groups, writes an image2D, 83 texture reads) 12.2-12.8 ms ~8-13 ms
compute 5cf00dc39042edaf (4x8 groups, 315 texture accesses, 54 shuffles, shadow sampler) ~6-7 ms ~5-11 ms
compute cb6adcc6da2613ff 1.6-2.3 ms ~2 ms
compute 14264103296aa43a ~1 ms ~1.2 ms
indirect mesh 910b4be059bfb28f / bff8660bf8e29c26 22.7-24.2 us ~3.5-6 ms
indirect mesh 321d411b20a35ef9 / 4e1ca5001eccbd27 ~17-19 us ~1.3-2 ms
indirect mesh 7972997d15fd9e69 / 9f14b72117e2abec ~7.3 us ~1.2-2 ms
  • The title's copies, clears and resolves together came to well under 1 ms a frame, and barrier groups to about 1 ms (1.4 us each).
  • The title's lists took 125-160 ms of card time against about 75-86 ms in sampled calls. Most of the gap was the inline argument clamps: 4,200-5,350 a frame at 7.7-10.1 us a sample, barriers included. Hoisting them (see the PR) moved title lists to about 90 ms.
  • The two compute passes at the top cost about 18 ms between them. That is far more than this card should need for passes like these, and the next thing to look at with a shader profiler.

5cf00dc39042edaf also appears in #10 on a 4060 Ti.

The hoisted clamps: #1184.

**@⁠Marukooh** on GitHub · 2026-11-25 23:11 UTC · [original](https://github.com/fxceless/victory-fork/issues/1186) ## Where the card's time goes, per call: RTX 5070 Ti, Proton, prologue I timed one in 64 title draws, dispatches, mesh draws and indirect executions, plus one in 64 copies, clears, barriers and resolves. Each sampled call gets two timestamps around it in the card meter's ring, and the samples are grouped by pipeline (shader hashes). Timestamps around one call overlap with its neighbours, so the table below is a ranking, not a sum. Base `0b0074e` plus local work, argument clamps inline. RTX 5070 Ti 16 GB, driver 620.73, CachyOS, Proton Experimental, vkd3d-proton, 3840x2160 swap chain. Prologue, 2,500-6,000 draws a frame, pipelines ready; 17 tables of 10 s each. | pipeline | per call | per frame (estimate) | |---|---:|---:| | indirect compute `982f3cccd5c04294` (8x8 groups, writes an image2D, 83 texture reads) | **12.2-12.8 ms** | ~8-13 ms | | compute `5cf00dc39042edaf` (4x8 groups, 315 texture accesses, 54 shuffles, shadow sampler) | **~6-7 ms** | ~5-11 ms | | compute `cb6adcc6da2613ff` | 1.6-2.3 ms | ~2 ms | | compute `14264103296aa43a` | ~1 ms | ~1.2 ms | | indirect mesh `910b4be059bfb28f` / `bff8660bf8e29c26` | 22.7-24.2 us | ~3.5-6 ms | | indirect mesh `321d411b20a35ef9` / `4e1ca5001eccbd27` | ~17-19 us | ~1.3-2 ms | | indirect mesh `7972997d15fd9e69` / `9f14b72117e2abec` | ~7.3 us | ~1.2-2 ms | - The title's copies, clears and resolves together came to well under 1 ms a frame, and barrier groups to about 1 ms (1.4 us each). - The title's lists took 125-160 ms of card time against about 75-86 ms in sampled calls. Most of the gap was the inline argument clamps: 4,200-5,350 a frame at 7.7-10.1 us a sample, barriers included. Hoisting them (see the PR) moved title lists to about 90 ms. - The two compute passes at the top cost about 18 ms between them. That is far more than this card should need for passes like these, and the next thing to look at with a shader profiler. `5cf00dc39042edaf` also appears in #10 on a 4060 Ti. The hoisted clamps: #1184.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:59:07 +00:00
Author
Owner

@⁠HLVM04 on GitHub · 2026-11-25 23:26 UTC · original

A data point from native Windows D3D12 on the same card (RTX 5070 Ti, driver 616.64, Windows 11 build 26200): fork at 9376fd6, Series X profile, one timing run with VICTORY_GPU_TIMING=1 VICTORY_D3D12_DRED=1.

pipeline this issue (Proton, per call) ours (Windows, heaviest single dispatch)
compute 5cf00dc39042edaf ~6-7 ms 7.2 ms
compute 14264103296aa43a ~1 ms 5.7 ms
compute cb6adcc6da2613ff 1.6-2.3 ms 2.4 ms

So 5cf00dc39042edaf costs about the same on native D3D12, which points at the pass itself rather than vkd3d-proton. 14264103296aa43a was much heavier for us, but that is an older tree and one run, and scenes differ. In the same run the frame line read 185.8 ms on the GPU against 119.7 ms summed over the title's commands (indirect 72.4 ms over 5,165 commands, dispatch 39.0 ms over 3,853): a gap of about 66 ms a frame of the same shape as yours, though we did not break it down further.

**@⁠HLVM04** on GitHub · 2026-11-25 23:26 UTC · [original](https://github.com/fxceless/victory-fork/issues/1186#issuecomment-7177565174) A data point from native Windows D3D12 on the same card (RTX 5070 Ti, driver 616.64, Windows 11 build 26200): fork at `9376fd6`, Series X profile, one timing run with `VICTORY_GPU_TIMING=1 VICTORY_D3D12_DRED=1`. | pipeline | this issue (Proton, per call) | ours (Windows, heaviest single dispatch) | |---|---:|---:| | compute `5cf00dc39042edaf` | ~6-7 ms | 7.2 ms | | compute `14264103296aa43a` | ~1 ms | 5.7 ms | | compute `cb6adcc6da2613ff` | 1.6-2.3 ms | 2.4 ms | So `5cf00dc39042edaf` costs about the same on native D3D12, which points at the pass itself rather than vkd3d-proton. `14264103296aa43a` was much heavier for us, but that is an older tree and one run, and scenes differ. In the same run the frame line read 185.8 ms on the GPU against 119.7 ms summed over the title's commands (indirect 72.4 ms over 5,165 commands, dispatch 39.0 ms over 3,853): a gap of about 66 ms a frame of the same shape as yours, though we did not break it down further.
Author
Owner

@⁠Marukooh on GitHub · 2026-11-26 01:29 UTC · original

Follow-up from further RTX 5070 Ti (Blackwell, Wave32 native) measurements on guard-light (VICTORY_HOIST_CLAMPS=1, VICTORY_VIDEO_BUDGET_MB=10500):

Now that VRAM spilling is fixed and inline clamps are hoisted, 982f3cccd5c04294 (~11–12.5 ms) and 5cf00dc39042edaf (~5–7 ms, 315 texture accesses + 54 shuffles) account for ~18 ms out of ~41–46 ms total GPU time (~40%).

Next concrete diagnostic & optimization ideas specifically for these two compute hotspots:

  1. Targeted Nsight Graphics capture (--limit-to-submits) on 982f and 5cf00 only: full-frame Nsight traces on Proton overflowed event/timestamp buffers (nan counters), so isolating just the submits containing 982f and 5cf00 is needed to see whether the bottleneck is VGPR register spilling to local memory, Wave64→32+32 emulation overhead (doubling VGPRs + intra-wave shuffles on Blackwell), or L1/texture cache thrashing (especially on 5cf00's 315 texture loads).
  2. Register-pressure reduction / native Wave32 fast-path: if 5cf00 or 982f spill VGPRs due to split-wave64 lowering or SSA temporaries, allowing native Wave32 execution (where lanes 32–63 do not cross-communicate) or tightening register pressure could yield a major speedup on NVIDIA Wave32 GPUs.
**@⁠Marukooh** on GitHub · 2026-11-26 01:29 UTC · [original](https://github.com/fxceless/victory-fork/issues/1186#issuecomment-7179817997) Follow-up from further RTX 5070 Ti (Blackwell, Wave32 native) measurements on `guard-light` (`VICTORY_HOIST_CLAMPS=1`, `VICTORY_VIDEO_BUDGET_MB=10500`): Now that VRAM spilling is fixed and inline clamps are hoisted, `982f3cccd5c04294` (~11–12.5 ms) and `5cf00dc39042edaf` (~5–7 ms, 315 texture accesses + 54 shuffles) account for **~18 ms out of ~41–46 ms total GPU time (~40%)**. Next concrete diagnostic & optimization ideas specifically for these two compute hotspots: 1. **Targeted Nsight Graphics capture (`--limit-to-submits`) on `982f` and `5cf00` only:** full-frame Nsight traces on Proton overflowed event/timestamp buffers (`nan` counters), so isolating just the submits containing `982f` and `5cf00` is needed to see whether the bottleneck is **VGPR register spilling to local memory**, **Wave64→32+32 emulation overhead** (doubling VGPRs + intra-wave shuffles on Blackwell), or **L1/texture cache thrashing** (especially on `5cf00`'s 315 texture loads). 2. **Register-pressure reduction / native Wave32 fast-path:** if `5cf00` or `982f` spill VGPRs due to split-wave64 lowering or SSA temporaries, allowing native Wave32 execution (where lanes 32–63 do not cross-communicate) or tightening register pressure could yield a major speedup on NVIDIA Wave32 GPUs.
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/fxceless--victory-fork#1186
No description provided.