gpu: enable renderer port 2 descriptor notices by default #201

Closed
github-bot wants to merge 1 commit from github-bot/gh-201 into main AGit
Owner

@⁠TheRifai on GitHub · 2026-12-02 08:05 UTC · original
TheRifai:port-descriptors-default-v2 → main · +7 −7 · 3 files · 1 commits · closed without merging

What

VICTORY_PORT_DESCRIPTORS ("renderer port #2") patches the title's descriptor-record stores so heap sync learns which slots changed instead of reading whole changed heap pages. It is implemented and has a correctness fallback, but was off by default. This makes it the default; VICTORY_PORT_DESCRIPTORS=0 keeps the old path available.

The reference

SandBar's heap hooks report 35 ms → 1.3 ms for the same idea on Windows/D3D12; this port is our Vulkan-side equivalent. No code was copied; prior art only.

Evidence

A/B/B/A on the house save rt3, 110 s each, GE-Proton11-16, warm store, ray tracing on, no validation:

Run Path FPS Frame ms Renderer ms Heap-sync mean (slow frames)
A1 old default 27.53 36.35 21.29 9.09 ms
B1 port on 29.11 34.37 19.65 6.46 ms
B2 port on 29.33 34.14 19.84 6.70 ms
A2 old default 27.59 36.31 21.31 8.38 ms

About +1.6 fps, −2.1 ms per frame, renderer −1.6 ms. Loud kinds were unchanged and no fallback/fault lines appeared in either port run. A 110 s validation run with the port on reported only the four known VUIDs (03428, 01688, 01687, 06409) and no new loud kind.

Runs: /home/shlong/Documents/VKtory-capture/port-ab-{A1,B1,B2,A2}/, /home/shlong/Documents/VKtory-capture/port-val/. Not performance claims beyond the A/B above; validation runs were not used for timing.

Checklist (docs/AGENTS.md)

  • One topic; docs/TASKS.md not edited (rule 29/31)
  • No fallback, constant, switch, queue, unsafe or translator output changed (rules 2/9b/33/35/36/27) — the existing fallback remains, only the default changes
  • Comments say what is true now (rule 3)
  • Nothing from the title, no non-free data pointers (hard constraints)
