RX 9060 XT: where the card's 53 ms a frame go, per list (G-buffer is triangle-bound; frame generation costs 12-14 ms) #293
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/lobomfz--VIctory-xmem#293
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?
@Spetrius on GitHub · 2026-12-03 05:41 UTC · original
Measurements from one PC, posted in case they save someone the work. They are from an older base (
37bb30f, 212 commits behindmaintoday, plus local diagnostics), so treat the absolute numbers as dated; the proportions are what I would expect to carry over.Setup: RX 9060 XT 16 GB, RADV, Wine on CachyOS, title 1.0.2.1, output 2560x1440, render 1280x720 (
VICTORY_FFX_SCALE=0.5). All sessions driven by hand in town, so scenes differ between runs; comparisons are rough.How it was measured
A diagnostics addition to the timeline recorder (not upstream): a timestamp ahead of each submission and behind each of its lists, plus one pipeline-statistics query per list, written per list as card ms, ops by kind, the targets drawn to, and the counters (primitives into clipping, primitives drawn, pixel-shader and compute-shader runs). Lists were then summed by the targets they draw to. Recording frames are slow on the CPU side (every op is formatted), the card times per list hold.
Where the card's ~53 ms go (generation off, 18 frames, three scenes)
The "one 22–26 ms submission" the timeline shows is about 45 lists with one dominant list and a long tail.
The dominant G-buffer list is triangle-bound, not pixel-bound
One list (the first G-buffer list of the big submission: ~800 indirect mesh draws and ~185 mesh dispatches, 105 shaders) takes 7–12 ms. Per frame it sends 1.2–1.9 M primitives into clipping, 280–445 k survive, and they produce only 340–610 k pixel-shader runs on a 921,600-pixel target: about one pixel per surviving triangle. Its time is 5.7–6.0 ns per primitive in all three scenes; the neighbouring G-buffer lists run at 2.3–3.5 ns.
So roughly 8 M primitives a frame go through whatever the render size is. None of this is work the layer adds.
Lower detail distance: the card gets much cheaper, the frame rate less so
With the root detail scale (the global
VICTORY_LOD_SCALEnow sets) at 0.5, 25 frames:Frame rate: 23–34 fps in a lighter stretch (3,300–7,800 draws), but 14–20 fps in heavy stretches (8,300–8,900 draws) against 13–19 before. In the heavy stretches the card is no longer the limit; the title's threads and the layer's CPU side are. Visible cost at 0.5: pop-in, and textures flashing inside shops (not seen at 1.0; cause not found).
Frame generation costs 12–14 ms of card per real frame (proxy swap chain)
Two diagnostics sessions, generation on and off, card clock aligned. The frame is the same 16 submissions either way with the same card times (~45–50 ms). With generation on there is a hole of 14–17 ms on the layer's queue after each present (1.5–5 ms without), which is the generation and its present on the swap chain's own queue; our own submissions grow only 1–3 ms. Ruled out by separate sessions: vsync, the SDK's async mode, the HUD-less copy, sending the present ahead (the wait moves, the frame time does not). The upscaler alone without generation does not show the cost. I have not measured
VICTORY_FIDELITYFX_FRAMEGEN_DIRECT, which did not exist on that base.A lead with a fault: early depth test for every pixel shader that allows it
Declaring the depth test first for all pixel shaders the console runs that way (not only the one prepass program) made mid scenes about 15 % faster (median 68–71 → 58 ms at 8.5–11k draws, two sessions). It also made tree textures and the road flicker, which the baseline does not, so it is wrong for some shaders as done. I did not find which. Mentioned because the gain is real if someone finds the condition.
Things that did not help
If the per-list instrument is of use I can port it to current
mainand open a PR; I have not done so because I cannot test it in the title onmainright now.🤖 Generated with Claude Code
@DrArroway on GitHub · 2026-12-03 19:50 UTC · original
Data point for the
VICTORY_FIDELITYFX_FRAMEGEN_DIRECT=1note in#293(@Spetrius): onmain(45591b0), the14–17 mspost-present queue hole from the proxy swap chain disappears cleanly, and direct frame generation takes0.82 msmedian (0.92 msp90) of GPU timestamp time per generated frame.Setup & settings
AMD Radeon RX 6900 XT (1002:73bf)(RDNA 2,16368 MiBVRAM), Ryzen 9 7900X, 62 GiB RAM, CachyOS kernel7.3.7-1-cachyos,GE-Proton11-15-x86_64, repo patched Mesa & vkd3d-protonmain45591b0,2560x1440output,VICTORY_FSR_4K=quality([1706, 960]→[2560, 1440]),VICTORY_FIDELITYFX_FRAMEGEN=1(provider="3.1.6"),VICTORY_FIDELITYFX_FRAMEGEN_DIRECT=1,VICTORY_PRESENT_TIMING=1,VICTORY_PLACED_COPIED=1,VICTORY_PARTS_ONE_CALL=1,VICTORY_KEEP_HOST_BUFFERS=1, RT on (VICTORY_BVH_BUILDER=1)18:24:54→19:43:43UTC),120,435real +114,630generated =235,065presents,0errors, clean manual exitMeasurements (
stats: clockover4,608s;stats: fg_directGPU timestamps over4,519active 1 s samples)stats: clock:busy_percentmedian99.1%,idle_msmedian0.32 ms(p90 = 3.43 ms),idle_behind_us_msmedian0.24 ms(p90 = 1.10 ms)present_msmedian0.01 ms(p90 = 0.01 ms)fg_prepare + fg_inputs + fg_interp + fg_compose):real/genFPS24.24/24.24(48.48presented)32.22/32.22(64.44presented)fg_*GPU time / frame0.82 ms0.92 msfg_prepare_ms0.06 ms0.07 msfg_inputs_ms0.02 ms0.02 msfg_interp_ms0.70 ms0.79 msfg_compose_ms0.04 ms0.05 msSample
stats: fg_directline mid-run:(Minor note: running without
VICTORY_UI_PLANE=3840x2160here left the in-scene top-right HUD inside the generated color input, making it shimmer on generated frames; separating it withVICTORY_UI_PLANE=3840x2160is expected to keep it clean.)