The RT/GI walkers' GPU time does not scale with resolution: a quarter of the pixels, the same time #43

Open
opened 2026-12-01 04:00:20 +00:00 by github-bot · 4 comments
Owner

@⁠Mhyster on GitHub · 2026-12-01 03:59 UTC · original

Measured with the title in Series S mode (--console series-s; tools/play.sh has no switch for it, I passed it through by hand) against the default Series X mode, same save, same spot, gpuprof (two profiled frames each, serialised ms per frame):

Series X Series S
main passes 2560x1440 1280x720
marked GPU time (two frames) 45.7 / 45.4 ms 39.1 / 40.7 ms
RT / GI compute class (frame 1) 11.95 ms 11.15 ms
fps (5 s lines before profiling, mean of 16) 20.9 22.7

Per family (dispatch time per frame, mean of the two frames):

family Series X Series S
CS_Primary_GatherVBuffer_WithFar (1 indirect dispatch) 1.84 1.73
CS_RaytraceVBuffer_RayBinning_..._WithFar (2 indirect dispatches) 1.10 1.71
CS_GatherAlphaVBuffer_WithFar (1) 0.96 1.52
CS_ScreenProbes_TraceRays_...BVH..._WithFar (1) 0.85 1.13
CS_RaytracingResolve (644 / 612 indirect dispatches) 1.71 1.67
most geometry and shadow families (MS_VS_*) 0.5-0.7x of Series X, as expected (one, MS_VS_TransformD|PS_DeferredTextured with ~3,800 draws, stays at 1.0x)

