RDNA2 (RX 6800): RGP capture of a prison frame, hardware BVH node test timing, and negative results #35
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/vktory6--VKtory#35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@just-another-dude84 on GitHub · 2026-12-01 01:04 UTC · original
Seen on:
3a0b738plus the 4 commits of just-another-dude84:rdna2-fixes, PR #22 (LDS stack pops), and local experimentpatches that are not proposed (translator switch for the hardware node test, a small Mesa 26.3.1 patch and a dxil-spirv
patch for it, an ACO occupancy switch). RX 6800, RADV/ACO from Mesa 26.3.1, prison cell scene, 2560x1440.
This issue reports findings for two items in
docs/TASKS.md: "GPU time: ray tracing and GI compute" (the RGP captureit lists as missing) and "Hardware BVH node test" (step 1, timed on the card).
1. RGP works on RDNA2 with a single Vulkan device
The capture ran on Mesa 26.3.1 without the #9 patch. The only Mesa change was the node-test patch, which does not touch
tracing. Settings:
MESA_VK_TRACE=rgpMESA_VK_TRACE_TRIGGER=<file>: the present path checks for the file and deletes it, so each touch captures one frameRADV_THREAD_TRACE_INSTRUCTION_TIMING=truefor per-instruction timingTouch the trigger at least 150 s after reaching the world; a run that ends before the trigger writes nothing. RADV
writes the
.rgpto/tmp(0.5-0.9 GB per frame). Code objects can be cut out of the.rgpat their ELF magic andread with
llvm-readelf --notes(VGPRs, SGPRs, LDS) andllvm-objdump -d --mcpu=gfx1030.2. Hardware BVH node test (TASKS step 1)
image_bvh64_intersect_rayemitted through a private SPIR-V op, mapped invtn_amd.conto RADV's existing intrinsic.Execute #13 (the execute holding the RT walkers,
frames.py --exec 13, world 90-190 s, run medians):That is -1.65 ms (-11 % of #13, about 4-5 % of the ~35 ms GPU frame). The arms ran one after the other, not
interleaved, and there were no GPU faults in any of the 6 runs. On its own, PR #22 moved emulated #13 from 15.03-15.08
to 14.80 ms. Whether that win counts as "large" for step 2 is your call; we stop at step 1 until you decide.
3. What the walker spends its time on (hardware node test on)
Shader f22a76fc (hash prefix; it is the top dispatch of the frame) has this profile under thread trace:
Lower::memory's per-lane view loop (readfirstlane, then s_load_dwordx4, then buffer_load).4. Negative results (to save others the time)
buffer device addresses instead of the view loop. Over 3 interleaved pairs #13 moved -0.07 ms, with VGPRs unchanged.
The cost is the dependent load after the node test, not the descriptor loop. This bears on the planned direct
translator: BDA is right for other reasons, but expect no GPU time from it alone here.
game run, with the same signature: one UTCL2 read fault at an address past the title window, then a gfx ring timeout
and reset. The two changes:
liveness validators were clean. Fault at
0x0000e04494b83000, 17 s into the world.ACO_DEBUG=nosched-ilpfor every shader. Fault at0x0000e03f9384e000, 62 s into the world.Without either switch, 19 hardware node-test runs and 6 emulated runs the same day had no faults. My reading is that some translated program reads a
value that is undefined on the console path, so its result depends on register allocation and scheduling; I have not
located it. This was seen on the hardware node-test build only. It may belong under "DPP and swizzles reading inactive
lanes" or "Loop limits".
requires subgroup size 32.
Run data, scripts and the timing exports are on our side; I can attach any of them (no game images).
@vktory6 on GitHub · 2026-12-01 07:34 UTC · original
Thank you, this is very useful. I added it to the tasks in
github.com/vktory6/VKtory@5169307:docs/learnings/gpu-time.mdhas your settings.