**@⁠TheRifai** on GitHub · 2026-12-02 08:05 UTC · [original](https://github.com/vktory6/VKtory/pull/201) `TheRifai:port-descriptors-default-v2` → `main` · +7 −7 · 3 files · 1 commits · closed without merging ## What `VICTORY_PORT_DESCRIPTORS` ("renderer port #2") patches the title's descriptor-record stores so heap sync learns which slots changed instead of reading whole changed heap pages. It is implemented and has a correctness fallback, but was off by default. This makes it the default; `VICTORY_PORT_DESCRIPTORS=0` keeps the old path available. ## The reference SandBar's heap hooks report 35 ms → 1.3 ms for the same idea on Windows/D3D12; this port is our Vulkan-side equivalent. No code was copied; prior art only. ## Evidence A/B/B/A on the house save `rt3`, 110 s each, GE-Proton11-16, warm store, ray tracing on, no validation: | Run | Path | FPS | Frame ms | Renderer ms | Heap-sync mean (slow frames) | |---|---|---:|---:|---:|---:| | A1 | old default | 27.53 | 36.35 | 21.29 | 9.09 ms | | B1 | port on | 29.11 | 34.37 | 19.65 | 6.46 ms | | B2 | port on | 29.33 | 34.14 | 19.84 | 6.70 ms | | A2 | old default | 27.59 | 36.31 | 21.31 | 8.38 ms | About +1.6 fps, −2.1 ms per frame, renderer −1.6 ms. Loud kinds were unchanged and no fallback/fault lines appeared in either port run. A 110 s validation run with the port on reported only the four known VUIDs (`03428`, `01688`, `01687`, `06409`) and no new loud kind. Runs: `/home/shlong/Documents/VKtory-capture/port-ab-{A1,B1,B2,A2}/`, `/home/shlong/Documents/VKtory-capture/port-val/`. Not performance claims beyond the A/B above; validation runs were not used for timing. ## Checklist (docs/AGENTS.md) - [x] One topic; `docs/TASKS.md` not edited (rule 29/31) - [x] No fallback, constant, switch, queue, `unsafe` or translator output changed (rules 2/9b/33/35/36/27) — the existing fallback remains, only the default changes - [x] Comments say what is true now (rule 3) - [x] Nothing from the title, no non-free data pointers (hard constraints)
A/B/B/A on the house save (rt3, 110 s each, GE-Proton11-16, warm store, ray tracing on) showed 27.53 / 27.59 fps with the old default and 29.11 / 29.33 fps with VICTORY_PORT_DESCRIPTORS=1: about +1.6 fps, -2.1 ms per frame, renderer 21.3 -> 19.7 ms. Heap-sync own time in slow frames fell from 8.4-9.1 ms to 6.5-6.7 ms. A 110 s validation run with the switch on produced only the four known VUIDs and no new loud kind. No fallback/fault lines appeared in either port run. The path already has its correctness fallback (a few pages checked each frame) and stays switchable with VICTORY_PORT_DESCRIPTORS=0.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 08:06:26 +00:00
Author
Owner

@⁠TheRifai on GitHub · 2026-12-02 12:10 UTC · original

Follow-up A/B on the cadence knob this PR exposes (VICTORY_PORT_DESCRIPTORS_EVERY, default 8): lowering it to 2 does not help here, so I would keep 8 as the default.

Setup: main d59b4f8 with VICTORY_PORT_DESCRIPTORS=1 (the behaviour this PR turns on by default), RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X, 3840x2160, house save rt3, warm store, 100 s per run, W/I/K/J at 20/45/70/95 s, VKB_LAT=1. One A1 arm at EVERY=8 only produced ~800 frames (the others ~2,500) and is excluded as a bad startup.

Run EVERY Mean fps (last 40 windows) Slots told / frame slot_reads at Execute per slow frame
B1 2 28.74 ~96k 6.46 ms
B2 2 29.11 ~104k 6.38 ms
A2 8 (default) 29.61 ~99k 6.73 ms

The cheaper cadence does not move fps or slot-read time in this scene, and it does more take work (23 vs ~22 takings/frame is noise, but the slot count is not lower). So the default of 8 looks right; no change requested. Evidence: /home/shlong/Documents/VKtory-capture/portevery-ab-{A1,B1,B2,A2}/.

**@⁠TheRifai** on GitHub · 2026-12-02 12:10 UTC · [original](https://github.com/vktory6/VKtory/pull/201#issuecomment-7344951958) Follow-up A/B on the cadence knob this PR exposes (`VICTORY_PORT_DESCRIPTORS_EVERY`, default 8): lowering it to 2 does not help here, so I would keep 8 as the default. Setup: main `d59b4f8` with `VICTORY_PORT_DESCRIPTORS=1` (the behaviour this PR turns on by default), RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X, 3840x2160, house save `rt3`, warm store, 100 s per run, W/I/K/J at 20/45/70/95 s, `VKB_LAT=1`. One A1 arm at `EVERY=8` only produced ~800 frames (the others ~2,500) and is excluded as a bad startup. | Run | EVERY | Mean fps (last 40 windows) | Slots told / frame | `slot_reads at Execute` per slow frame | |---|---:|---:|---:|---:| | B1 | 2 | 28.74 | ~96k | 6.46 ms | | B2 | 2 | 29.11 | ~104k | 6.38 ms | | A2 | 8 (default) | 29.61 | ~99k | 6.73 ms | The cheaper cadence does not move fps or slot-read time in this scene, and it does more take work (23 vs ~22 takings/frame is noise, but the slot count is not lower). So the default of 8 looks right; no change requested. Evidence: `/home/shlong/Documents/VKtory-capture/portevery-ab-{A1,B1,B2,A2}/`.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-02 15:28 UTC · original

Thanks for the A B B A (+1.6 fps). Holding this one for the maintainer. It makes patching the title's descriptor stores the default, and our rules list "a patch of title code" as suspect by definition. The output should be identical with the fallback, so this is a policy decision, not a correctness problem. Also, rule 2 wants a value that doesn't parse to stop the start: map_or(true, |v| v != "0") turns it on for any other value. The EVERY default of 8 stays, per your follow-up.

**@⁠vktory6** on GitHub · 2026-12-02 15:28 UTC · [original](https://github.com/vktory6/VKtory/pull/201#issuecomment-7350393499) Thanks for the A B B A (+1.6 fps). Holding this one for the maintainer. It makes patching the title's descriptor stores the default, and our rules list "a patch of title code" as suspect by definition. The output should be identical with the fallback, so this is a policy decision, not a correctness problem. Also, rule 2 wants a value that doesn't parse to stop the start: `map_or(true, |v| v != "0")` turns it on for any other value. The `EVERY` default of 8 stays, per your follow-up.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-02 16:35 UTC · original

Thanks for the measurement. It's useful, but I'm not making this the default, and I'm closing the PR. Renderer port 2 patches six of the title's own descriptor-record stores at offsets found by hand in the binary. Our rules (docs/AGENTS.md, "Suspects by definition") list both "a patch of title code" and "a table derived from the title" as things whose first question is "should this exist at all?". That rule comes from the pool-assert patch (#212), which sat unowned until today for the same reason.

What your A B B A does show is the cost port 2 works around: reading whole changed heap pages costs the renderer ~1.6 ms a frame, and heap sync 9 → 6.5 ms in slow frames. That belongs in the heap sync itself, without patching the title, and port 2 goes once that's done. Both are now in the TASKS item "Slim victory-gpu" with your numbers: github.com/vktory6/VKtory@0dd90e2. If you want to take it on, "Descriptor heap as one array, not seven typed ones" is where it starts.

**@⁠vktory6** on GitHub · 2026-12-02 16:35 UTC · [original](https://github.com/vktory6/VKtory/pull/201#issuecomment-7352165609) Thanks for the measurement. It's useful, but I'm not making this the default, and I'm closing the PR. Renderer port 2 patches six of the title's own descriptor-record stores at offsets found by hand in the binary. Our rules (docs/AGENTS.md, "Suspects by definition") list both "a patch of title code" and "a table derived from the title" as things whose first question is "should this exist at all?". That rule comes from the pool-assert patch (#212), which sat unowned until today for the same reason. What your A B B A does show is the cost port 2 works around: reading whole changed heap pages costs the renderer ~1.6 ms a frame, and heap sync 9 → 6.5 ms in slow frames. That belongs in the heap sync itself, without patching the title, and port 2 goes once that's done. Both are now in the TASKS item "Slim victory-gpu" with your numbers: https://github.com/vktory6/VKtory/commit/0dd90e2. If you want to take it on, "Descriptor heap as one array, not seven typed ones" is where it starts.
github-bot closed this pull request 2026-12-02 17:12:14 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.