Two-die Ryzens and 8 GB cards: frame threads on one die, target reser… #730

Open
c1miano wants to merge 69 commits from upstream-pr/730 into main
c1miano commented 2026-11-28 04:35:48 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by c1miano on 2026-11-28T04:35:48Z.


…ve sized to the card, a native build

  • cores.rs: where all cores are alike but share more than one L3 (Ryzen 9 9900X/9950X/7900X: two CCDs), the threads a frame waits for and their helpers are kept on the die of the preferred cores, so their hand-overs stay in one L3 (VICTORY_ONE_CCD=0: not). List translators and the title's threads keep both dies; hybrid Intel and single-die Ryzens as before.
  • resource.rs: the room the texture queue keeps for render targets not made yet is 3,072 MiB or three tenths of the card's budget, whichever is less (VICTORY_CARD_ROOM_FOR_TARGETS_MB still wins). Unchanged on 12 GB cards; on 8 GB cards the flat 3,072 left the scene black while textures waited for room.
  • Cargo.toml [profile.native] (fat LTO, one codegen unit) and play-foxhound.ps1 -Build native (RUSTFLAGS=-C target-cpu=native).
  • docs/ryzen-9900x-rtx-3070ti.md: settings to start from on such a PC.

Claude-Session: https://claude.ai/code/session_01ULB8X6uKz9YY1ZUqZ9W4YP

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5536698127 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/730). Originally posted by [c1miano](https://github.com/c1miano) on 2026-11-28T04:35:48Z. --- …ve sized to the card, a native build - cores.rs: where all cores are alike but share more than one L3 (Ryzen 9 9900X/9950X/7900X: two CCDs), the threads a frame waits for and their helpers are kept on the die of the preferred cores, so their hand-overs stay in one L3 (VICTORY_ONE_CCD=0: not). List translators and the title's threads keep both dies; hybrid Intel and single-die Ryzens as before. - resource.rs: the room the texture queue keeps for render targets not made yet is 3,072 MiB or three tenths of the card's budget, whichever is less (VICTORY_CARD_ROOM_FOR_TARGETS_MB still wins). Unchanged on 12 GB cards; on 8 GB cards the flat 3,072 left the scene black while textures waited for room. - Cargo.toml [profile.native] (fat LTO, one codegen unit) and play-foxhound.ps1 -Build native (RUSTFLAGS=-C target-cpu=native). - docs/ryzen-9900x-rtx-3070ti.md: settings to start from on such a PC. Claude-Session: https://claude.ai/code/session_01ULB8X6uKz9YY1ZUqZ9W4YP
ArturoWolff commented 2026-11-28 04:48:20 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ArturoWolff on 2026-11-28T04:48:20Z.


Independent check of just the adaptive render-target reservation in resource.rs from #730 (018d54fed45716e689ab592d63fdca5349fa4cb3), on RTX 4060 desktop 8 GB / 16 GB RAM, NVIDIA 620.73.4, Linux/GE-Proton11-14. Applied to current .01 (63b902fe1720a5188ee79d94a88c8de0470f6349) with the previously tested Linux backing/DXC adaptations. No CCD affinity, native-profile compiler flags, or other #730 changes. Same cloned starting profile, separate fresh external caches, Series X 1080to1440, 30 cap, DLSS/FG off, requested full lighting/write-back/ordinary waits. The effective settings of the default and adaptive arms match; the intermediate fixed-2560 MiB arm from #609 differs only by that override.

Loading-stage observation Fixed 3072 (default) Fixed 2560 Adaptive #730
Last reported DXGI budget (MiB) 6743 6670 6800
Last actual in use (MiB) 3190 3190 3894
Last amount still reserved for targets (MiB) 2625 2116 1596
Last texture-admission line excess (MiB) 411 10 30
Last uploaded texture slots 19993 18958 25847
Last uploaded MiB 846 924 1387
Last total tracked queue slots 22148 21408 20029
Last slots due 2 1 1
Last uploaded whole awaiting recheck 13407 14127 16398
No-room samples / total 2/9 2/9 1/10
Observed use above DXGI budget 0/9 0/9 0/10
Minimum available system RAM (MiB) 2331.2 2214.0 2252.7
Actual exit 5 5 5

The adaptive arm kept admitting textures later in loading, consistent with the budget-scaled intent. It eventually hit the admission line again. Clarification from the detailed queue reports: the headline "waiting" count is the total tracked queue, including many already-uploaded slots awaiting periodic rechecks, not a count of outstanding first uploads. The last due counts were only 2 / 1 / 1. The sample count and workload are not scene matched, so the uploaded-slot and byte counts are not a throughput or in-world FPS measurement. All three launches reached loading artwork then the same black overlay/first-story failure documented in #628, with no guard stop, OOM increment, recorded kernel GPU fault or reported device/fence error. The adaptive arm elapsed 136.293 s, versus 124.983 s default; no actual world was reached. Post-load render-target requirements and fidelity are still unqualified.

This supports trying the budget-scaled reservation instead of a universal 3072 MiB, but does not support calling it a fix for the #628 progression failure or recommending a new general Series X default without a post-load check. It is a single-factor complement to the multi-setting Series S report in #609, not the same experiment. Thanks for the proposal.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7234270200 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/730#issuecomment-7234270200). Originally posted by [ArturoWolff](https://github.com/ArturoWolff) on 2026-11-28T04:48:20Z. --- Independent check of just the adaptive render-target reservation in `resource.rs` from #730 (`018d54fed45716e689ab592d63fdca5349fa4cb3`), on RTX 4060 desktop 8 GB / 16 GB RAM, NVIDIA 620.73.4, Linux/GE-Proton11-14. Applied to current `.01` (`63b902fe1720a5188ee79d94a88c8de0470f6349`) with the previously tested Linux backing/DXC adaptations. No CCD affinity, native-profile compiler flags, or other #730 changes. Same cloned starting profile, separate fresh external caches, Series X `1080to1440`, 30 cap, DLSS/FG off, requested full lighting/write-back/ordinary waits. The effective settings of the default and adaptive arms match; the intermediate fixed-2560 MiB arm from [#609](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/609#issuecomment-7233945252) differs only by that override. | Loading-stage observation | Fixed 3072 (default) | Fixed 2560 | Adaptive #730 | |---|---:|---:|---:| | Last reported DXGI budget (MiB) | 6743 | 6670 | 6800 | | Last actual in use (MiB) | 3190 | 3190 | 3894 | | Last amount still reserved for targets (MiB) | 2625 | 2116 | 1596 | | Last texture-admission line excess (MiB) | 411 | 10 | 30 | | Last uploaded texture slots | 19993 | 18958 | 25847 | | Last uploaded MiB | 846 | 924 | 1387 | | Last total tracked queue slots | 22148 | 21408 | 20029 | | Last slots due | 2 | 1 | 1 | | Last uploaded whole awaiting recheck | 13407 | 14127 | 16398 | | No-room samples / total | 2/9 | 2/9 | 1/10 | | Observed use above DXGI budget | 0/9 | 0/9 | 0/10 | | Minimum available system RAM (MiB) | 2331.2 | 2214.0 | 2252.7 | | Actual exit | 5 | 5 | 5 | The adaptive arm kept admitting textures later in loading, consistent with the budget-scaled intent. It eventually hit the admission line again. Clarification from the detailed queue reports: the headline "waiting" count is the total tracked queue, including many already-uploaded slots awaiting periodic rechecks, not a count of outstanding first uploads. The last due counts were only 2 / 1 / 1. The sample count and workload are not scene matched, so the uploaded-slot and byte counts are not a throughput or in-world FPS measurement. All three launches reached loading artwork then the same black overlay/first-story failure documented in #628, with no guard stop, OOM increment, recorded kernel GPU fault or reported device/fence error. The adaptive arm elapsed 136.293 s, versus 124.983 s default; no actual world was reached. Post-load render-target requirements and fidelity are still unqualified. This supports trying the budget-scaled reservation instead of a universal 3072 MiB, but does not support calling it a fix for the #628 progression failure or recommending a new general Series X default without a post-load check. It is a single-factor complement to the multi-setting Series S report in #609, not the same experiment. Thanks for the proposal. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
urielbeaupre commented 2026-11-28 17:56:23 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by urielbeaupre on 2026-11-28T17:56:23Z.


A data point for the two-die placement on a Ryzen 9 7900X (6+6 cores, two CCDs) with an RTX 4070 Ti 12 GB, Series S profile, DLSS off, same save, warm caches.

I couldn't merge the PR branch as a whole onto my test base (it brings in about 1,000 other commits), so I cherry-picked only 018d54f, "frame threads on one die, target reserve sized to the card". I put it on main 63b902f plus #1038 and #1184. One build; VICTORY_ONE_CCD alternated; a warm-up run first (not counted). The log confirms the placement in the "on" runs ("the thread is kept on one die", 16 threads). Cutscene = seconds 60–110 after input, after = 110–165:

run VICTORY_ONE_CCD cutscene fps CPU preparing after scene change
on1 1 35.9 20.8 ms 21.8
off1 0 41.0 18.6 ms 24.3
on2 1 38.6 19.4 ms 24.5
off2 0 38.5 20.5 ms 23.3

Average: on 37.3 / 23.2, off 39.8 / 23.8. On this CPU there's no gain from keeping the frame's threads on one die. If anything it's slightly slower in the cutscene, though the second pair was even, so part of that is noise. My guess is that six cores on one die are tight for the submit thread, its helpers and the list translators together on a 6+6 part, while a 9900X/9950X with more cores per die has room. It might be worth keeping it off by default for 6-core-per-CCD parts, or measuring there before turning it on.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7243404234 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/730#issuecomment-7243404234). Originally posted by [urielbeaupre](https://github.com/urielbeaupre) on 2026-11-28T17:56:23Z. --- A data point for the two-die placement on a **Ryzen 9 7900X** (6+6 cores, two CCDs) with an RTX 4070 Ti 12 GB, Series S profile, DLSS off, same save, warm caches. I couldn't merge the PR branch as a whole onto my test base (it brings in about 1,000 other commits), so I cherry-picked only 018d54f, "frame threads on one die, target reserve sized to the card". I put it on main 63b902f plus #1038 and #1184. One build; `VICTORY_ONE_CCD` alternated; a warm-up run first (not counted). The log confirms the placement in the "on" runs ("the thread is kept on one die", 16 threads). Cutscene = seconds 60–110 after input, after = 110–165: | run | `VICTORY_ONE_CCD` | cutscene fps | CPU preparing | after scene change | |---|---|---|---|---| | on1 | 1 | 35.9 | 20.8 ms | 21.8 | | off1 | 0 | 41.0 | 18.6 ms | 24.3 | | on2 | 1 | 38.6 | 19.4 ms | 24.5 | | off2 | 0 | 38.5 | 20.5 ms | 23.3 | Average: **on 37.3 / 23.2, off 39.8 / 23.8**. On this CPU there's no gain from keeping the frame's threads on one die. If anything it's slightly slower in the cutscene, though the second pair was even, so part of that is noise. My guess is that six cores on one die are tight for the submit thread, its helpers and the list translators together on a 6+6 part, while a 9900X/9950X with more cores per die has room. It might be worth keeping it off by default for 6-core-per-CCD parts, or measuring there before turning it on. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
autogenes-sudo commented 2026-11-29 22:56:05 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by autogenes-sudo on 2026-11-29T22:56:05Z.


Measurements on another two-die Ryzen without V-Cache, in case they help with the placement part of this PR.

PC: Ryzen 9 5900X (two CCDs, 32 MB L3 each, SMT), RTX 5060 8 GB (driver 621.40), 32 GB DDR4-3600 in one stick (one channel), Windows 11. v2026.11.29.03, Series S, DLSS Performance, --res 1080to1440, no frame generation.

Method: VICTORY_AB with 15 s phases, run unattended with a VICTORY_INPUT_REPLAY pad tape (A every 5 s through the menus, then the character stands still, so phases are far less noisy than play), 64 phases per run. Effects are medians of neighbouring phases that differ only in the switch, with the draw count regressed out; ± is one standard error.

Placement. A local switch re-applied SetThreadSelectedCpuSets every second by thread name: the title's threads (no name, or title-main) on one CCD, the layer's (victory-*, dstorage*) on the other. The D3D background compiles were left alone.

Variant Frame time Pairs
Title on CCD0, layer on CCD1 (with helpers at THREAD_PRIORITY_HIGHEST and VICTORY_HEAP_LOOK_QUIET; the three not separated), against all three off -4.3 ms ± 1.0 (median 72.5 -> 68.4 ms) 63
Title on CCD1, layer on CCD0, against the line above +9.7 ms ± 1.1 (median 67.0 -> 76.7 ms) 63

So on this part, which die the title's threads get is worth several milliseconds, and the first die is the better one for them here. This is the reverse of what this PR does (the layer's frame threads on the preferred cores' die, the title on both). I did not measure this PR's variant.

Other switches on the same PC (same method, 48-64 phases each):

  • VICTORY_CBV_ONCE: +23 ms ± 4, 27 % slower.
  • VICTORY_GUARD_HOT: +4 to +12 ms.
  • VICTORY_COPY_BESIDE, VICTORY_SCRATCH_SHARED=0, VICTORY_HELPER_PRIORITY=0, VICTORY_GUARD_REST=0: no clear effect.
  • The VICTORY_RYZEN_PREP streaming copy: no gain (bench_ryzen_snapshot_jobs: 13.06 against 12.89 ms per 144 MiB).

Context:

  • A frame here costs a fixed part plus 8.5 to 15 ms per 1,000 draws. The card's share is 10-20 ms, so the CPU side is the limit.
  • A 30 s samply profile (wpr + samply import) had only ~9 of 24 logical processors busy.
  • 17 % of the title's code time was one thread asleep in MWAITX, woken about 3 times a frame by the title's other threads.

I built with fat LTO and -C target-cpu=znver3 as this PR does, but did not measure it separately.

I can send the placement switch as a PR of its own if it is wanted.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7264063527 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/730#issuecomment-7264063527). Originally posted by [autogenes-sudo](https://github.com/autogenes-sudo) on 2026-11-29T22:56:05Z. --- Measurements on another two-die Ryzen without V-Cache, in case they help with the placement part of this PR. **PC:** Ryzen 9 5900X (two CCDs, 32 MB L3 each, SMT), RTX 5060 8 GB (driver 621.40), 32 GB DDR4-3600 in one stick (one channel), Windows 11. v2026.11.29.03, Series S, DLSS Performance, `--res 1080to1440`, no frame generation. **Method:** `VICTORY_AB` with 15 s phases, run unattended with a `VICTORY_INPUT_REPLAY` pad tape (A every 5 s through the menus, then the character stands still, so phases are far less noisy than play), 64 phases per run. Effects are medians of neighbouring phases that differ only in the switch, with the draw count regressed out; ± is one standard error. **Placement.** A local switch re-applied `SetThreadSelectedCpuSets` every second by thread name: the title's threads (no name, or `title-main`) on one CCD, the layer's (`victory-*`, `dstorage*`) on the other. The D3D background compiles were left alone. | Variant | Frame time | Pairs | |---|---|---| | Title on CCD0, layer on CCD1 (with helpers at `THREAD_PRIORITY_HIGHEST` and `VICTORY_HEAP_LOOK_QUIET`; the three not separated), against all three off | **-4.3 ms ± 1.0** (median 72.5 -> 68.4 ms) | 63 | | Title on CCD1, layer on CCD0, against the line above | **+9.7 ms ± 1.1** (median 67.0 -> 76.7 ms) | 63 | So on this part, which die the title's threads get is worth several milliseconds, and the first die is the better one for them here. This is the reverse of what this PR does (the layer's frame threads on the preferred cores' die, the title on both). I did not measure this PR's variant. **Other switches on the same PC** (same method, 48-64 phases each): - `VICTORY_CBV_ONCE`: **+23 ms ± 4**, 27 % slower. - `VICTORY_GUARD_HOT`: +4 to +12 ms. - `VICTORY_COPY_BESIDE`, `VICTORY_SCRATCH_SHARED=0`, `VICTORY_HELPER_PRIORITY=0`, `VICTORY_GUARD_REST=0`: no clear effect. - The `VICTORY_RYZEN_PREP` streaming copy: no gain (`bench_ryzen_snapshot_jobs`: 13.06 against 12.89 ms per 144 MiB). **Context:** - A frame here costs a fixed part plus 8.5 to 15 ms per 1,000 draws. The card's share is 10-20 ms, so the CPU side is the limit. - A 30 s samply profile (wpr + `samply import`) had only ~9 of 24 logical processors busy. - 17 % of the title's code time was one thread asleep in `MWAITX`, woken about 3 times a frame by the title's other threads. I built with fat LTO and `-C target-cpu=znver3` as this PR does, but did not measure it separately. I can send the placement switch as a PR of its own if it is wanted.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/730:upstream-pr/730'
git switch 'upstream-pr/730'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/730'
git switch 'upstream-pr/730'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/730'
git switch 'upstream-pr/730'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/730'
git switch 'main'
git merge --squash 'upstream-pr/730'
git switch 'main'
git merge --ff-only 'upstream-pr/730'
git switch 'main'
git merge 'upstream-pr/730'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!730
No description provided.