RDNA 4 (RX 9060 XT 16GB) + 8-core 5700X3D field report: PR #324 verification, CPU profile hotspots, 8-core scheduling & FSR 4.1.2 on 1080p/Series S #438

Open
opened 2026-11-27 01:33:37 +00:00 by github-bot · 2 comments
Owner

@⁠knx975 on GitHub · 2026-11-27 01:28 UTC · original

Environment

  • CPU: AMD Ryzen 7 5700X3D (8C/16T, Zen 3)
  • GPU: AMD Radeon RX 9060 XT 16 GB (RDNA 4, 0x1002:0x7590, vram_mb=16191)
  • RAM: 32 GB (31.92 GB usable)
  • OS: Windows 11
  • Codebase tested: Belobug/VIctory-Belobug-AMD (a-publier @ 4eb6cfd) merged with avatarmanz/VIctory-7900XTX (main @ 014d52d), compiled with RUSTFLAGS="-C target-cpu=native" + fat LTO.

1. RDNA 4 Confirmation (PR #324)

  • Precompiled all 25,694 shaders with VICTORY_PORT_CBV=1.
  • Warmed 4,148 / 4,149 GPU pipelines cleanly (43 of 44 previously failing RDNA 4 compute pipelines now succeed).
  • VICTORY_PORT_CONSTANTS_ORDER (from avatarmanz/VIctory-7900XTX) also works on RDNA 4 and noticeably reduces tree/palm flicker.

2. Feature Request / Small Patch: PC FSR 4.1.2 on 1080p & Series S

Currently apps/victory/src/run.rs only loads the PC FidelityFX DLL (amd_fidelityfx_upscaler_dx12.dll v4.1.2) when --fsr (4K) is used. On RDNA 4 cards (RX 9060 XT / 9070 XT) running Series S or Series X @ 1080p, allowing PC FSR 4.1.2 via a flag (e.g. VICTORY_PC_FSR=1) works out of the box:

FidelityFX 4 recorded the title's temporal dispatch provider="4.1.2" render=[960, 540] output=[1920, 1080]

(Tested with VICTORY_UPSCALER=7 and both VICTORY_FFX_SCALE=0.67 Quality and 0.5 Performance.)


3. 8-Core CPU & 16 GB VRAM / 32 GB RAM Findings

  • VICTORY_TITLE_PRIORITIES=0 causes severe freezes on 8-core CPUs: With VICTORY_TITLE_PRIORITIES=0 (from play.ps1), the title's 6 IDLE streaming threads were starved for up to 4.8s, causing 0–5 fps street freezes. Removing VICTORY_TITLE_PRIORITIES=0 eliminated the freezes.
  • Worker thread oversubscription on 8C/16T: Default pool counts (THIN + UNDER=6 + VIEW=6+4 + LAND=4) create 20+ active worker threads competing for 8 physical cores (logged 32.0 ms waiting for the guards and 13.0 ms waited for at lists' close). Calibrating VICTORY_THIN_THREADS=6 and VICTORY_LAND_THREADS=4 helped significantly.
  • 16 GB VRAM card-buffer cap: VICTORY_CARD_BUFFERS_MIN_KB=64 uncapped filled ~15.67/16 GB VRAM and spilled to system RAM (6–8 fps). Using VICTORY_CARD_BUFFERS_MIN_KB=128 + VICTORY_CARD_BUFFERS_MB=1536 + VICTORY_RESIDENCY=1 reduced CPU buffer compares from 84.7 MB → 2.1–3.3 MB/frame while keeping VRAM around 10–13 GB.
  • VICTORY_PORT_RT=1 visual regression (Series S + RT): Caused black face/torso skinning glitches on Jason; disabling VICTORY_PORT_RT (keeping VICTORY_BVH_BUILDER=1 + VICTORY_AMBIENT_RT=0.7,1.5) avoided it.

4. CPU Profile Hotspots (VICTORY_PROFILE, 60s walking in street, Series S)

GPU stayed at ~34% busy (100% CPU-bound across all 8 cores):

  • victory-list-0..5: ~175s CPU across 6 threads (46,561 list calls in 381.7 ms/frame total).
  • victory-submit: 30.1s CPU (71.0 ms/frame in diag build; 5.9 ms write watch, 17.8 ms refreshes, 26.2 ms waiting for flights).
  • victory-relay: 50.72 ms/frame in read-backs and lists.

Top symbolized hotspots:

  1. windows_core::unknown::clone (2.9% leaf) + HostHeap::keep (2.6% leaf) = 5.5% of all 6 victory-list-* threads:
    • Called on every slot inside HostHeap::make_listed (self.keep(index, made.kept.clone())), doing COM AddRef/Release + Mutex lock even when the slot already holds the same ID3D12Resource (or None).
  2. HostHeap::make_listed (11.5% inclusive) + CopyDescriptorsSimple(1, ...) (2.9% leaf):
    • Does 2 HashMap lookups (contains_key + [&words]) per slot and issues 1 CopyDescriptorsSimple(1, ...) COM call per descriptor instead of batching contiguous table slots with CopyDescriptors.
  3. HostHeap::clear_twin (0.7% leaf on victory-list-*, 3.7% leaf on victory-heap-sync):
    • Unconditional AtomicBool::swap(false, Relaxed) causes cache-line bouncing on slots that are already false.
  4. State::tables_done lock contention (~13,400 dynamic tables/frame):
    • Calls release_dynamic in a per-table loop, acquiring SHADER_HEAPS.read() + HostHeap::next.lock() ~13,400 times/frame on victory-relay while all 6 victory-list-* threads contend on HostHeap::next.lock() in HostHeap::dynamic().
  5. list::execute_indirect (28.6% inclusive of victory-list-*):
    • With VICTORY_PORT_CONSTANTS_ORDER, 2,375–2,646 indirect executions/frame are clamped individually with batching/windowing disabled (self.window = None, self.batch = None). A finer-grained hazard check (only breaking a batch when a buffer written since batch start overlaps the indirect args/count range) could be a big CPU win on 8-core CPUs without bringing back tree flicker.

Local Rust patches prototyped & tested (403/403 victory-gpu unit tests passing)

I prototyped fixes for items #1–#4 (plus thread-local scratch buffer reuse in texback::land and cached HostHeap::gpu):

  • HostHeap::keep_ref with kept_raw: Box<[AtomicUsize]> lock-free fast path.
  • HostHeap::make_listed_batched (single Entry lookup + stack ListedBatch flushing contiguous runs via CopyDescriptors).
  • HostHeap::clear_twin guarded by made.load(Relaxed) before swap.
  • release_dynamic_many / HostHeap::release_many releasing all dynamic slots per heap under a single lock in State::tables_done.

Happy to share the diff / open a PR if any of these are useful!

**@⁠knx975** on GitHub · 2026-11-27 01:28 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/438) ## Environment - **CPU:** AMD Ryzen 7 5700X3D (8C/16T, Zen 3) - **GPU:** AMD Radeon RX 9060 XT 16 GB (RDNA 4, `0x1002:0x7590`, `vram_mb=16191`) - **RAM:** 32 GB (31.92 GB usable) - **OS:** Windows 11 - **Codebase tested:** `Belobug/VIctory-Belobug-AMD` (`a-publier` @ `4eb6cfd`) merged with `avatarmanz/VIctory-7900XTX` (`main` @ `014d52d`), compiled with `RUSTFLAGS="-C target-cpu=native"` + fat LTO. --- ## 1. RDNA 4 Confirmation (PR #324) - Precompiled all **25,694 shaders** with `VICTORY_PORT_CBV=1`. - Warmed **4,148 / 4,149** GPU pipelines cleanly (**43 of 44** previously failing RDNA 4 compute pipelines now succeed). - `VICTORY_PORT_CONSTANTS_ORDER` (from `avatarmanz/VIctory-7900XTX`) also works on RDNA 4 and noticeably reduces tree/palm flicker. --- ## 2. Feature Request / Small Patch: PC FSR 4.1.2 on 1080p & Series S Currently `apps/victory/src/run.rs` only loads the PC FidelityFX DLL (`amd_fidelityfx_upscaler_dx12.dll` v4.1.2) when `--fsr` (4K) is used. On RDNA 4 cards (RX 9060 XT / 9070 XT) running Series S or Series X @ 1080p, allowing PC FSR 4.1.2 via a flag (e.g. `VICTORY_PC_FSR=1`) works out of the box: ``` FidelityFX 4 recorded the title's temporal dispatch provider="4.1.2" render=[960, 540] output=[1920, 1080] ``` (Tested with `VICTORY_UPSCALER=7` and both `VICTORY_FFX_SCALE=0.67` Quality and `0.5` Performance.) --- ## 3. 8-Core CPU & 16 GB VRAM / 32 GB RAM Findings - **`VICTORY_TITLE_PRIORITIES=0` causes severe freezes on 8-core CPUs:** With `VICTORY_TITLE_PRIORITIES=0` (from `play.ps1`), the title's 6 `IDLE` streaming threads were starved for up to **4.8s**, causing 0–5 fps street freezes. Removing `VICTORY_TITLE_PRIORITIES=0` eliminated the freezes. - **Worker thread oversubscription on 8C/16T:** Default pool counts (`THIN` + `UNDER=6` + `VIEW=6+4` + `LAND=4`) create 20+ active worker threads competing for 8 physical cores (logged `32.0 ms waiting for the guards` and `13.0 ms waited for at lists' close`). Calibrating `VICTORY_THIN_THREADS=6` and `VICTORY_LAND_THREADS=4` helped significantly. - **16 GB VRAM card-buffer cap:** `VICTORY_CARD_BUFFERS_MIN_KB=64` uncapped filled ~15.67/16 GB VRAM and spilled to system RAM (6–8 fps). Using `VICTORY_CARD_BUFFERS_MIN_KB=128` + `VICTORY_CARD_BUFFERS_MB=1536` + `VICTORY_RESIDENCY=1` reduced CPU buffer compares from **84.7 MB → 2.1–3.3 MB/frame** while keeping VRAM around 10–13 GB. - **`VICTORY_PORT_RT=1` visual regression (Series S + RT):** Caused black face/torso skinning glitches on Jason; disabling `VICTORY_PORT_RT` (keeping `VICTORY_BVH_BUILDER=1` + `VICTORY_AMBIENT_RT=0.7,1.5`) avoided it. --- ## 4. CPU Profile Hotspots (`VICTORY_PROFILE`, 60s walking in street, Series S) GPU stayed at **~34% busy** (100% CPU-bound across all 8 cores): - `victory-list-0..5`: **~175s CPU** across 6 threads (`46,561 list calls in 381.7 ms/frame` total). - `victory-submit`: **30.1s CPU** (`71.0 ms/frame` in diag build; `5.9 ms` write watch, `17.8 ms` refreshes, `26.2 ms` waiting for flights). - `victory-relay`: **50.72 ms/frame** in `read-backs and lists`. ### Top symbolized hotspots: 1. **`windows_core::unknown::clone` (2.9% leaf) + `HostHeap::keep` (2.6% leaf) = 5.5% of all 6 `victory-list-*` threads:** - Called on every slot inside `HostHeap::make_listed` (`self.keep(index, made.kept.clone())`), doing COM `AddRef`/`Release` + `Mutex` lock even when the slot already holds the same `ID3D12Resource` (or `None`). 2. **`HostHeap::make_listed` (11.5% inclusive) + `CopyDescriptorsSimple(1, ...)` (2.9% leaf):** - Does 2 `HashMap` lookups (`contains_key` + `[&words]`) per slot and issues 1 `CopyDescriptorsSimple(1, ...)` COM call per descriptor instead of batching contiguous table slots with `CopyDescriptors`. 3. **`HostHeap::clear_twin` (0.7% leaf on `victory-list-*`, 3.7% leaf on `victory-heap-sync`):** - Unconditional `AtomicBool::swap(false, Relaxed)` causes cache-line bouncing on slots that are already `false`. 4. **`State::tables_done` lock contention (`~13,400` dynamic tables/frame):** - Calls `release_dynamic` in a per-table loop, acquiring `SHADER_HEAPS.read()` + `HostHeap::next.lock()` ~13,400 times/frame on `victory-relay` while all 6 `victory-list-*` threads contend on `HostHeap::next.lock()` in `HostHeap::dynamic()`. 5. **`list::execute_indirect` (28.6% inclusive of `victory-list-*`):** - With `VICTORY_PORT_CONSTANTS_ORDER`, **2,375–2,646** indirect executions/frame are clamped individually with batching/windowing disabled (`self.window = None`, `self.batch = None`). A finer-grained hazard check (only breaking a batch when a buffer written since batch start overlaps the indirect args/count range) could be a big CPU win on 8-core CPUs without bringing back tree flicker. ### Local Rust patches prototyped & tested (403/403 `victory-gpu` unit tests passing) I prototyped fixes for items #1–#4 (plus thread-local scratch buffer reuse in `texback::land` and cached `HostHeap::gpu`): - `HostHeap::keep_ref` with `kept_raw: Box<[AtomicUsize]>` lock-free fast path. - `HostHeap::make_listed_batched` (single `Entry` lookup + stack `ListedBatch` flushing contiguous runs via `CopyDescriptors`). - `HostHeap::clear_twin` guarded by `made.load(Relaxed)` before `swap`. - `release_dynamic_many` / `HostHeap::release_many` releasing all dynamic slots per heap under a single lock in `State::tables_done`. Happy to share the diff / open a PR if any of these are useful!
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:33:37 +00:00
Author
Owner

@⁠i1u5 on GitHub · 2026-11-27 02:13 UTC · original

Same specs here, maxes out at 6 fps and starts eating into pagefile, crashes at the end of the prologue always.

**@⁠i1u5** on GitHub · 2026-11-27 02:13 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/438#issuecomment-7207938762) Same specs here, maxes out at 6 fps and starts eating into pagefile, crashes at the end of the prologue always.
Author
Owner

@⁠RimuruTmp4st on GitHub · 2026-11-27 02:57 UTC · original

Bro can you help me i dont understand how to download gta 6 every assets same pc specs we are you can write my discord pls mortalingblack

**@⁠RimuruTmp4st** on GitHub · 2026-11-27 02:57 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/438#issuecomment-7208579698) Bro can you help me i dont understand how to download gta 6 every assets same pc specs we are you can write my discord pls mortalingblack
This discussion has been locked. Commenting is limited to contributors.
No description provided.