WIP: docs(tested): capture and GPU-sync diagnostics in Hyrule Field on an RX 9070 XT (RADV) #1749
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1749
Loading…
Reference in a new issue
No description provided.
Delete branch "GrimVisage/Longshot:docs/tested-capture-diagnostics-rdna4"
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?
Type: docs · Risk: low · Tested on: Linux (Fedora 45), Ryzen 5 5600X, RX 9070 XT (RADV 26.2.7) · Needs: none
TL;DR
Walking into Hyrule Field and turning the camera, the game drops to a few fps for up to a second (#1720). Runs with the probes from #1667 and #1666 point to two causes on an RX 9070 XT. Out in the field, the renderer's copy of freshly loaded memory is page-fault bound, and non-temporal copies (
RX_VK_CAPTURE_NT=1) cut its long frames on every run, on main after #1121 too. At the field entry, the longest waits look like the GPU's ASTC work: ~450 ms at 100% GPU that the log's GPU time doesn't show, a third of it the BC3 re-encode; a few others are slow captures. This PR records the thirty-nine runs indocs/tested/; it changes no game code.Breakdown
docs/tested/, one per run.tests/test_tested_configurations.pypasses; the full suite's results are under Testing.RX_VK_CAPTURE_NT=1helps beyond AMD on Linux (it is opt-in for an RTX desktop's results); the capture buffers made on the capturing thread, which are most of what is left with it on; how to spread the ASTC decode and BC3 re-encode's GPU time at an area's entry (the upload budget bounds only the CPU's); a few long waits with the GPU idle, not looked into.Why
Since the 3.0 release candidates, players see the frame rate collapse for a moment in Hyrule Field, worst when the field streams in or the camera turns (#1720 on Windows with an RTX 4070 Ti; the same here on Linux with an RX 9070 XT). Similar drops when circling or attacking are in #1696 and #1735; one player in #1735 dates them to rc.8, so the release that brought them is not settled. The probes in #1667 (
RX_VK_CAPTURE_SLOW_MS) and #1666 (HOS_AWAY_LOG_MS) showed the main thread's two kinds of long waits on this route: the capture at a submit, and waiting on a GPU sync (results: #1667 (comment) and #1666 (comment)). Five runs here follow each one up with a switch, six more are an interleaved A/B of the one that looked best, eight more repeat it on main after #1121, twenty more follow the field entry's GPU-sync waits, anddocs/tested/is where a measured run goes (CONTRIBUTING.md, "Measurements").What changed
Thirty-nine run files, following docs/tested/README.md, one a run:
docs/tested/2026-11-19-capture-diagnostics-field-grimvisage-run01.md:RX_VK_CAPTURE_THREADS=0.docs/tested/2026-11-19-capture-diagnostics-field-grimvisage-run02.md:RX_VK_CAPTURE_NT=1.docs/tested/2026-11-19-capture-diagnostics-field-grimvisage-run03.md:RX_VK_CAP_BLOCKS=1.docs/tested/2026-11-19-capture-diagnostics-field-grimvisage-run04.md:HOS_NVN_SYNC_LOG=1.docs/tested/2026-11-19-capture-diagnostics-field-grimvisage-run05.md:HOS_NVN_SYNC_LOG=2440.docs/tested/2026-11-19-capture-diagnostics-field-grimvisage-run06.mdtorun11.md: the A/B,RX_VK_CAPTURE_NT=0and=1in the order off, on, on, off, off, on.docs/tested/2026-11-19-capture-diagnostics-field-grimvisage-run12.mdtorun19.md: on main819a5967with the two probes, a 2x2 ofRX_VK_FRAME_GATEandRX_VK_CAPTURE_NT, 2 runs a cell.run20.mdtorun39.md: the field entry's GPU-sync waits on the same build, withRX_VK_CAPTURE_NT=1andHOS_NVN_SYNC_LOG=1: two plain runs (run20-21);RX_VK_MIRROR_SPARSEon and off (run22-25);RX_VK_BATCH=0andRX_VK_RECORDER=off(run26-29); then on a build with one more local probe line at a capture's timed-out write-back wait, not in any PR: two runs (run30-31), two with the GPU's busy percent sampled (run32-33), andRX_VK_ASTC_CPU=1andRX_VK_ASTC_RGBA8=1against the default (run34-39).Measurements
Verdict: nothing to measure in the game for this PR: docs only. The files pass their format check, and the game-free suite gives the same result as on main (CONTRIBUTING.md, "Measurements":
docs).868f6be83aa8225btests/test_tested_configurations.py5da79b44on main0de25c3ewith all thirty-ninemise run test(tests/run_all.py --strict)Baseline: these are diagnostics, one run a switch, on one build (
longshot abc-probes (source 166c4da4): main2f1c0c9cwith #1667a871f3ffand #16664ec23e96), not a main-against-PR comparison; the two probe runs on #1667 are the same build with no switch.Hardware: Fedora 45 (kernel 7.3.4), KDE Plasma 6.8.3 (Wayland), RX 9070 XT 16 GB, Mesa RADV 26.2.7, Ryzen 5 5600X (12 logical processors), 32 GB
Scene: Hyrule Field (child) at 12:00, out of the Castle Town gate; 2560x1440 fullscreen, HDR10, AMD FSR 4 (1920x1080 to 2560x1440), frame generation off, no frame cap
Method: a scripted route through the control bridge from the repository save
kokiri-start: the teleport to the Market, the clock at 12:00, out of the gate, then 120 s of laps between 20 m and 320 m with a 180° camera turn every 10 s (the trigger in #1720); frames fromHOS_PROFILE=1's presents trace, the captures fromRX_VK_CAPTURE_SLOW_MS=50, the waits fromHOS_AWAY_LOG_MS=50, each thread's user and kernel CPU time and minor faults from/procevery 200 msHow to reproduce: the same switches on any build carrying #1667 and #1666
What the runs show
RX_VK_CAPTURE_THREADS=0(run01)RX_VK_CAPTURE_NT=1(run02)RX_VK_CAP_BLOCKS=1(run03)create_buffer_cached) and the game's memory is imported in place as dma-bufs, so neither end is slow memory on paper.RX_VK_CAPTURE_NTis opt-in because four field runs on an RTX desktop showed no gain and more stutters with it (the comment atcapture_nt()ingpu/vk/vk_memory.cpp): the A/B below repeats it.present(): where the work is held is still open. #1121 (merged after these runs) turns that whole-frame gate off by default (RX_VK_FRAME_GATE=1brings it back), so these waits were run on main again: they stay (below).The A/B of
RX_VK_CAPTURE_NTSix runs on the same build, after a warm-up run that isn't counted, in the order off, on, on, off, off, on (run06 to run11); each figure is a run's, in that order within a side.
RX_VK_CAPTURE_NT=0, the default (run06, run09, run10)RX_VK_CAPTURE_NT=1(run07, run08, run11)On main after #1121:
RX_VK_FRAME_GATExRX_VK_CAPTURE_NTA second test build, main
819a5967(after #1121) with the same two probes (longshot abc-probes-main (source 80057f9b)); a warm-up run, then 2 runs a cell in the order A B C D D C B A (run12 to run19).The field entry's longest stalls: likely the GPU's ASTC work
Twenty runs on main
819a5967with the two probes,RX_VK_CAPTURE_NT=1(the capture copy out of the way) andHOS_NVN_SYNC_LOG=1(run20 to run39).RX_VK_MIRROR_SPARSE=0,RX_VK_BATCH=0andRX_VK_RECORDER=off(1 run: the second was ended by the kernel's OOM killer, a memory jump not looked into) changed nothing.gpu_busy_percentevery 50 ms), against a median of 34-42% through play; the log's GPU time line (longest submission about 20 ms) doesn't show it.RX_VK_ASTC_RGBA8=1: no BC3 re-encode (run36, run37)RX_VK_ASTC_CPU=1(run35, run38)upload_deferon main, not tested): it bounds the CPU time inupload(), 12 ms a frame, not the decode and encode's GPU time, and never defers terrain textures (layer arrays, or over 1024x1024).RX_VK_CAPTURE_NT=1), or on the Presentation Thread's. With 21-102 minor faults and half or more of the time off the CPU, they aren't the fault cost NT removes; pages read back in from swap (major faults) is a guess, not yet measured.Flags and settings
None
Testing
Tested: the thirty-nine runs on this PC (above). On main
868f6be8(the base then):python -I -B tests/test_tested_configurations.py: OK;mise run ci:smoke: OK (6 tests);mise run test(tests/run_all.py --strict): 695 passed, 139 failed, 17 skipped on this branch and on main868f6be8, the same 139 checks on both. Rebased onto main8b0ea786(08756302):tests/test_tested_configurations.pyandmise run ci:smokeOK again; the five newer commits on main touch nodocs/tested/file. Rebased onto main819a5967with the A/B's six files (d3ab4f66):tests/test_tested_configurations.pyOK; onto mainad9fa48ewith the main runs' eight (3aa8225b):tests/test_tested_configurations.pyOK; onto main0de25c3ewith the twenty newer runs (5da79b44):tests/test_tested_configurations.pyOK. Most of them are tools this PC doesn't have, which--strictfails instead of skipping (the Vulkan headers, clang, the SPIR-V headers); none readsdocs/tested/excepttests/test_tested_configurations.py, which passes.Not tested: nothing in the game: the PR changes no game files.
Must be tested:
Risks
What could break: nothing in the game; the catalogue page gains thirty-nine rows.
Turning it off: revert the commit.
Compatibility: Nothing changes.
Issues
See #1720
See #1667
See #1666
See #1599
See #1696
See #1735
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.docs/tested/for each new measured run (format indocs/tested-configurations.md).🤖 Generated with Claude Code
08756302f0d3ab4f66a9d3ab4f66a93aa8225bb03aa8225bb05da79b4432Closing: #1802 removed the tested-configurations catalogue (docs/tested/), so these run files have nowhere to go. The runs stay on record in this PR's description and comments, and the files in its diff.
Pull request closed