The indirect clamp is not the cost (its spans are ~0 us); the dispatches themselves are. A single dispatch that takes the same 1.7-1.8 ms with a quarter of the pixels reads as bound by the longest wave, not by the number of waves: per-wave latency (the by-address loads' directory lookups and waterfall loops, gpu-time.md "Title memory by address", and the 120-160 spilled registers of the large RT programs), with the card not full of waves either way. That matches xlcost.md's reading of the builder ("latency and dependency, not instruction count") and supports its row for the walkers: a direct address path instead of the per-lane directory lookup, so a lane's load needs no loop over its neighbours' pages. It also means lowering the title's resolution is no lever on this path: it saves part of the geometry passes only (~5 ms of 45).

Frame-level context from runs of the same build and save: the GPU is busy ~85 % of a 47 ms frame; ~1,050 global barriers a frame (2.68M over 58.4M ops, 70 % of them the title's); the unprofiled frame (~40 ms busy) is about as long as the serialised one (~45 ms marked), so little overlap happens today either way.

Seen on: 1da3463: 2dd59da with the open PRs #22 and #29 merged, just-another-dude84/VKtory@324542c cherry-picked, a local translator version bump, and #47 and #48. Not rechecked on 73ee0ab. RX 9070 XT 16 GB, Ryzen 5 9600X, Mesa 26.3.1, 2560x1440 monitor.

Corrected 2026-12-01: this line first said "local vkback changes only (residency and slot cache, no translator change)", which was wrong. Two of the changes above are translator changes: 324542c reads bvh_triangle's three vertices back to back (emit/intersect.rs, the triangle test; one waterfall loop instead of three; its own measurement on RDNA2: ~0.3 ms GPU a frame), and #22 changes how loops whose lanes run outside EXEC are translated. So the walker times on main will differ from the tables above.

🤖 Generated with Claude Code

**@⁠Mhyster** on GitHub · 2026-12-01 03:59 UTC · [original](https://github.com/vktory6/VKtory/issues/43) Measured with the title in Series S mode (`--console series-s`; `tools/play.sh` has no switch for it, I passed it through by hand) against the default Series X mode, same save, same spot, gpuprof (two profiled frames each, serialised ms per frame): | | Series X | Series S | |---|---|---| | main passes | 2560x1440 | 1280x720 | | marked GPU time (two frames) | 45.7 / 45.4 ms | 39.1 / 40.7 ms | | RT / GI compute class (frame 1) | 11.95 ms | 11.15 ms | | fps (5 s lines before profiling, mean of 16) | 20.9 | 22.7 | Per family (dispatch time per frame, mean of the two frames): | family | Series X | Series S | |---|---|---| | CS_Primary_GatherVBuffer_WithFar (1 indirect dispatch) | 1.84 | 1.73 | | CS_RaytraceVBuffer_RayBinning_..._WithFar (2 indirect dispatches) | 1.10 | 1.71 | | CS_GatherAlphaVBuffer_WithFar (1) | 0.96 | 1.52 | | CS_ScreenProbes_TraceRays_..._BVH_..._WithFar (1) | 0.85 | 1.13 | | CS_RaytracingResolve (644 / 612 indirect dispatches) | 1.71 | 1.67 | | most geometry and shadow families (MS_VS_*) | | 0.5-0.7x of Series X, as expected (one, MS_VS_TransformD\|PS_DeferredTextured with ~3,800 draws, stays at 1.0x) | The indirect clamp is not the cost (its spans are ~0 us); the dispatches themselves are. A single dispatch that takes the same 1.7-1.8 ms with a quarter of the pixels reads as bound by the longest wave, not by the number of waves: per-wave latency (the by-address loads' directory lookups and waterfall loops, gpu-time.md "Title memory by address", and the 120-160 spilled registers of the large RT programs), with the card not full of waves either way. That matches xlcost.md's reading of the builder ("latency and dependency, not instruction count") and supports its row for the walkers: a direct address path instead of the per-lane directory lookup, so a lane's load needs no loop over its neighbours' pages. It also means lowering the title's resolution is no lever on this path: it saves part of the geometry passes only (~5 ms of 45). Frame-level context from runs of the same build and save: the GPU is busy ~85 % of a 47 ms frame; ~1,050 global barriers a frame (2.68M over 58.4M ops, 70 % of them the title's); the unprofiled frame (~40 ms busy) is about as long as the serialised one (~45 ms marked), so little overlap happens today either way. Seen on: 1da3463: 2dd59da with the open PRs #22 and #29 merged, just-another-dude84/VKtory@324542c cherry-picked, a local translator version bump, and #47 and #48. Not rechecked on 73ee0ab. RX 9070 XT 16 GB, Ryzen 5 9600X, Mesa 26.3.1, 2560x1440 monitor. *Corrected 2026-12-01: this line first said "local vkback changes only (residency and slot cache, no translator change)", which was wrong. Two of the changes above are translator changes: 324542c reads `bvh_triangle`'s three vertices back to back (`emit/intersect.rs`, the triangle test; one waterfall loop instead of three; its own measurement on RDNA2: ~0.3 ms GPU a frame), and #22 changes how loops whose lanes run outside EXEC are translated. So the walker times on main will differ from the tables above.* 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 04:00:20 +00:00
Author
Owner

@⁠Mhyster on GitHub · 2026-12-01 04:39 UTC · original

Correction to the "Seen on" line above (now fixed in the text): the build behind these numbers, 1da3463, also had the open PRs #22 and #29, just-another-dude84/VKtory@324542c and a local translator version bump, not only vkback changes. 324542c changes bvh_triangle's loads (the triangle test the walkers use; its own measurement on RDNA2: ~0.3 ms GPU a frame), so walker times on main will differ from the tables.

🤖 Generated with Claude Code

**@⁠Mhyster** on GitHub · 2026-12-01 04:39 UTC · [original](https://github.com/vktory6/VKtory/issues/43#issuecomment-7300953629) Correction to the "Seen on" line above (now fixed in the text): the build behind these numbers, 1da3463, also had the open PRs #22 and #29, just-another-dude84/VKtory@324542c and a local translator version bump, not only vkback changes. 324542c changes `bvh_triangle`'s loads (the triangle test the walkers use; its own measurement on RDNA2: ~0.3 ms GPU a frame), so walker times on main will differ from the tables. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 07:34 UTC · original

Thanks, that's a useful measurement: the walkers being latency-bound rather than bound by pixel count changes what's worth trying there. I added it to "GPU time: ray tracing and GI compute" in github.com/vktory6/VKtory@5169307, together with the note that your build was not main.

**@⁠vktory6** on GitHub · 2026-12-01 07:34 UTC · [original](https://github.com/vktory6/VKtory/issues/43#issuecomment-7304233449) Thanks, that's a useful measurement: the walkers being latency-bound rather than bound by pixel count changes what's worth trying there. I added it to "GPU time: ray tracing and GI compute" in https://github.com/vktory6/VKtory/commit/5169307, together with the note that your build was not main.
Author
Owner

@⁠TheRifai on GitHub · 2026-12-01 15:13 UTC · original

House-scene gpuprof on RX 9070 XT / RADV GFX1201 (3 frames, GE-Proton11-16): dispatch dominates at 14-18 ms/frame, of which RT/GI compute is 6.9-7.4 ms (~27%). The individual walkers are still per-wave latency bound: CS_RaytraceVBuffer_RayBinning 0.77 ms in 7 dispatches (up to 353 us each), CS_Primary_GatherVBuffer 0.74 ms in 2 (742 us each), CS_ScreenProbes_TraceRays 0.59 ms in 2 (590 us each). CS_RaytracingResolve is 1.58 ms in 1606 ~1-us dispatches. This supports the finding that the walker time does not scale with resolution. Full numbers: /tmp/opencode/capture/GPU-PROFILE.md.

**@⁠TheRifai** on GitHub · 2026-12-01 15:13 UTC · [original](https://github.com/vktory6/VKtory/issues/43#issuecomment-7315556548) House-scene gpuprof on RX 9070 XT / RADV GFX1201 (3 frames, GE-Proton11-16): dispatch dominates at 14-18 ms/frame, of which RT/GI compute is 6.9-7.4 ms (~27%). The individual walkers are still per-wave latency bound: CS_RaytraceVBuffer_RayBinning 0.77 ms in 7 dispatches (up to 353 us each), CS_Primary_GatherVBuffer 0.74 ms in 2 (742 us each), CS_ScreenProbes_TraceRays 0.59 ms in 2 (590 us each). CS_RaytracingResolve is 1.58 ms in 1606 ~1-us dispatches. This supports the finding that the walker time does not scale with resolution. Full numbers: /tmp/opencode/capture/GPU-PROFILE.md.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 15:19 UTC · original

Thanks, that fits: the walkers show up as a few long single dispatches (350-740 us each) rather than as work that scales with pixels, which is the latency-bound pattern this issue is about. One note for comparisons: the house view switches on its own, so frame-to-frame numbers there drift; the per-dispatch durations you list are the robust part.

**@⁠vktory6** on GitHub · 2026-12-01 15:19 UTC · [original](https://github.com/vktory6/VKtory/issues/43#issuecomment-7315733382) Thanks, that fits: the walkers show up as a few long single dispatches (350-740 us each) rather than as work that scales with pixels, which is the latency-bound pattern this issue is about. One note for comparisons: the house view switches on its own, so frame-to-frame numbers there drift; the per-dispatch durations you list are the robust part.
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/vktory6--VKtory#43
No description provided.