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

Open
opened 2026-12-03 05:44:02 +00:00 by github-bot · 1 comment
Owner

@⁠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 behind main today, 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)

Lists Card ms / frame Work
G-buffer (6 targets + depth) ~15 (13–15) ~2.9 M primitives into clipping
Shadow atlas (depth only, 1024x4096) 5–6 3–4 M primitives
Compute only ~16 (13–16) 40–46 M compute-shader runs over ~45 lists, largest 2–3 ms, no outlier
Everything else ~16 many small passes

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_SCALE now sets) at 0.5, 25 frames:

scale 1.0 scale 0.5
Card work / frame 48–57 ms 27–33 ms
G-buffer lists 13–15 ms ~3 ms
Primitives into clipping (G-buffer) 2.4–3.0 M 0.6–0.9 M
Shadow atlas 4–6 ms ~2 ms
Compute only 13–16 ms 10.5–13.5 ms

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

  • Skipping or narrowing the forced idle waits: 54–57 / 64–65 / 75–79 ms against 55 / 68–71 / 77–80 (light / mid / heavy), with flicker. The waits are not the town cost.

If the per-list instrument is of use I can port it to current main and open a PR; I have not done so because I cannot test it in the title on main right now.

🤖 Generated with Claude Code

**@⁠Spetrius** on GitHub · 2026-12-03 05:41 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/293) Measurements from one PC, posted in case they save someone the work. They are from an older base (`37bb30f`, 212 commits behind `main` today, 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) | Lists | Card ms / frame | Work | |---|---|---| | G-buffer (6 targets + depth) | ~15 (13–15) | ~2.9 M primitives into clipping | | Shadow atlas (depth only, 1024x4096) | 5–6 | 3–4 M primitives | | Compute only | ~16 (13–16) | 40–46 M compute-shader runs over ~45 lists, largest 2–3 ms, no outlier | | Everything else | ~16 | many small passes | 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_SCALE` now sets) at 0.5, 25 frames: | | scale 1.0 | scale 0.5 | |---|---|---| | Card work / frame | 48–57 ms | 27–33 ms | | G-buffer lists | 13–15 ms | ~3 ms | | Primitives into clipping (G-buffer) | 2.4–3.0 M | 0.6–0.9 M | | Shadow atlas | 4–6 ms | ~2 ms | | Compute only | 13–16 ms | 10.5–13.5 ms | 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 - Skipping or narrowing the forced idle waits: 54–57 / 64–65 / 75–79 ms against 55 / 68–71 / 77–80 (light / mid / heavy), with flicker. The waits are not the town cost. If the per-list instrument is of use I can port it to current `main` and open a PR; I have not done so because I cannot test it in the title on `main` right now. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 05:44:08 +00:00
Author
Owner

@⁠DrArroway on GitHub · 2026-12-03 19:50 UTC · original

Data point for the VICTORY_FIDELITYFX_FRAMEGEN_DIRECT=1 note in #293 (@Spetrius): on main (45591b0), the 14–17 ms post-present queue hole from the proxy swap chain disappears cleanly, and direct frame generation takes 0.82 ms median (0.92 ms p90) of GPU timestamp time per generated frame.

Setup & settings

  • GPU / System: AMD Radeon RX 6900 XT (1002:73bf) (RDNA 2, 16368 MiB VRAM), Ryzen 9 7900X, 62 GiB RAM, CachyOS kernel 7.3.7-1-cachyos, GE-Proton11-15-x86_64, repo patched Mesa & vkd3d-proton
  • Build & switches: main 45591b0, 2560x1440 output, 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)
  • Duration: 79 minutes (18:24:54 → 19:43:43 UTC), 120,435 real + 114,630 generated = 235,065 presents, 0 errors, clean manual exit

Measurements (stats: clock over 4,608 s; stats: fg_direct GPU timestamps over 4,519 active 1 s samples)

  • No post-present queue idle hole:
    • stats: clock: busy_percent median 99.1%, idle_ms median 0.32 ms (p90 = 3.43 ms), idle_behind_us_ms median 0.24 ms (p90 = 1.10 ms)
    • present_ms median 0.01 ms (p90 = 0.01 ms)
  • Direct Framegen GPU timestamp breakdown (fg_prepare + fg_inputs + fg_interp + fg_compose):
Metric Median p90
real / gen FPS 24.24 / 24.24 (48.48 presented) 32.22 / 32.22 (64.44 presented)
Total fg_* GPU time / frame 0.82 ms 0.92 ms
fg_prepare_ms 0.06 ms 0.07 ms
fg_inputs_ms 0.02 ms 0.02 ms
fg_interp_ms 0.70 ms 0.79 ms
fg_compose_ms 0.04 ms 0.05 ms

Sample stats: fg_direct line mid-run:

INFO stats: fg_direct real=43.27 gen=43.27 without_gen=0.0 resets=0 present_ms=0.01 present_max_ms=0.01 fg_prepare_ms=0.06 fg_inputs_ms=0.02 fg_interp_ms=0.74 fg_compose_ms=0.04 timed=44 slot_units=44 slot_title=0 slot_idle=0 slot_flush=0 f=0.44 w=198.75 gap_ms=12.05 half_ms=11.94

(Minor note: running without VICTORY_UI_PLANE=3840x2160 here left the in-scene top-right HUD inside the generated color input, making it shimmer on generated frames; separating it with VICTORY_UI_PLANE=3840x2160 is expected to keep it clean.)

**@⁠DrArroway** on GitHub · 2026-12-03 19:50 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/293#issuecomment-7390307457) Data point for the `VICTORY_FIDELITYFX_FRAMEGEN_DIRECT=1` note in `#293` (`@Spetrius`): on `main` (`45591b0`), the `14–17 ms` post-present queue hole from the proxy swap chain disappears cleanly, and direct frame generation takes **`0.82 ms` median (`0.92 ms` p90)** of GPU timestamp time per generated frame. ### Setup & settings - **GPU / System:** `AMD Radeon RX 6900 XT (1002:73bf)` (RDNA 2, `16368 MiB` VRAM), Ryzen 9 7900X, 62 GiB RAM, CachyOS kernel `7.3.7-1-cachyos`, `GE-Proton11-15-x86_64`, repo patched Mesa & vkd3d-proton - **Build & switches:** `main` `45591b0`, `2560x1440` output, `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`) - **Duration:** 79 minutes (`18:24:54` → `19:43:43` UTC), **`120,435` real + `114,630` generated = `235,065` presents**, `0` errors, clean manual exit ### Measurements (`stats: clock` over `4,608` s; `stats: fg_direct` GPU timestamps over `4,519` active 1 s samples) - **No post-present queue idle hole:** - `stats: clock`: `busy_percent` median **`99.1%`**, `idle_ms` median **`0.32 ms`** (`p90 = 3.43 ms`), `idle_behind_us_ms` median **`0.24 ms`** (`p90 = 1.10 ms`) - `present_ms` median **`0.01 ms`** (`p90 = 0.01 ms`) - **Direct Framegen GPU timestamp breakdown (`fg_prepare + fg_inputs + fg_interp + fg_compose`):** | Metric | Median | p90 | |---|---|---| | `real` / `gen` FPS | `24.24` / `24.24` (`48.48` presented) | `32.22` / `32.22` (`64.44` presented) | | Total `fg_*` GPU time / frame | **`0.82 ms`** | **`0.92 ms`** | | `fg_prepare_ms` | `0.06 ms` | `0.07 ms` | | `fg_inputs_ms` | `0.02 ms` | `0.02 ms` | | `fg_interp_ms` | `0.70 ms` | `0.79 ms` | | `fg_compose_ms` | `0.04 ms` | `0.05 ms` | Sample `stats: fg_direct` line mid-run: ```text INFO stats: fg_direct real=43.27 gen=43.27 without_gen=0.0 resets=0 present_ms=0.01 present_max_ms=0.01 fg_prepare_ms=0.06 fg_inputs_ms=0.02 fg_interp_ms=0.74 fg_compose_ms=0.04 timed=44 slot_units=44 slot_title=0 slot_idle=0 slot_flush=0 f=0.44 w=198.75 gap_ms=12.05 half_ms=11.94 ``` *(Minor note: running without `VICTORY_UI_PLANE=3840x2160` here left the in-scene top-right HUD inside the generated color input, making it shimmer on generated frames; separating it with `VICTORY_UI_PLANE=3840x2160` is expected to keep it clean.)*
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/lobomfz--VIctory-xmem#293
No description provided.