60 fps plan #43

Open
opened 2026-11-26 03:31:31 +00:00 by github-bot · 1 comment
Owner

@⁠Punpude on GitHub · 2026-11-26 00:05 UTC · original

================================================================================
VIctory: FPS Improvement Plan — Target 60 FPS
================================================================================

Target: 60 FPS = 16.6 ms per frame.
Current best public: 19-22 FPS (46-53 ms) on RX 7900 XTX, water scene,
Series X profile.
Current best visual-correctness fork: 5-8 FPS on RX 9070 XT, with sun
shadows, lamps, whole vehicles, distant trees working.
Gap to 60 FPS: about 3x. Both CPU preparation and GPU work must shrink.

This document is self-contained. No version history. It states the current
measured state, every method ever found (proven, promising, experimental,
rejected), the priority order to reach 60 FPS, implementation details for
the highest-priority items, measurement protocol, invariants, and open
questions. Hand it to an AI; it knows what to do.


================================================================================
SECTION 1 — CURRENT MEASURED STATE ACROSS SIX PROJECTS
================================================================================

All measurements 2026-11-25, all using the same title (Series 1.0.2.1)
from user-supplied dumps.

PROJECT A — vi-pc-combo (RTX 5060 Ti 16 GB, 32 GB RAM)
  Series S: about 100 ms (10-12 FPS), card 77 ms.
  Series X: 267 ms (3.7 FPS), card 171 ms, rest 96 ms.
  RTX 5080: 232 ms. RTX 4090: 193-196 ms.
  Key finding: rest ~100 ms does not shrink with faster card.

PROJECT B — victory-amd (RX 7800 XT 16 GB, Ryzen 7 7700X)
  Series X: 2-3 FPS. One DXGI_ERROR_DEVICE_HUNG after about 5.5 min.

PROJECT C — VItoriaBr (RTX 5060 Ti 16 GB, Ryzen 7 5700X, 40 GB)
  Series S: up to 6 FPS, zero TDR, 3,500-4,400 draws/frame.
  Full 3D world rendering: water, vehicles, HUD, subtitles.
  DXIL coverage: 25,741 / 25,758 (99.9%). PSOs accepted: 25,344 (98.5%).

PROJECT D — DexNom (RX 7900 XTX)
  Ray tracing Chapter 1 City: 1.03 FPS (969 ms) with write tracking fix,
  0.29 FPS (3,469 ms) without. 3.58x speedup from write tracking.

PROJECT E — VIctory-7900XTX (RX 7900 XTX 24 GB, i9-12900K, 64 GB, 1440p)
  BEST PUBLIC RESULT.
  Menus/videos/loading: 30 FPS.
  Prologue indoors: 50-75 ms (13-20 FPS).
  First mission with boat: 46-53 ms (19-22 FPS).
  Street chase: 100-165 ms (6-10 FPS).
  Outdoors on foot: 60-90 ms.
  Flying: 42-57 ms.
  Longest session: 41 minutes, no crash.
  Memory: 40-46 GB private (64 GB RAM recommended).
  Started at 280 ms two days earlier.

PROJECT F — AMD RDNA4 fork (RX 9070 XT 16 GB, Ryzen 7 9800X3D, 64 GB)
  Series X: 5-8 FPS (7.2-7.7 standing still in 8,800-draw scene).
  Visual correctness: sun/lamps shadows work, whole vehicles, distant
  trees, water, sky.
  In-game phone broken: world unlit (black), phone empty outline.
  Memory: 22 GB RAM + over 16 GB VRAM.
  A driver timeout happened once.

INTERPRETATION. Different forks trade off differently. VIctory-7900XTX
is optimized for raw FPS at some cost to visual correctness. The RDNA4
fork has more visual features working but lower FPS. To reach 60 FPS,
take the raw FPS wins from VIctory-7900XTX and combine them with the
correctness work from the RDNA4 fork.


FRAME BREAKDOWN (55 ms water frame, VIctory-7900XTX):

PREPARING THREAD: 48 ms — primary wall.
  Steps of lists: 18 ms (refreshes of host copies 10).
  Steps done on card: 7 ms.
  Waiting for descriptor records: 6 ms.
  Asking write watch: 5 ms.
  Copies in card memory: 4 ms.
  Title bytes under shader writes: 4 ms.

CARD: 41 ms busy — second wall.

LIST CALLS: 36,000 per frame, 230 ms of work across 8 threads.
  Street chase: 67,000 calls, 430 ms.

DESCRIPTOR RECORDS: 400,000 slots looked at, 40,000 mirrored per frame,
  most empty.

LANDING SHADER WRITES: 16 MB per frame as dwords, own thread.

NEW BOTTLENECK (RDNA4 fork PIX capture): the game's five recording
threads take turns on the descriptor view table as a mutex — 6,600
context switches/second each. Also: the submitting thread prepares each
batch while the GPU is idle, and bindless_plan walks every slot on every
submission.


================================================================================
SECTION 2 — THE FRAMEWORK ("THE ONE IDEA")
================================================================================

On console, CPU and GPU share one memory. On PC they do not. Every large
cost is one of four:

1. Noticing writes of the title (write watch, guards).
2. Noticing writes of shaders (hashes on card, compares on CPU).
3. Moving them.
4. Waiting until an order is safe.

Gains come from making each narrower (dwords, not pages), wider (threads,
AVX2), or later (on the card, behind the frame) — in that order of size.

Measured progression from VIctory-7900XTX over two days:

  Descriptor records left to draws                 280 ms   ->  ~124
  Hash passes over card copies, 64 threads        card 79   ->  66
  Preparing on own thread, refreshes spread         103     ->  75
  List calls written down, 8 threads (VICTORY_THIN) 75      ->  68
  Submissions joined, card steps, textures ahead    68      ->  ~63
  AVX2 compares on 6 threads                        14      ->  4-7
  Stores into guarded memory looked at first        69      ->  ~6

RDNA4 fork adds (separate chain):

  VICTORY_HOIST_CLAMPS (7 clamps recorded before draw list)
                                                    225 GPU  ->  ~80
  VICTORY_STRETCH (single-64KiB-view pages in place) 36 copy ->  12
  Snapshot/copy-back on threads (PikPakPik #18)      43      ->  33
  VICTORY_ASYNC_SUBMIT (submissions return early)   200-238  -> 150-186

Each figure is from the run in which it was measured. They overlap and
do not simply add up.


================================================================================
SECTION 3 — COMPLETE CATALOGUE
================================================================================

Statuses:
  PROVEN        measured on real hardware, gain confirmed.
  PROMISING     theory plus indirect data, not yet tested on this title.
  EXPERIMENTAL  from HPC or adjacent fields, may not apply.
  REJECTED      measured as harmful or useless; do not repeat.
  OPEN          proposed, not yet tested or disproven.


--------------------------------------------------------------------------------
3.1 PREPARING THREAD (about 48 ms; the primary wall)
--------------------------------------------------------------------------------

P1. PREPARING THREAD SPLIT OVER TWO THREADS IN A ROW.
  Status: OPEN (VIctory-7900XTX next-step).
  What: split one submission's steps across two worker threads in
    pipeline.
  Why: 48 ms of 55 ms frame; it is the wall.
  How: separate "steps of lists" (18 ms) from "descriptor records"
    (6 ms) and "write watch" (5 ms); run on two threads with ordering
    constraints. Use VICTORY_GPU_TIMING=1 to measure.
  Impact: potentially HIGH (48 -> 24-30 ms).
  Risk: ordering between steps; cross-thread coordination may eat gain.

P2. ASK NEXT SUBMISSION WHILE SENDING THIS ONE.
  Status: OPEN (VIctory-7900XTX).
  What: pipeline submissions — while this one is sent, prepare the next.
  Why: overlap prepare with submit.
  How: ring of 2-3 slots. Note: RDNA4 fork found VICTORY_ASYNC_SUBMIT
    (async in general) is faster there (200 -> 150 ms). Pipelining is not
    the same as async.
  Impact: potentially HIGH.
  Risk: TDR if two submissions accumulate more than 2 s.

P3. VIEW CARD'S OWN BUFFERS WHERE FILLS COPY THEM.
  Status: OPEN (VIctory-7900XTX).
  What: where the code copies into a card buffer, view it directly.
  Why: avoids the copy.
  How: D3D12 placed resources; only where coherence is guaranteed.
  Impact: MEDIUM.
  Risk: coherence.
  Related: RDNA4 fork's VICTORY_STRETCH already does this for pages
    shown as single 64 KiB views (36 -> 12 ms). Extend the pattern to
    buffers.

P4. CHEAPER WRITE TRACKING PER BUFFER BOUND.
  Status: PROMISING (vi-pc-combo).
  What: ask only about buffers actually bound in frame, not all ~9.4 GB.
  Why: 9,440 MB asked, 127 MB found changed. 98.7% waste.
  How: track bound buffers per frame; query only those.
  Impact: HIGH (removes 25 ms ask + 43 ms copy on irrelevant data).
  Risk: miss a buffer CPU reads without bind.

P5. WRITE DETECTION JOURNAL.
  Status: PROMISING (vi-pc-combo).
  What: guards answer from a journal (exception handler stamps block;
    asking reads journal range) instead of walking blocks.
  Why: 150,000 blocks walked/frame, 212 written. Walk dominates.
  How: exception handler stamps; asking reads journal; blocks re-armed
    when copy takes them.
  Impact: MEDIUM (up to ~25 ms).
  Risk: fault per write; may be overhead if writes are frequent.

P6. LAZY COPY-BACK.
  Status: PROMISING (vi-pc-combo).
  What: copy back only what CPU actually reads (page faults, lazy),
    instead of everything a shader might have written.
  Why: today 68 MB copy-back in 8 landings, each waits for card. If only
    what CPU reads is copied back, CPU and card overlap; frame tends to
    max(card, rest), not sum.
  How: track readbacks; page fault on CPU read triggers copy of just that
    range; rest not copied.
  Impact: potentially HIGH.
  Risk: fault rate on CPU reads; may be slower for read-heavy workloads.

P7. WRITE-WATCH + EXPLICIT DIRTY RANGES.
  Status: PROVEN (all forks).
  What: MEM_WRITE_WATCH / GetWriteWatch + explicit note_written(addr,
    len) from DirectStorage and file paths.
  Why: removes fault per read and full scan per submission.
  How: VirtualAlloc with MEM_WRITE_WATCH; take_write_watch() via
    GetWriteWatch; note_written from intercepted writers; merge adjacent.
  Impact: HIGH (core of vi-pc-combo progress).
  Risk: GetWriteWatch may return nothing after read-protection; verify
    switch and fallback.

P8. DESCRIPTOR RECORDS LEFT TO DRAWS.
  Status: PROVEN (VIctory-7900XTX).
  What: descriptor records of draws' tables left to the draws themselves.
  Why: 280 -> ~124 ms. Single biggest measured win.
  How: keep descriptor mirroring per-draw (not centralized).
  Impact: HIGH (156 ms).
  Risk: descriptor lifetime.

P9. PREPARING ON OWN THREAD; REFRESHES AND RECORDS SPREAD.
  Status: PROVEN (VIctory-7900XTX).
  What: preparing on dedicated thread; refreshes/records on worker
    threads.
  Why: 103 -> 75 ms.
  Impact: HIGH (28 ms).

P10. VICTORY_THIN — LIST CALLS WRITTEN DOWN, 8 THREADS TRANSLATE.
  Status: PROVEN (VIctory-7900XTX).
  What: title threads record calls (not execute); worker pool translates.
  Why: 36,000 calls/frame = 230 ms work; street chase 67,000 calls,
    430 ms.
  Impact: MEDIUM (75 -> 68 ms).
  Risk: worker pool contention.

P11. SUBMISSIONS JOINED.
  Status: PROVEN (VIctory-7900XTX).
  What: VICTORY_JOIN_PARTS; parts of one submission prepared by worker
    thread and joined.
  Impact: MEDIUM (68 -> ~63 ms).

P12. AVX2 COMPARES ON 6 THREADS.
  Status: PROVEN (VIctory-7900XTX).
  What: compare title bytes under shader writes with AVX2, 6 threads.
  Why: 14 -> 4-7 ms.
  Impact: MEDIUM.

P13. STORES INTO GUARDED MEMORY LOOKED AT FIRST.
  Status: PROVEN (VIctory-7900XTX).
  What: before a store into guarded memory, look first; reset fewer
    guards.
  Why: 69 ms thread time -> ~6 ms.
  Impact: HIGH (63 ms).

P14. HASH PASSES OVER CARD COPIES, 64 THREADS.
  Status: PROVEN (VIctory-7900XTX).
  Why: card 79 -> 66 ms.
  Impact: MEDIUM (13 ms).

P15. DESCRIPTOR SYNC FINGERPRINT.
  Status: PROVEN (victory-amd, commit 9376fd6).
  What: cheap fingerprint instead of full heap scan; leave draw-table
    slots to draws.
  Why: 70-220 -> ~3 ms.
  Impact: HIGH.
  Risk: fingerprint collision.

P16. DESCRIPTOR RECORDS MIRRORED.
  Status: PROVEN (victory-amd PR #305).
  What: plain-byte descriptor records mirrored before each submission.
  Why: ~40,000 records/frame unannounced; slots empty or stale. Without
    this, first room does not render.
  Impact: HIGH (correctness + FPS).

P17. GUARD OVER EVERY VIEW OF A PAGE.
  Status: PROVEN (victory-amd, Spexivus/joroyt/tightfall; RDNA4 fork
    reimplemented).
  What: write through one view of a physical page seen by copies through
    other views.
  Why: 0.8-1.0 million such writes per 5-min run, each left a copy stale.
    Fixed a rare lost write (6 of 200 stress runs -> 0 of 603). On RDNA4:
    whole vehicles and distant trees working since.
  Impact: HIGH (correctness).

P18. KERNEL READS READ-BESIDE.
  Status: PROVEN (victory-amd, Joshua Odom).
  What: kernel reads into title memory read beside and copied in.
  Why: without it, DirectStorage requests fail with
    ERROR_INVALID_USER_BUFFER (0x800706f8); title stops seconds after
    first world frame.
  Impact: HIGH (stability).

P19. TEXTURE STAGING LOCK PER RANGE.
  Status: PROVEN (DexNom).
  What: per-range lock instead of global mapping lock.
  Why: 846 ms wait -> 77 microseconds for unrelated texture.
  Impact: HIGH (10,987x for unrelated texture).

P20. CPU SUBMISSION WORKERS (VICTORY_FILL_WORKERS=4).
  Status: PROVEN on synthetic (DexNom); PROMISING on gameplay.
  What: 4 CPU workers for eligible upload batches; parallel prelude
    recording.
  Why: 28,279 uploads batched 512: 11.67 vs 17.64 ms (1.51x).
  Impact: MEDIUM.
  Risk: gameplay may not benefit.

P21. VICTORY_HOIST_CLAMPS — CLAMPS RECORDED BEFORE DRAW LIST.
  Status: PROVEN (RDNA4 fork).
  What: clamps of a run of indirect draws are recorded in a list before
    the drawing list; they run one after another. Default 7
    (VICTORY_HOIST_CLAMPS=0 for each before its draw).
  Why: 225 -> ~80 ms of GPU time per frame in a scene of 9,000 draws.
  Impact: HIGH (145 ms GPU).
  Risk: correctness of clamp order; visual A/B required.

P22. VICTORY_STRETCH — PAGES SHOWN ONE 64 KiB VIEW AT A TIME USED IN
     PLACE.
  Status: PROVEN (RDNA4 fork).
  What: pages follow one another in their section; stretch mapped once at
    an address of ours; host heap opened there. VICTORY_STRETCH=0
    disables. Ranges made of several stretches still copied.
  Why: copy-back 36 -> 12 ms/frame.
  Impact: HIGH (24 ms).
  Risk: section continuity requirement; copy fallback for non-contiguous.

P23. MULTI-THREADED SNAPSHOT AND COPY-BACK OF SHADER-WRITTEN TILES.
  Status: PROVEN (RDNA4 fork; PikPakPik PR #18).
  Why: copy-back 43 -> 33 ms. Frame rate did not move here (bottleneck
    elsewhere), but the work is free.
  Impact: MEDIUM (foundation).

P24. DOUBLED DYNAMIC DESCRIPTOR SLOTS.
  Status: PROVEN (RDNA4 fork).
  Why: tables of heavy frames fit; eliminates dropped draws (16,384+ in
    some scenes).
  Impact: HIGH (correctness/FPS).
  Related: MIN_DYNAMIC = 2^18 from VItoriaBr — same idea.

P25. DESCRIPTOR VIEW TABLE: READ-WRITE LOCK INSTEAD OF MUTEX.
  Status: PROMISING (RDNA4 fork PIX observation).
  What: PIX capture showed the game's five recording threads take turns
    on the descriptor view table as a mutex — 6,600 context switches/
    second each.
  Why: replacing mutex with rwlock allows concurrent reads, exclusive
    writes.
  How: RwLock (or equivalent); measure context switches with PIX.
  Impact: MEDIUM-HIGH (depends on contention pattern).
  Risk: writer starvation.

P26. THIN LTO + ONE CODEGEN UNIT.
  Status: PROVEN (RDNA4 fork; Key-rs PR #96).
  What: lto = "thin", codegen-units = 1 in release profile.
  Why: faster code, no behavioural change.
  Impact: LOW-MEDIUM (frame time).
  Risk: longer compile time.

P27. EIGHT ROMAINHEDOUIN PRs (#24, #25, #27, #28, #29, #30, #33, #34).
  Status: PROVEN (RDNA4 fork).
  What: take repeated work out of the draw path.
  Why: none moved frame time measurably here; nothing broke. Safe
    foundation.
  Impact: LOW (safe cleanup).

P28. VICTORY_ASYNC_SUBMIT (RDNA4 fork).
  Status: PROVEN (RDNA4 fork).
  What: title's submissions return before host GPU done; what they owe is
    finished at the next wait. VICTORY_ASYNC_SUBMIT=0 disables.
  Why: 200-238 -> 150-186 ms in same place. BUT gained nothing until
    VICTORY_HOIST_CLAMPS (P21) and VICTORY_STRETCH (P22) were in.
  Impact: HIGH (50 ms) but requires the other two.
  Risk: cross-submission ordering; must be paired with stability gates.

P29. VICTORY_JOIN_PARTS — JOIN SPLIT SUBMISSION PARTS.
  Status: PROVEN (VIctory-7900XTX).
  What: parts of one submission prepared by worker thread and joined.
  Impact: MEDIUM.


--------------------------------------------------------------------------------
3.2 CARD (about 41 ms; the second wall)
--------------------------------------------------------------------------------

C1. EMPTY DRAW ELIMINATION.
  Status: PROMISING (vi-pc-combo).
  What: 3,046 mesh records/frame; 1,148 (38%) ask for nothing;
    291 indirect dispatch; 175 (60%) run nothing. Each pays per-record
    work (~24 microseconds).
  Why: skip empty records — a layer change, not GPU culling (expensive).
  How: after culling pass, before ExecuteIndirect, check argument buffer
    count; skip if 0. Or early-out in mesh shader.
  Impact: HIGH (~40 ms).
  Risk: stale counts (title memory outdated; card writes later). Read
    after fence.

C2. REAL OCCLUSION QUERIES.
  Status: PROMISING (vi-pc-combo issue #10).
  What: game never culls because its queries always return "visible";
    timestamps are not the card's; dynamic resolution never reacts.
  Why: real queries let game's own culling kick in; many of 5,000 draws
    skipped.
  How: D3D12 query heap; ResolveQueryData after fence; real samples-
    passed. VICTORY_REAL_OCCLUSION=1.
  Impact: HIGH.
  Risk: game's culling too aggressive; visual regressions.

C3. MERGED INDIRECT DRAWS.
  Status: PROMISING (vi-pc-combo).
  What: drawing a run of records with one call took 25-30 ms off a 5080
    (upper bound, picture broken). Correct version needs each draw's
    descriptor table as heap index.
  Why: 5,000 single-record draws x 16-18 microseconds = ~80 ms.
  How: translate descriptor table -> heap index (translator work); merge
    records.
  Impact: HIGH.

C4. VICTORY_INDIRECT_WINDOW OFF BY DEFAULT.
  Status: PROVEN (vi-pc-combo).
  What: currently costs 20-25 ms + spends indirect budgets (wall bug).
    Turn off.
  Impact: MEDIUM (+20-25 ms).
  Risk: walls may disappear without windows in some launches. Test 2+
    launches each way.

C5. HAIR PHYSICS OFF SWITCH.
  Status: OPEN (vi-pc-combo).
  What: VICTORY_HAIR_PHYSICS=0; 6 hair sim programs dropped -> 258 vs
    270 ms.
  Impact: MEDIUM (16 ms if run14; less now).

C6. RT OFF SWITCH.
  Status: OPEN (vi-pc-combo).
  What: VICTORY_RT=0; 5 RT programs dropped -> 245 vs 270 ms.
  Impact: MEDIUM (26 ms if run14; less now).

C7. VICTORY_DISPLAY_MODE 1080p.
  Status: PROVEN (VItoriaBr).
  What: internal rendering resolution 1080p; window upscales on Present.
  Why: 4K to 1080p = 4x fewer pixels. Works after CPU-side fixes.
  Impact: HIGH (2x vs 4K).

C8. SHADER CLEAN-UP PASSES.
  Status: PROVEN (victory-amd; RDNA4 fork from ba8697aa).
  What: dead code, constant folding, reuse of values, branch facts, one
    read per place.
  Why: ~43% host instruction count reduction; ~20 ms GPU/frame. All
    25,623 shaders pass validator.
  How: VICTORY_SHADER_OPT=0 disables. Note: first launch after change
    rebuilds every pipeline (minutes of black world); water missing until
    game is started again.
  Impact: MEDIUM (20 ms).

C9. PRE-BUILD PIPELINES.
  Status: PROVEN (all forks).
  What: after loader knows containers, queue all keys from previous run's
    early list before first frame. Per-frame budget only for discovered
    keys.
  Why: 1,200+ pipelines created on first frame; 270-660 s of session
    full of more-than-200-ms frames while pipelines are made.
  How: prebuild(keys); budget() Duration default 500 ms. victory warm
    --used in RDNA4 fork.
  Impact: HIGH (stability).

C10. SMALL BUFFERS ON CARD (VICTORY_CARD_BUFFERS_MIN_KB=64).
  Status: OPEN (VIctory-7900XTX next-step).
  Why: avoids copies.
  Impact: MEDIUM.

C11. SKIP PASSES THAT RUN FOR NOTHING WITHOUT RAYS.
  Status: OPEN (VIctory-7900XTX next-step).
  Why: wasted GPU work.
  Impact: MEDIUM.

C12. ANTI-TDR SUBMISSION CHUNKING.
  Status: PROVEN (VItoriaBr).
  What: submit 1 command list per fence; zero out-of-range DispatchMesh
    args; caps 4096 groups, BUDGET = 2^22. VICTORY_SHADER_LOOP_LIMIT
    default 4096 in release.
  Why: avoid accumulating more than 2 s of GPU work (TDR).
  Impact: HIGH (stability).

C13. SHADOW BUFFER STATE TRACKING.
  Status: PROVEN (VItoriaBr).
  What: each Shadow buffer tracks state via prelude() and intra-list
    barriers: GENERIC_READ for VB/IB/CBV/SRV/Indirect args+counter,
    UNORDERED_ACCESS for UAV/clamp.
  Why: previously indirect::done() left shared title buffers in
    UNORDERED_ACCESS — IASetVertexBuffers and barrier mismatch (id=527)
    errors.
  Impact: HIGH (stability).
  Test: D3D12 Debug Layer check.

C14. DESCRIPTOR RECYCLING.
  Status: PROVEN (VItoriaBr).
  What: slots return to heap immediately after synchronous host.execute;
    MIN_DYNAMIC to 2^18 on capped heaps.
  Why: zero dropped draws (was 16,384+).
  Impact: HIGH (correctness).

C15. GUARD PASS_BUDGET IN HEAP_TEXTURES.
  Status: PROVEN (VItoriaBr).
  Why: prevents watchdog 30 s timeout on 1st 3D frame.
  Impact: HIGH (stability).

C16. TEXTURE UPLOAD ON COPY QUEUE; SLOT SHOWS AFTER UPLOAD.
  Status: PROVEN (VIctory-7900XTX; RDNA4 fork).
  What: VICTORY_SHOW_AFTER=1.
  Why: ended device loss every ~16 min.
  Impact: HIGH (stability).

C17. VICTORY_QUEUE2 + VICTORY_COPY_PLAIN.
  Status: PROVEN (VItoriaBr).
  What: copy-back 205 -> 65-78 ms (~3x); ~12,400 in-place copies/frame;
    textures ~40 -> ~20 ms.
  How: VICTORY_QUEUE2=1, VICTORY_COPY_PLAIN=1. Note: combine with
    VICTORY_ASYNC_SUBMIT carefully (see P28).

C18. VICTORY_TEXTURE_NO_WAIT.
  Status: PROVEN (VItoriaBr).
  What: removes stalls on lock during texture refresh. 900-3,700 ->
    6-25 ms (2 orders of magnitude).
  Impact: HIGH.

C19. VICTORY_PAGE_WRITES=slots.
  Status: PROVEN (VItoriaBr).
  What: re-enqueue placed textures uploaded before title finished
    writing their bytes. 7,000+ textures/session recovered.
  Why: black skin/ground disappears.
  Impact: HIGH (visuals).

C20. DEPTH-ONLY PIPELINES WARM AHEAD.
  Status: PROMISING (DexNom).
  Why: reduces missing shadows during loading.
  Impact: MEDIUM.

C21. STREAMED TEXTURES WITH MIDDLE PAGES RESIDENT.
  Status: PROMISING (DexNom).
  How: merge overlapping notifications; rescan if queue fills.
  Impact: MEDIUM.

C22. CONTIGUOUS DESCRIPTOR SLOTS SEARCH.
  Status: PROMISING (DexNom).
  Impact: MEDIUM.

C23. TEXTURE READ-BACK.
  Status: PROVEN (VIctory-7900XTX; Geckomacabre; RDNA4 fork from fxceless
    f5c03f3b).
  What: textures shaders write and CPU reads go back to title memory.
    VICTORY_TEXTURE_BACK (on by default).
  Why: ocean height/displacement maps never brought back; boats sank.
    With read-back, boat stays up through whole run.
  Impact: HIGH (correctness).

C24. LANDING SHADER WRITES ON OWN THREAD.
  Status: PROVEN (VIctory-7900XTX).
  What: VICTORY_LAND; what shaders wrote comes back beside write guards,
    by dwords, own thread.
  Why: 16 MB/frame as dwords, own thread.
  Impact: MEDIUM.

C25. CARD STEPS (BUFFER FILLS ON CARD).
  Status: PROVEN (VIctory-7900XTX).
  What: VICTORY_CARD_STEPS; fills needing bytes still on card done on
    card.
  Impact: MEDIUM.

C26. BIND TUPLES PER-FRAME (PSO CACHE).
  Status: PROVEN (pattern from RPCS3/Xenia).
  What: cache PSOs per (shader, blend state, RT format); invalidate only
    on change.
  Impact: MEDIUM (stalls).

C27. SHADER PIPELINE CACHE LIMIT.
  Status: PROMISING (RPCS3/Eden/Citron).
  What: hard LRU limit on pipelines (e.g. 4096 or 2 GB).
  Why: prevents OOM stalls and unbounded growth.
  Impact: MEDIUM.

C28. BUFFER OPTIONS OFF BY DEFAULT.
  Status: PROMISING (RPCS3).
  Why: "Download" operations have severe performance consequences.
  Impact: MEDIUM.

C29. TARGETED WAIT (SharpEMU).
  Status: PROMISING (SharpEMU, PS5 emulator).
  What: when reading GPU-written data, wait only for the specific
    submission that wrote it, not the whole queue or frame fence.
  Why: SharpEMU found Unreal render thread spent a third of its time
    waiting on readbacks.
  How: Timeline stores address ranges per submission; on readback, find
    relevant submission; wait only its fence.
  Impact: MEDIUM-HIGH.

C30. GIANT BUFFERS IN SYSTEM RAM.
  Status: PROMISING (KytyPlus).
  What: allow large buffers to live in system RAM to fit within 12 GB
    VRAM.
  Impact: MEDIUM (allows launch, doesn't speed up).

C31. VIEW HEAP LIMIT WORKAROUND (#21 in RDNA4 fork).
  Status: PROVEN (RDNA4 fork).
  What: NVIDIA tier-2 cap is 1,000,000 views. Title can request more.
  How: report title heap size / host cap / slots lost at creation.
    Remap root descriptor tables past cap into the dynamic area (already
    landed as #21). Title's user_value stays opaque to translated
    shaders.
  Impact: HIGH (correctness; prevents device hang on first-boot screens
    and black frames in world).
  Open: directly-indexed heaps (ResourceDescriptorHeap) past cap still
    unsolved — needs either index-compaction (patch lower.rs index
    arithmetic; costly) or working-set migration (only correct if usage
    is temporally clustered — a streaming world is not). Sampler heap
    2,048 limit also unsolved: HostHeap::new returns None losing the heap
    outright.

C32. VICTORY_AMBIENT — DEPTH-BASED AMBIENT WITH SKY-FOLLOWING.
  Status: PROVEN (RDNA4 fork; from Belobug idea).
  What: replaces indirect diffuse with a constant while ray passes do not
    run. VICTORY_AMBIENT=0.6 default. VICTORY_AMBIENT_TINT=r,g,b.
    VICTORY_AMBIENT_SHADE=strength,radius (depth-based shading in
    creases, grainy). VICTORY_AMBIENT_SKY=off for constant;
    gain,least,power follows sky dome (gain * mean^power + least with
    sky hue — day/night/noon auto). VICTORY_AMBIENT_REFLECT=0.5 holds
    reflections to a part of the constant.
  Why: without it, game's resolve pass left bright magenta on leaves,
    cloth, paper, and blocks of color indoors.
  Impact: visual (required for playability without RT).
  Risk: not real RT; constant across frame; grainy in creases.

C33. VICTORY_PRESENT_TARGET=1x1:1 — RDNA4 FORK RUN PRESET.
  Status: PROVEN (RDNA4 fork).
  What: tiny present target; part of their run command. Unclear exactly
    what it does; verify before adopting.
  Impact: unknown.


--------------------------------------------------------------------------------
3.3 RAY TRACING (for Series X full parity)
--------------------------------------------------------------------------------

RT1. RT WRITE TRACKING FIX.
  Status: PROVEN (DexNom).
  What: CPU declared every mapped guest memory writable even when a
    traversal shader only read. Corrected translator distinguishes guest
    writes from UAV output. 3,469 -> 969 ms (3.58x). 12,793 -> 2,655 MB
    compared. 2,036 -> 95 ms wait.
  Impact: HIGH.

RT2. RT MEMORY DIRECTORY GROWTH.
  Status: PROVEN (DexNom, partial).
  What: grows beyond 1,023 backing buffers. Per-record views.
  Impact: MEDIUM (partial; City still exhausts).

RT3. RT BUILDER HONOR THREAD COUNTS.
  Status: PROVEN (DexNom).
  What: dispatches honor game's thread counts; mask excess lanes.
  Impact: HIGH (part of RT1).

RT4. GUEST ADDRESSES FROM RT DESCRIPTORS.
  Status: PROMISING (DexNom).
  What: resolve guest addresses from RT descriptors; preserve raw buffer
    offsets.
  Impact: MEDIUM.

RT5. WHOLE-RAY DXR (RayQuery).
  Status: PROMISING (original plan).
  What: dxr() branch; whole rays via hardware; per-node traversal stays
    software.
  Impact: HIGH for RT.

RT6. BLAS/TLAS BUILD + REFIT.
  Status: PROMISING (original plan).
  What: Scene { build, refit }; dirty-only refit.
  Impact: HIGH for RT.

RT7. SHADOW AND GI PASSES.
  Status: PROMISING (original plan).
  What: table-driven passes_for(console).
  Impact: HIGH for visuals.

RT8. RT MEMORY IN RESIDENCY BUDGET.
  Status: PROMISING (original plan).
  What: note_rt_bytes(), rt_bytes(); BLAS/TLAS counted.
  Impact: stability.

RT9. SPLIT DISPATCHES MORE THAN 65,535 GROUPS.
  Status: PROVEN (victory-amd).
  What: final gather at 2560x1440 asks 115,200 groups -> split.
  Impact: HIGH for that scene.


--------------------------------------------------------------------------------
3.4 SHADERS AND TRANSLATOR
--------------------------------------------------------------------------------

S1. STATIC SAMPLER SELECTION ACROSS UNIFORM BRANCH.
  Status: PROVEN (DexNom, VItoriaBr).
  What: phi of path at join (true from second predecessor), not
    reach[pred].
  Why: +40 shader variants recovered.
  Impact: MEDIUM.

S2. WAVE64 LANE MASK SAVE/RESTORE RECOGNITION.
  Status: PROVEN (DexNom).
  Why: +1 voxel visibility shader.
  Impact: LOW.

S3. INTEGER RT BLENDING BYPASS.
  Status: PROVEN (DexNom; RDNA4 fork PR #45, pgm1207/Arvi23).
  What: mixed render targets retain individual write masks when integer
    target bypasses blending.
  Why: windshield-wiper pipeline failed creation; now made.
  Impact: MEDIUM.

S4. VERTEX INTERPOLATION + SIGNATURE ORDERING.
  Status: PROVEN (DexNom, VItoriaBr).
  What: preserve game's vertex output interpolation; ISG1/OSG1 order
    matches console.
  Why: all 2,191 archive vertex shaders passed DXIL (was 39 failed),
    including 18 water shaders.
  Impact: MEDIUM-HIGH.

S5. 2x2 PIXEL GROUP EDGE PRESERVATION.
  Status: PROVEN (DexNom, RDNA4 fork).
  What: pixel shaders reading neighboring 2x2 pixels preserve values at
    triangle edges. Cube-map sampling correct mip level for explicit
    gradients. RDNA4 fork extended to helper pixels (wave reads return 0
    from helper pixels on AMD — showed as lines on car paint, glass,
    skin).
  Impact: visual.

S6. FIVE SHADOW COMPUTE SHADERS.
  Status: PROVEN (DexNom, RDNA4 fork).
  Why: missing shadows.
  Impact: visual.

S7. MIMG a16 + LDS BYTE/HALF OPERATIONS.
  Status: PROVEN (VItoriaBr).
  What: image_sample_b, _cl/_o, image_gather4_l, ds_read_{u8,i8,u16,i16},
    ds_write_{b8,b16}{,_d16_hi}.
  Impact: MEDIUM.

S8. PER-ROW INTERPOLATION MODE RECONCILIATION.
  Status: PROVEN (VItoriaBr).
  Why: ~48 dxil.dll errors cleared.
  Impact: MEDIUM.

S9. CUBEMAP image_sample_d_cl.
  Status: PROVEN (VItoriaBr).
  What: grads = 2 for cubemaps (kind == 5).
  Why: +27 shaders.
  Impact: MEDIUM.

S10. MESH SHADER / LDS / BARRIER SAFETY ON NVIDIA WAVE32.
  Status: PROVEN (VItoriaBr).
  What: mesh_prologue caps setMeshOutputCounts; LDS RDNA2 OOB semantics;
    s_barrier memory fence (TGSM_FENCE/UAV_FENCE).
  Impact: HIGH (stability).

S11. SLOT_VIEWS ROOT SRV (252).
  Status: PROVEN (VItoriaBr).
  What: descriptor read as data at runtime-calculated index.
  Why: +40 shaders.
  Impact: MEDIUM.

S12. WAVE64 PINNING.
  Status: PROMISING (Leonida: 23,841 of 26,503 shaders are wave64).
  What: programs depending on wave-wide ops pin WaveSize(64).
  Why: on NVIDIA wave32, cross-half operations in vertex/pixel/geometry
    are approximate.
  Impact: 0 FPS; prevents visual bugs.

S13. LOOP CAP AS DIAGNOSTIC.
  Status: PROMISING (original plan).
  What: 2^20 clamp only for unprovable loops.
  Impact: MEDIUM.

S14. WIDE MEMORY OPS.
  Status: PROMISING (original plan).
  What: two adjacent aligned dwords -> one 64/128-bit access.
  Impact: LOW-MEDIUM.

S15. UNIFORM BRANCHES.
  Status: PROMISING (original plan).
  Impact: LOW-MEDIUM.

S16. BIT-EXACT SHADER VERIFICATION.
  Status: PROVEN (XPortPC).
  What: compare translated shader against CPU reference instruction-by-
    instruction.
  Impact: 0 FPS; guarantees optimizations don't break result.

S17. #UD HANDLER FOR ZEN 2 INSTRUCTIONS.
  Status: PROMISING (XPortPC).
  What: SHA-NI, SSE4a, CLZERO, RDPID, CLWB may be absent on host CPU;
    emulate.
  Impact: 0 FPS; prevents crash.

S18. SHADER CACHE FINGERPRINT (30 SOURCE FILES).
  Status: PROVEN (DexNom).
  Impact: stability.

S19. VICTORY_SHADER_BUILD_OF — REUSE SHADER CACHE ACROSS BUILDS.
  Status: PROMISING (RDNA4 fork, diagnostics).
  What: shader cache entries of another build can be reused.
  Impact: stability/warm-up.

S20. WAVE64 -> WAVE32 SPLIT FORM (wave64-on-wave32.md).
  Status: PROVEN (RDNA4 fork; steps 1, 2, 4, 5 in).
  What: one console wave64 runs as two host wave32 waves of the same
    thread group. WaveSize(32); console lane = flat thread % 64, half =
    bit 5.
    - In-half only (step 4): DPP16, DPP8, ds_swizzle, v_permlane16,
      v_permlanex16 need nothing.
    - Cross-half (step 5): ballots, v_readlane, v_readfirstlane,
      v_writelane, v_mbcnt exchange through groupshared memory
      (Lower::exchange), two barriers.
    - Console flow (CONSOLE_FLOW): whole program runs as on console —
      both halves take every branch the same way, loops run while any
      lane does. structure::structure_console builds per-lane booleans;
      Structured::execs gives EXEC bit at each vector instruction;
      branches use s_cbranch_* with each half's ballot exchanged.
  Why: NVIDIA reports wave range as 32..32; wave64 programs cannot run
    as-is. This lets 25,623 shaders run on NVIDIA.
  Impact: HIGH (correctness on NVIDIA).
  Still open: groups of several console waves (need per-console-wave
    arrival counters with double-buffered slots and bounded wait), LDS
    in multi-wave groups, whole-wave sections, ds_(b)permute.
  Test: hand-assembled GFX10 programs run twice — native wave64 (AMD
    RDNA reference) and split form (NVIDIA); compared buffer-for-buffer.

S21. VICTORY_SHADER_OPT FROM ba8697aa.
  Status: PROVEN (RDNA4 fork).
  What: clean-up passes (dead code, constant folding, single instruction
    per value, branch facts, single read per place).
  Why: all 25,623 emitted shaders pass validator.
  Impact: ~20 ms GPU/frame.
  Risk: water missing until game started again after first launch
    post-change.

S22. VICTORY_AMBIENT_SKY, _TINT, _SHADE, _REFLECT, _FILE.
  Status: PROVEN (RDNA4 fork).
  What: ambient tuning described in C32.
  Impact: visual.

S23. VICTORY_SHADER_PATCH, VICTORY_SHADER_SWAP (diagnostics).
  Status: PROVEN (RDNA4 fork, diagnostics).
  What: patch one word of a shader's machine code before translation;
    replace shader containers by files.
  Impact: diagnostic.


--------------------------------------------------------------------------------
3.5 HPC AND ADJACENT FIELDS (EXPERIMENTAL)
--------------------------------------------------------------------------------

X1. EMBER ADAPTIVE PROMOTION.
  Status: EXPERIMENTAL (Ember, HPC framework).
  What: hardware GPU access counters drive promotion of hot regions to
    VRAM; stop promotion before memory fills (avoid thrashing).
  Why: Ember was up to 21x faster than standard UVM on data-reuse
    workloads (k-means).
  How: D3D12 does not expose per-page access counters directly. Research
    needed (D3D12_QUERY_TYPE_TIMESTAMP + counters per draw — granularity
    differs).
  Impact: potentially HIGH; applicability unclear.
  Risk: D3D12 may not expose needed API.

X2. DREAM DEVICE-DRIVEN PAGE FAULTS.
  Status: EXPERIMENTAL (HPC; requires special hardware).
  What: GPU threads handle page fault/migration instead of CPU/OS.
  Why: DREAM showed up to 4x speedup for latency-sensitive applications.
  How: requires RDMA-capable device (GPUDirect RDMA). Not directly
    applicable to consumer PCIe GPU.
  Impact: potentially HIGH on special hardware.
  Risk: not applicable to consumer GPU.

X3. PRE-EVICTION + PREFETCHING.
  Status: EXPERIMENTAL (HPC patents and research).
  What: prefetch based on virtual address locality; pre-evict before
    data is needed, based on past frame patterns.
  Why: reduces page thrashing; hides PCIe latency.
  How: track access patterns per frame; predict next; pre-load.
  Impact: potentially HIGH.
  Risk: unpredictability; may worsen if prediction wrong.

X4. SPARSE MAPPING MIGRATION.
  Status: EXPERIMENTAL (ShadPS4 plan, PS5PCEM).
  What: reserve large virtual ranges, map on demand; migrate blocks
    between "game memory" and VRAM via vkQueueBindSparse (Vulkan) or
    D3D12 Residency API.
  Why: predictable block migration instead of unpredictable page faults.
  How: on D3D12 — IDXGIDevice3::Trim/MakeResident/Evict + custom
    allocator.
  Impact: potentially HIGH.
  Risk: D3D12 Residency API less flexible than vkQueueBindSparse.

X5. 16 KB PAGES FOR GPU DATA.
  Status: EXPERIMENTAL (PS5PCEM).
  What: 16 KB pages for GPU-originated data.
  Why: PS5 uses 16 KB pages; may matter for compatibility.
  How: third span variant after 64K and 2M.
  Impact: unknown.
  Risk: not tested on this title.

X6. REBAR FOR LATENCY-CRITICAL UPLOADS ONLY.
  Status: PROMISING (RPCS3 uses for PS3).
  What: use ReBAR for latency-critical uploads (not for general
    bidirectional exchange).
  Why: RPCS3 uses this to emulate PS3's more direct memory access. For
    general exchange, single-copy failed (see REJECTED).
  How: identify which uploads are latency-critical; use ReBAR for them.
  Impact: MEDIUM.
  Risk: ReBAR non-coherent; explicit flush needed.

X7. LIBUMSH PORTABLE LIBRARY.
  Status: EXPERIMENTAL (libumsh, EuroSys 2027).
  What: portable library for shared CPU-GPU memory that abstracts
    platform differences.
  Why: solves problem of applications adapting to different memory
    models.
  How: use as dependency.
  Impact: unknown.
  Risk: not tested on this title.

X8. CXL / NVLINK-C2C COHERENT INTERCONNECTS.
  Status: EXPERIMENTAL (hardware, not software).
  What: coherent interconnects instead of PCIe.
  Why: CXL latency ~170-250 ns, bandwidth ~32 GB/s per Gen5 x8 lane. GPU
    can read non-resident page in place.
  How: requires hardware. Not applicable to consumer PCs.
  Impact: HIGH if hardware available.
  Risk: not applicable to consumer setups.

X9. COHERENT MEMORY PROBE BEFORE SINGLE-COPY.
  Status: PROMISING (SharpEMU).
  What: before enabling single-copy, probe not only ReBAR but also
    coherence of host-visible memory.
  Why: on Apple M-series single-copy works because memory is coherent;
    on PCIe GPU it is not.
  How: probe: allocate test buffer, GPU write, CPU read without flush —
    if visible, coherent; else not.
  Impact: determines whether X10 is safe.

X10. SINGLE-COPY ON COHERENT ADAPTERS ONLY.
  Status: PROMISING for coherent; REJECTED for PCIe.
  What: single-copy enabled only if X9 probe says coherent.
  Why: on PCIe GPU single-copy is 2-4x slower (card reads PC memory over
    bus). On coherent (Apple M-series) works.
  How: capability switch (auto/on/off); default auto (by probe).
  Impact: HIGH if applicable; 0 if not (fallback to shadow).
  Risk: PCIe not coherent. Definitively slower there.

X11. 2 MiB LARGE PAGES + ONE-COPY FAST PATH.
  Status: PROMISING (KytyPlus showed TLB reduction).
  What: 2 MiB spans in page table, fast path for access inside one copy.
  Why: fewer TLB misses, fewer dependent loads.
  How: SPAN_64K=0, SPAN_2M=1; entry(span, heap, low); shader index =
    address >> (16 + span). Fast path: if (address - base) < limit, read
    copy; else page table.
  Impact: MEDIUM.
  Risk: alignment requirement; dead code if no 2 MiB copies.

X12. RESIDENCY BUDGET + EVICTION.
  Status: PROVEN (vi-pc-combo: VRAM 14.6/15.3 GB full).
  What: budget from QueryVideoMemoryInfo (80% local); eviction of host
    copies and textures at frame boundary; never evict in-flight.
  Why: without this, paging blows up frame time. Condition for
    stability.
  How: Budget { local_used, local_budget, nonlocal_used, nonlocal_budget };
    pressure; over_limit; Candidate { id, bytes, last_used, in_flight };
    choose (oldest first, never in_flight); evict_to.
  Impact: HIGH (prevents catastrophe).
  Risk: evict in-flight = use-after-free.

X13. PLACED TEXTURE LIFETIME.
  Status: PROVEN (VItoriaBr PAGE_WRITES=slots).
  What: release only on title free/remap, not on "not used this frame".
  Why: title may reuse address without unmap.
  How: registry keyed by (address, desc, size, generation); release on
    free/remap; new placement at same address replaces old.
  Impact: MEDIUM.
  Risk: release too early = missing texture.

X14. DETILE ONLY DIRTY PAGES.
  Status: PROMISING (vi-pc-combo: texture pass 80-95% memory).
  What: detile only changed pages, not whole texture.
  Why: direct work savings.
  How: page = 64 KiB run of tiled source; detile_pages(tex, pages).
  Impact: MEDIUM-HIGH.
  Risk: wrong block computation = artifacts.

X15. TARGETED WAIT. (See C29.)

X16. GIANT BUFFERS IN SYSTEM RAM. (See C30.)


--------------------------------------------------------------------------------
3.6 DISPLAY / VISUAL (required for parity, not FPS)
--------------------------------------------------------------------------------

V1. HDR (VICTORY_HDR=1; DXGI_FORMAT_R10G10B10A2_UNORM).
V2. Audio reverb.
V3. Speech decode and mix.
V4. Trigger rumble.
V5. Dynamic resolution (requires real timestamps — see C2).
V6. VICTORY_HAIR=1 (RDNA4 fork run preset; exact effect unclear).
V7. PHONE BROKEN — with in-game phone out, world unlit (black), phone is
    empty outline. Open; unfixed.
V8. TEXTURE CAP 1024 px default. Streamed textures capped at 1024 (512,
    256 as VRAM fills). At 2048, 16 GB card goes 1-2 GB over budget.
    VICTORY_TEXTURE_MAX=2048 to try.
V9. MEMORY 33 GB COMMIT AFTER 15 MIN DRIVE (7 GB title + 8 GB textures
    + buffer copies + system backing of VRAM). 22 GB baseline at load.


================================================================================
SECTION 4 — REJECTED — DO NOT REPEAT
================================================================================

Measured harmful or useless on this title.

R1. Single-copy on PCIe GPU (VICTORY_INPLACE). 2-4x slower. Card reads
    PC memory over PCIe.
R2. VICTORY_INDIRECT_WINDOW on by default. 20-25 ms + wall bug.
R3. VICTORY_BVH_BUILDER on. Crash after ~18 s with FIRSTLANE_OWN.
R4. VICTORY_CARD_FETCH_INFLIGHT on. 1.9-2.6 FPS vs 3.5-6.0 (off).
R5. Joining equal draws into instanced draws. Only 2 of 3,584 continuing
    draws are equal to the one before. Floor by pipeline: 1,008 groups
    — nothing to join.
R6. Faster card as solution. RTX 4070 Ti = same frame time as 5060 Ti
    (Series S). RTX 5080 only -13% for +100% card. RTX 4090 -27% for
    +200%.
R7. VICTORY_WIDE_REFRESH alone. No gain; Windows calls serialize in
    kernel. Works only with VICTORY_TEXTURE_NO_WAIT.
R8. VICTORY_LATE_WAIT_LISTS=256. Slower.
R9. VICTORY_CARD_WINDOWS_MB=3584. No gain; picture darkens.
R10. Unordered early pipelines for everything. AMD compiler crashed.
R11. Series S profile as default on Series X machine. Slower.
R12. Smaller textures. Slower.
R13. Second drawing queue. Slower.
R14. VICTORY_ASYNC_SUBMIT=0. Slower in RDNA4 fork (opposite direction:
    async in general is faster there).
R15. Mapping pages on 16 threads. No more pages mapped, frames longer.
R16. Scalar buffer loads 4 dwords (VICTORY_SHADER_OPT=127). No gain.
R17. Wave sizes. Nothing to 0.1 ms.
R18. Fused multiply-adds. Nothing to 0.1 ms.
R19. Fast reciprocals. Nothing to 0.1 ms.
R20. Raw picked buffers. Nothing to 0.1 ms.
R21. Leaving out barriers. Nothing to 0.1 ms.
R22. VICTORY_RDNA_FLOAT. 0.8 ms. Not worth it.
R23. Running console shader code natively on card. Impossible — Windows
    driver takes no raw code; two generations differ; Vulkan host ends
    at same compiler. Remaining gain from shader code estimated under
    1 ms.
R24. VICTORY_PANEL on-screen panel. Costs some FPS. Off by default; F3
    shows on demand.
R25. VICTORY_RAYS=1 (RDNA4 fork). Builders translate and run; device
    removed after ~1.5 min. Two causes fixed with AMD's Radeon GPU
    Detective, but run now ends on a read at an address no resource ever
    had. Do not enable.
R26. VICTORY_RAYS=1 — "do not expect light from it" (RDNA4 fork). Even
    when it doesn't crash, no RT light.


================================================================================
SECTION 5 — PRIORITY ORDER TO REACH 60 FPS
================================================================================

Target: 16.6 ms. Current: 46-53 ms water on RX 7900 XTX (19-22 FPS),
5-8 FPS on RX 9070 XT (visual-correctness fork). Both preparing thread
(48 ms) and card (41 ms) must fall. Reducing only one is not enough.

PHASE 1 — Attack the preparing thread (48 -> 24-30 ms).
  Expected: 46-53 -> ~30-40 ms (~25-33 FPS on water).
  Tasks: P1 (thread split), P2 (pipeline next submission), P3 (view card
    buffers), P4 (bound-buffer tracking), P5 (write detection journal),
    P6 (lazy copy-back), P25 (descriptor rwlock), P28+P21+P22 (async
    submit + hoist clamps + stretch — these three are a chain and
    together give 50 ms).
  Measure each separately. Combine carefully.

PHASE 2 — Attack the card (41 -> 25-30 ms).
  Expected: ~30-40 -> ~22-28 ms (~36-45 FPS).
  Tasks: C1 (empty draw elimination), C2 (real occlusion), C3 (merged
    indirect), C4 (INDIRECT_WINDOW off), C7 (1080p), C8 (shader clean-
    up), C10 (small buffers), C11 (skip no-ray passes), C21
    (VICTORY_HOIST_CLAMPS — already counted in Phase 1 chain, but do
    here if not).

PHASE 3 — Parallel and supporting (foundations).
  Run alongside Phases 1 and 2.
  P7-P19 (all foundation items from VIctory-7900XTX and victory-amd —
    already proven, verify against current code).
  P23 (multi-thread copy-back).
  P24 (doubled dynamic slots).
  P26 (thin LTO).
  P27 (romainhedouin PRs).
  P29 (join parts).
  C12-C25 (all stability and correctness items).
  C31 (view heap limit workaround — required for NVIDIA tier-2).
  S1-S23 (all shader fixes; S20 wave64 split is the big one for NVIDIA;
    S21 shader clean-up is ~20 ms).
  V1-V9 (visual parity).
  C32 (ambient) — required for playability without RT.

PHASE 4 — Ray tracing for Series X full parity.
  Only after Phases 1-3.
  RT1-RT9, all remaining shader fixes needed for 100% coverage.

PHASE 5 — Experimental (only if Phases 1-4 do not reach 60).
  X9 (coherent probe) then X10 if coherent.
  X3 (pre-eviction) if access patterns are predictable.
  X4 (sparse migration) if residency pressure persists.
  X11 (2 MiB pages + fast path) if page-table load is measurable.
  X6 (ReBAR for latency-critical uploads) if upload latency shows.
  X1, X2, X5, X7, X8 — only with hardware/API that supports them.

EXPECTED FPS TRAJECTORY (must be measured on target):

  Current                    46-53 ms (19-22 FPS)   RX 7900 XTX water
  After Phase 1              ~30-40 ms (25-33)       Preparing shrinks
  After Phase 2              ~22-28 ms (36-45)       Card shrinks
  After Phase 3              ~18-24 ms (42-55)       Combined + stability
  After Phase 4 (RT off)     ~18-22 ms (45-55)       RT excluded
  After Phase 4 (RT on)      depends on RT cost      RT is for parity,
                                                     not FPS
  60 FPS target              16.6 ms                  Reachable with
                                                     Phase 1+2+3 plus
                                                     tuning; RT may
                                                     require Phase 5

For 60 FPS specifically: prioritize Phase 1, Phase 2, and Phase 3
stability work. Phase 4 and 5 are for visual parity, not raw FPS.


================================================================================
SECTION 6 — IMPLEMENTATION DETAILS FOR TOP PRIORITY ITEMS
================================================================================

P1. PREPARING THREAD SPLIT OVER TWO THREADS.

  Files: host.rs, queue.rs, descriptor/host.rs, draw.rs, memory.rs,
    shadow.rs, watch.rs.

  Interface:

    pub struct PreparePipeline {
        pub steps_a: StepQueue,   // list steps, refreshes (18 ms)
        pub steps_b: StepQueue,   // descriptor records, write watch
                                  //   (6+5 ms)
    }
    impl PreparePipeline {
        pub fn split(&mut self, submission: &Submission)
            -> (Vec<Step>, Vec<Step>);
        pub fn run(&mut self, a: &StepQueue, b: &StepQueue)
            -> PreparedSubmission;
    }

  Test: A/B on water scene, 3 runs each way; metric preparing_us p50/p95
    from FrameSample; expected 48 -> 24-30 ms. Gate: p95 down more than
    30%, no card-side regression.

P2. PIPELINE NEXT SUBMISSION.

  Files: host.rs (execute), fence.rs (wait_value), queue.rs
    (account_frame, retire_frame).

  Interface:

    pub struct SubmissionSlot {
        pub fence_value: u64,
        pub pending_copy_back: Vec<Range>,
        pub pending_release: Vec<ResourceId>,
    }
    impl Host {
        pub fn execute_pipelined(&mut self, submission: Submission)
            -> SubmissionSlot;
    }

  Test: A/B pipelined vs sync; metrics frame_us, gpu_us, prepare_us;
    TDR test 10+ min. Risk: TDR if two submissions accumulate more than
    2 s; combine carefully with VICTORY_ASYNC_SUBMIT (RDNA4 fork — that
    one returns before GPU done, which is different from pipelining).

P25. DESCRIPTOR VIEW LOCK: RWLOCK.

  Files: descriptor/host.rs.
  What: replace Mutex with RwLock (or equivalent). Measure context
    switches with PIX (RDNA4 fork measured 6,600/s per thread on mutex).
  Test: A/B with PIX capture; count context switches; measure prepare_us.
    Risk: writer starvation.

P28 + P21 + P22 — THE ASYNC-SUBMIT CHAIN.

  These three must be combined to see the gain (RDNA4 fork: 200-238 ->
    150-186 ms, but only with P21+P22 in).

  - VICTORY_ASYNC_SUBMIT — submissions return before GPU done; owed work
    finished at next wait. Default on; =0 disables.
  - VICTORY_HOIST_CLAMPS — clamps of a run of indirect draws recorded in
    a list before the drawing list; run one after another. Default 7;
    =0 for each before its draw. GPU 225 -> 80 ms in a 9,000-draw scene.
  - VICTORY_STRETCH — pages shown one 64 KiB view at a time used in
    place; stretch mapped once at an address of ours; host heap opened
    there. Copy-back 36 -> 12 ms. =0 disables. Ranges made of several
    stretches still copied.

  Test: A/B baseline vs each individually vs all three; verify no TDR,
    no visual regression, no dropped draws. This chain alone is worth
    about 50-100 ms on the water scene in the RDNA4 fork.

C1. EMPTY DRAW ELIMINATION.

  Files: list.rs, indirect.rs, draw.rs.
  What: after culling compute pass, before ExecuteIndirect, read
    argument buffer count; if 0, skip. Or early-out in mesh shader.
  Test: synthetic record with count=0 skipped; count>0 drawn. Verify
    with counters (RDNA4 fork already counts "indirect mesh dispatches
    ... of N mesh records a frame on the card M ask for any group").
  Gate: 38% of mesh and 60% of indirect skipped; no missing geometry;
    p95 improves.

C2. REAL OCCLUSION QUERIES.

  Files: query.rs, list.rs.
  What: D3D12 query heap; ResolveQueryData after fence; real samples-
    passed. VICTORY_REAL_OCCLUSION=1.
  Test: synthetic query visible -> 1; occluded -> 0. A/B; feature
    checklist + user sign-off on visuals (game's culling may be
    aggressive).
  Gate: draws submitted drops significantly; no visible geometry
    disappears.

C3. MERGED INDIRECT DRAWS.

  Files: victory-shader/src/emit/lower.rs (descriptor table -> heap
    index), list.rs, indirect.rs.
  What: translate descriptor table access to heap index (translator
    work); then merge ExecuteIndirect records.
  Test: A/B; visual comparison. RDNA4 fork upper bound was 25-30 ms off
    a 5080 (picture broken); correct version should retain picture.


================================================================================
SECTION 7 — MEASUREMENT PROTOCOL
================================================================================

Every change must be measured.

1. Baseline: 2 runs before change. Compare with
   victory compare --max-delta-percent 5.
2. Change behind a switch (env var or config).
3. 2 runs after. Compare with baseline.
4. Metrics to record (FrameSample, 10 columns):
   - frame_us p50/p95
   - gpu_us
   - prepare_us
   - copy_back_us
   - commit_bytes
   - vram_bytes
   - dropped_draws
   - faults
   - queue_waits
5. If p95 improves and no regression: keep.
6. If p95 not improved: revert.
7. Record in progress log.

LAUNCH RULES:
  - Claims about visual bugs (walls, shadows, dark objects, phone)
    require 2+ launches each way. One launch is not evidence.
  - VICTORY_SYNC_SUBMIT=1 restores baseline for bisection.
  - Timing runs (VICTORY_GPU_TIMING=1) turn off late wait and run each
    list alone — frame is slower. Use only for breakdown, not FPS.
  - TDR test: 10+ min in world, check crashes.log for DEVICE_HUNG.
  - Use PIX timing capture (RDNA4 fork found more in an hour than a day
    of own counters). Look for mutex contention (descriptor view table,
    6,600 context switches/s per thread).


================================================================================
SECTION 8 — INVARIANTS
================================================================================

Must hold after every change. Check before merging forward.

1. Host::execute does not wait INFINITE in steady state.
2. PLACED_TEXTURES has a release path and bounded total.
3. GetWriteWatch has a guard fallback.
4. Residency counts all allocations, including RT.
5. VICTORY_SYNC_SUBMIT=1 restores baseline.
6. No draw dropped without gate failure.
7. VICTORY_INPLACE=0 on discrete GPU.
8. In-flight depth is 3 or less.
9. Do not increase refresh threads (WIDE_REFRESH alone is useless).
10. Faster GPU is not a solution (rest does not shrink with card).
11. Every change behind a switch.
12. Every change with before/after measurement.
13. Bit-exact shader verification passes before and after any shader
    optimization.
14. RT bytes visible in residency budget.
15. Frame boundary checksum does not diverge between
    VICTORY_SYNC_SUBMIT=0 and =1.
16. VICTORY_INDIRECT_WINDOW=0 default.
17. VICTORY_CARD_FETCH_INFLIGHT=0.
18. VICTORY_BVH_BUILDER=0.
19. VICTORY_RAYS=0 (crashes after 1.5 min in RDNA4 fork).
20. Do not join equal draws (only 2 of 3,584 are equal).
21. WIDE_REFRESH only with TEXTURE_NO_WAIT.
22. host::execute: 1 list per fence (anti-TDR) unless P28 chain
    verified.
23. RT write tracking default on.
24. CPU workers verified on gameplay, not just upload benchmarks.
25. Wall bug: several launches each way before any claim.
26. VICTORY_ASYNC_SUBMIT requires P21+P22 in place (RDNA4 fork —
    gained nothing alone).
27. Wave64 split form (S20) must not regress on NVIDIA or AMD; test
    both.
28. VICTORY_SHADER_OPT change invalidates cache; first run rebuilds
    pipelines (minutes of black world); water may be missing until
    game restarted.
29. VICTORY_STRETCH only where section is contiguous; fallback to copy
    for scattered.


================================================================================
SECTION 9 — OPEN QUESTIONS FOR THE AI
================================================================================

1. P1 (preparing thread split): exact dependency graph between steps?
   Which can run in parallel without breaking GPU order?
2. P2 (pipelined submissions): does this conflict with RDNA4 fork's
   VICTORY_ASYNC_SUBMIT=1 (which is faster there)? Test both separately
   and together.
3. P5 (write detection journal): overhead of exception handler on every
   write? Measure fault rate.
4. P6 (lazy copy-back): fault rate on CPU reads? If high, overhead may
   exceed savings.
5. C1 (empty draw elimination): can counts be read cheaply after fence?
   Or must culling shader early-out?
6. C2 (real occlusion): how aggressive is the game's culling? Will
   visible geometry disappear?
7. C3 (merged indirect): what translator work for descriptor table ->
   heap index? How large is it?
8. RT1 (RT write tracking): does 3.58x reproduce on NVIDIA? AMD and
   NVIDIA have different memory models.
9. X9 (coherent probe): how to test without game dump? Synthetic?
10. X1 (Ember): D3D12 has no per-page access counters. What to use?
11. X3 (pre-eviction): how to predict next frame's access pattern? What
    patterns exist in this title?
12. Series S vs Series X: if Series S is default, does it reach 60 FPS
    sooner? Or does user want Series X parity?
13. C7 (DISPLAY_MODE 1080p): does it work as lever on target hardware
    after CPU fixes? Test 1080p/1440p/4K.
14. P25 (descriptor rwlock): does PIX show mutex contention still
    present with rwlock? Measure context switches after change.
15. C31 (view heap limit): directly-indexed heaps past 1,000,000 views
    — index-compaction (patch lower.rs) vs working-set migration. Which
    is feasible?
16. S20 (wave64 split): multi-wave groups (need per-console-wave
    arrival counters with double-buffered slots). How to bound wait?
17. V7 (phone broken): why is world unlit with phone out? Related to
    ambient? To a missing pass?
18. V8 (texture cap): can the cap be raised on 24 GB cards without
    overshoot? At what VRAM headroom?
19. P21 (VICTORY_HOIST_CLAMPS): does hoisting 7 clamps change
    correctness in any scene? Visual A/B.
20. P28 chain: exactly how much does each of P21, P22, P28 contribute?
    RDNA4 fork says "gained nothing until the next two changes were in"
    — measure the marginal contributions.


================================================================================
SECTION 10 — DELIVERABLE SUMMARY
================================================================================

This document gives the AI:

- Current measured state across six independent projects.
- Exact frame breakdown on target hardware.
- Every method ever found, with status, source, and expected impact.
- Priority order to reach 60 FPS (Phases 1-5).
- Implementation details for the top 6 items (P1, P2, P25, P28-chain,
  C1, C2, C3).
- Measurement protocol.
- Invariants that must hold.
- Open questions that need answers.

TO REACH 60 FPS:

- Phase 1: Attack preparing thread (P1-P6, P25, P28-chain).
  Expected: 25-33 FPS.
- Phase 2: Attack card (C1-C11). Expected: 36-45 FPS.
- Phase 3: Stability + correctness + shader coverage (P7-P19, P23-P27,
  P29, C12-C33, S1-S23, V1-V9). Expected: 42-55 FPS.
- Phase 4: RT parity (RT1-RT9). Visual parity, may not help FPS.
- Phase 5: Experimental (X1-X16). Only if Phases 1-4 do not reach 60.

Do not skip Phase 1 and 2. They are the measured walls.

Do not repeat REJECTED items (Section 4). They are measured dead ends.

Do not claim success without A/B measurement (Section 7).

Do not merge forward without passing invariants (Section 8).

Use PIX timing capture. RDNA4 fork found more in an hour of PIX than a
day of own counters.

Combine P21+P22+P28 as a chain. RDNA4 fork: gained nothing alone.

Verify S20 on both AMD and NVIDIA. Wave64 split is essential for NVIDIA
but may have AMD-specific edge cases.

Do not enable VICTORY_RAYS=1. Crashes after 1.5 min; no light even when
stable.

================================================================================
END
================================================================================
**@⁠Punpude** on GitHub · 2026-11-26 00:05 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/43) ``` ================================================================================ VIctory: FPS Improvement Plan — Target 60 FPS ================================================================================ Target: 60 FPS = 16.6 ms per frame. Current best public: 19-22 FPS (46-53 ms) on RX 7900 XTX, water scene, Series X profile. Current best visual-correctness fork: 5-8 FPS on RX 9070 XT, with sun shadows, lamps, whole vehicles, distant trees working. Gap to 60 FPS: about 3x. Both CPU preparation and GPU work must shrink. This document is self-contained. No version history. It states the current measured state, every method ever found (proven, promising, experimental, rejected), the priority order to reach 60 FPS, implementation details for the highest-priority items, measurement protocol, invariants, and open questions. Hand it to an AI; it knows what to do. ================================================================================ SECTION 1 — CURRENT MEASURED STATE ACROSS SIX PROJECTS ================================================================================ All measurements 2026-11-25, all using the same title (Series 1.0.2.1) from user-supplied dumps. PROJECT A — vi-pc-combo (RTX 5060 Ti 16 GB, 32 GB RAM) Series S: about 100 ms (10-12 FPS), card 77 ms. Series X: 267 ms (3.7 FPS), card 171 ms, rest 96 ms. RTX 5080: 232 ms. RTX 4090: 193-196 ms. Key finding: rest ~100 ms does not shrink with faster card. PROJECT B — victory-amd (RX 7800 XT 16 GB, Ryzen 7 7700X) Series X: 2-3 FPS. One DXGI_ERROR_DEVICE_HUNG after about 5.5 min. PROJECT C — VItoriaBr (RTX 5060 Ti 16 GB, Ryzen 7 5700X, 40 GB) Series S: up to 6 FPS, zero TDR, 3,500-4,400 draws/frame. Full 3D world rendering: water, vehicles, HUD, subtitles. DXIL coverage: 25,741 / 25,758 (99.9%). PSOs accepted: 25,344 (98.5%). PROJECT D — DexNom (RX 7900 XTX) Ray tracing Chapter 1 City: 1.03 FPS (969 ms) with write tracking fix, 0.29 FPS (3,469 ms) without. 3.58x speedup from write tracking. PROJECT E — VIctory-7900XTX (RX 7900 XTX 24 GB, i9-12900K, 64 GB, 1440p) BEST PUBLIC RESULT. Menus/videos/loading: 30 FPS. Prologue indoors: 50-75 ms (13-20 FPS). First mission with boat: 46-53 ms (19-22 FPS). Street chase: 100-165 ms (6-10 FPS). Outdoors on foot: 60-90 ms. Flying: 42-57 ms. Longest session: 41 minutes, no crash. Memory: 40-46 GB private (64 GB RAM recommended). Started at 280 ms two days earlier. PROJECT F — AMD RDNA4 fork (RX 9070 XT 16 GB, Ryzen 7 9800X3D, 64 GB) Series X: 5-8 FPS (7.2-7.7 standing still in 8,800-draw scene). Visual correctness: sun/lamps shadows work, whole vehicles, distant trees, water, sky. In-game phone broken: world unlit (black), phone empty outline. Memory: 22 GB RAM + over 16 GB VRAM. A driver timeout happened once. INTERPRETATION. Different forks trade off differently. VIctory-7900XTX is optimized for raw FPS at some cost to visual correctness. The RDNA4 fork has more visual features working but lower FPS. To reach 60 FPS, take the raw FPS wins from VIctory-7900XTX and combine them with the correctness work from the RDNA4 fork. FRAME BREAKDOWN (55 ms water frame, VIctory-7900XTX): PREPARING THREAD: 48 ms — primary wall. Steps of lists: 18 ms (refreshes of host copies 10). Steps done on card: 7 ms. Waiting for descriptor records: 6 ms. Asking write watch: 5 ms. Copies in card memory: 4 ms. Title bytes under shader writes: 4 ms. CARD: 41 ms busy — second wall. LIST CALLS: 36,000 per frame, 230 ms of work across 8 threads. Street chase: 67,000 calls, 430 ms. DESCRIPTOR RECORDS: 400,000 slots looked at, 40,000 mirrored per frame, most empty. LANDING SHADER WRITES: 16 MB per frame as dwords, own thread. NEW BOTTLENECK (RDNA4 fork PIX capture): the game's five recording threads take turns on the descriptor view table as a mutex — 6,600 context switches/second each. Also: the submitting thread prepares each batch while the GPU is idle, and bindless_plan walks every slot on every submission. ================================================================================ SECTION 2 — THE FRAMEWORK ("THE ONE IDEA") ================================================================================ On console, CPU and GPU share one memory. On PC they do not. Every large cost is one of four: 1. Noticing writes of the title (write watch, guards). 2. Noticing writes of shaders (hashes on card, compares on CPU). 3. Moving them. 4. Waiting until an order is safe. Gains come from making each narrower (dwords, not pages), wider (threads, AVX2), or later (on the card, behind the frame) — in that order of size. Measured progression from VIctory-7900XTX over two days: Descriptor records left to draws 280 ms -> ~124 Hash passes over card copies, 64 threads card 79 -> 66 Preparing on own thread, refreshes spread 103 -> 75 List calls written down, 8 threads (VICTORY_THIN) 75 -> 68 Submissions joined, card steps, textures ahead 68 -> ~63 AVX2 compares on 6 threads 14 -> 4-7 Stores into guarded memory looked at first 69 -> ~6 RDNA4 fork adds (separate chain): VICTORY_HOIST_CLAMPS (7 clamps recorded before draw list) 225 GPU -> ~80 VICTORY_STRETCH (single-64KiB-view pages in place) 36 copy -> 12 Snapshot/copy-back on threads (PikPakPik #18) 43 -> 33 VICTORY_ASYNC_SUBMIT (submissions return early) 200-238 -> 150-186 Each figure is from the run in which it was measured. They overlap and do not simply add up. ================================================================================ SECTION 3 — COMPLETE CATALOGUE ================================================================================ Statuses: PROVEN measured on real hardware, gain confirmed. PROMISING theory plus indirect data, not yet tested on this title. EXPERIMENTAL from HPC or adjacent fields, may not apply. REJECTED measured as harmful or useless; do not repeat. OPEN proposed, not yet tested or disproven. -------------------------------------------------------------------------------- 3.1 PREPARING THREAD (about 48 ms; the primary wall) -------------------------------------------------------------------------------- P1. PREPARING THREAD SPLIT OVER TWO THREADS IN A ROW. Status: OPEN (VIctory-7900XTX next-step). What: split one submission's steps across two worker threads in pipeline. Why: 48 ms of 55 ms frame; it is the wall. How: separate "steps of lists" (18 ms) from "descriptor records" (6 ms) and "write watch" (5 ms); run on two threads with ordering constraints. Use VICTORY_GPU_TIMING=1 to measure. Impact: potentially HIGH (48 -> 24-30 ms). Risk: ordering between steps; cross-thread coordination may eat gain. P2. ASK NEXT SUBMISSION WHILE SENDING THIS ONE. Status: OPEN (VIctory-7900XTX). What: pipeline submissions — while this one is sent, prepare the next. Why: overlap prepare with submit. How: ring of 2-3 slots. Note: RDNA4 fork found VICTORY_ASYNC_SUBMIT (async in general) is faster there (200 -> 150 ms). Pipelining is not the same as async. Impact: potentially HIGH. Risk: TDR if two submissions accumulate more than 2 s. P3. VIEW CARD'S OWN BUFFERS WHERE FILLS COPY THEM. Status: OPEN (VIctory-7900XTX). What: where the code copies into a card buffer, view it directly. Why: avoids the copy. How: D3D12 placed resources; only where coherence is guaranteed. Impact: MEDIUM. Risk: coherence. Related: RDNA4 fork's VICTORY_STRETCH already does this for pages shown as single 64 KiB views (36 -> 12 ms). Extend the pattern to buffers. P4. CHEAPER WRITE TRACKING PER BUFFER BOUND. Status: PROMISING (vi-pc-combo). What: ask only about buffers actually bound in frame, not all ~9.4 GB. Why: 9,440 MB asked, 127 MB found changed. 98.7% waste. How: track bound buffers per frame; query only those. Impact: HIGH (removes 25 ms ask + 43 ms copy on irrelevant data). Risk: miss a buffer CPU reads without bind. P5. WRITE DETECTION JOURNAL. Status: PROMISING (vi-pc-combo). What: guards answer from a journal (exception handler stamps block; asking reads journal range) instead of walking blocks. Why: 150,000 blocks walked/frame, 212 written. Walk dominates. How: exception handler stamps; asking reads journal; blocks re-armed when copy takes them. Impact: MEDIUM (up to ~25 ms). Risk: fault per write; may be overhead if writes are frequent. P6. LAZY COPY-BACK. Status: PROMISING (vi-pc-combo). What: copy back only what CPU actually reads (page faults, lazy), instead of everything a shader might have written. Why: today 68 MB copy-back in 8 landings, each waits for card. If only what CPU reads is copied back, CPU and card overlap; frame tends to max(card, rest), not sum. How: track readbacks; page fault on CPU read triggers copy of just that range; rest not copied. Impact: potentially HIGH. Risk: fault rate on CPU reads; may be slower for read-heavy workloads. P7. WRITE-WATCH + EXPLICIT DIRTY RANGES. Status: PROVEN (all forks). What: MEM_WRITE_WATCH / GetWriteWatch + explicit note_written(addr, len) from DirectStorage and file paths. Why: removes fault per read and full scan per submission. How: VirtualAlloc with MEM_WRITE_WATCH; take_write_watch() via GetWriteWatch; note_written from intercepted writers; merge adjacent. Impact: HIGH (core of vi-pc-combo progress). Risk: GetWriteWatch may return nothing after read-protection; verify switch and fallback. P8. DESCRIPTOR RECORDS LEFT TO DRAWS. Status: PROVEN (VIctory-7900XTX). What: descriptor records of draws' tables left to the draws themselves. Why: 280 -> ~124 ms. Single biggest measured win. How: keep descriptor mirroring per-draw (not centralized). Impact: HIGH (156 ms). Risk: descriptor lifetime. P9. PREPARING ON OWN THREAD; REFRESHES AND RECORDS SPREAD. Status: PROVEN (VIctory-7900XTX). What: preparing on dedicated thread; refreshes/records on worker threads. Why: 103 -> 75 ms. Impact: HIGH (28 ms). P10. VICTORY_THIN — LIST CALLS WRITTEN DOWN, 8 THREADS TRANSLATE. Status: PROVEN (VIctory-7900XTX). What: title threads record calls (not execute); worker pool translates. Why: 36,000 calls/frame = 230 ms work; street chase 67,000 calls, 430 ms. Impact: MEDIUM (75 -> 68 ms). Risk: worker pool contention. P11. SUBMISSIONS JOINED. Status: PROVEN (VIctory-7900XTX). What: VICTORY_JOIN_PARTS; parts of one submission prepared by worker thread and joined. Impact: MEDIUM (68 -> ~63 ms). P12. AVX2 COMPARES ON 6 THREADS. Status: PROVEN (VIctory-7900XTX). What: compare title bytes under shader writes with AVX2, 6 threads. Why: 14 -> 4-7 ms. Impact: MEDIUM. P13. STORES INTO GUARDED MEMORY LOOKED AT FIRST. Status: PROVEN (VIctory-7900XTX). What: before a store into guarded memory, look first; reset fewer guards. Why: 69 ms thread time -> ~6 ms. Impact: HIGH (63 ms). P14. HASH PASSES OVER CARD COPIES, 64 THREADS. Status: PROVEN (VIctory-7900XTX). Why: card 79 -> 66 ms. Impact: MEDIUM (13 ms). P15. DESCRIPTOR SYNC FINGERPRINT. Status: PROVEN (victory-amd, commit 9376fd6). What: cheap fingerprint instead of full heap scan; leave draw-table slots to draws. Why: 70-220 -> ~3 ms. Impact: HIGH. Risk: fingerprint collision. P16. DESCRIPTOR RECORDS MIRRORED. Status: PROVEN (victory-amd PR #305). What: plain-byte descriptor records mirrored before each submission. Why: ~40,000 records/frame unannounced; slots empty or stale. Without this, first room does not render. Impact: HIGH (correctness + FPS). P17. GUARD OVER EVERY VIEW OF A PAGE. Status: PROVEN (victory-amd, Spexivus/joroyt/tightfall; RDNA4 fork reimplemented). What: write through one view of a physical page seen by copies through other views. Why: 0.8-1.0 million such writes per 5-min run, each left a copy stale. Fixed a rare lost write (6 of 200 stress runs -> 0 of 603). On RDNA4: whole vehicles and distant trees working since. Impact: HIGH (correctness). P18. KERNEL READS READ-BESIDE. Status: PROVEN (victory-amd, Joshua Odom). What: kernel reads into title memory read beside and copied in. Why: without it, DirectStorage requests fail with ERROR_INVALID_USER_BUFFER (0x800706f8); title stops seconds after first world frame. Impact: HIGH (stability). P19. TEXTURE STAGING LOCK PER RANGE. Status: PROVEN (DexNom). What: per-range lock instead of global mapping lock. Why: 846 ms wait -> 77 microseconds for unrelated texture. Impact: HIGH (10,987x for unrelated texture). P20. CPU SUBMISSION WORKERS (VICTORY_FILL_WORKERS=4). Status: PROVEN on synthetic (DexNom); PROMISING on gameplay. What: 4 CPU workers for eligible upload batches; parallel prelude recording. Why: 28,279 uploads batched 512: 11.67 vs 17.64 ms (1.51x). Impact: MEDIUM. Risk: gameplay may not benefit. P21. VICTORY_HOIST_CLAMPS — CLAMPS RECORDED BEFORE DRAW LIST. Status: PROVEN (RDNA4 fork). What: clamps of a run of indirect draws are recorded in a list before the drawing list; they run one after another. Default 7 (VICTORY_HOIST_CLAMPS=0 for each before its draw). Why: 225 -> ~80 ms of GPU time per frame in a scene of 9,000 draws. Impact: HIGH (145 ms GPU). Risk: correctness of clamp order; visual A/B required. P22. VICTORY_STRETCH — PAGES SHOWN ONE 64 KiB VIEW AT A TIME USED IN PLACE. Status: PROVEN (RDNA4 fork). What: pages follow one another in their section; stretch mapped once at an address of ours; host heap opened there. VICTORY_STRETCH=0 disables. Ranges made of several stretches still copied. Why: copy-back 36 -> 12 ms/frame. Impact: HIGH (24 ms). Risk: section continuity requirement; copy fallback for non-contiguous. P23. MULTI-THREADED SNAPSHOT AND COPY-BACK OF SHADER-WRITTEN TILES. Status: PROVEN (RDNA4 fork; PikPakPik PR #18). Why: copy-back 43 -> 33 ms. Frame rate did not move here (bottleneck elsewhere), but the work is free. Impact: MEDIUM (foundation). P24. DOUBLED DYNAMIC DESCRIPTOR SLOTS. Status: PROVEN (RDNA4 fork). Why: tables of heavy frames fit; eliminates dropped draws (16,384+ in some scenes). Impact: HIGH (correctness/FPS). Related: MIN_DYNAMIC = 2^18 from VItoriaBr — same idea. P25. DESCRIPTOR VIEW TABLE: READ-WRITE LOCK INSTEAD OF MUTEX. Status: PROMISING (RDNA4 fork PIX observation). What: PIX capture showed the game's five recording threads take turns on the descriptor view table as a mutex — 6,600 context switches/ second each. Why: replacing mutex with rwlock allows concurrent reads, exclusive writes. How: RwLock (or equivalent); measure context switches with PIX. Impact: MEDIUM-HIGH (depends on contention pattern). Risk: writer starvation. P26. THIN LTO + ONE CODEGEN UNIT. Status: PROVEN (RDNA4 fork; Key-rs PR #96). What: lto = "thin", codegen-units = 1 in release profile. Why: faster code, no behavioural change. Impact: LOW-MEDIUM (frame time). Risk: longer compile time. P27. EIGHT ROMAINHEDOUIN PRs (#24, #25, #27, #28, #29, #30, #33, #34). Status: PROVEN (RDNA4 fork). What: take repeated work out of the draw path. Why: none moved frame time measurably here; nothing broke. Safe foundation. Impact: LOW (safe cleanup). P28. VICTORY_ASYNC_SUBMIT (RDNA4 fork). Status: PROVEN (RDNA4 fork). What: title's submissions return before host GPU done; what they owe is finished at the next wait. VICTORY_ASYNC_SUBMIT=0 disables. Why: 200-238 -> 150-186 ms in same place. BUT gained nothing until VICTORY_HOIST_CLAMPS (P21) and VICTORY_STRETCH (P22) were in. Impact: HIGH (50 ms) but requires the other two. Risk: cross-submission ordering; must be paired with stability gates. P29. VICTORY_JOIN_PARTS — JOIN SPLIT SUBMISSION PARTS. Status: PROVEN (VIctory-7900XTX). What: parts of one submission prepared by worker thread and joined. Impact: MEDIUM. -------------------------------------------------------------------------------- 3.2 CARD (about 41 ms; the second wall) -------------------------------------------------------------------------------- C1. EMPTY DRAW ELIMINATION. Status: PROMISING (vi-pc-combo). What: 3,046 mesh records/frame; 1,148 (38%) ask for nothing; 291 indirect dispatch; 175 (60%) run nothing. Each pays per-record work (~24 microseconds). Why: skip empty records — a layer change, not GPU culling (expensive). How: after culling pass, before ExecuteIndirect, check argument buffer count; skip if 0. Or early-out in mesh shader. Impact: HIGH (~40 ms). Risk: stale counts (title memory outdated; card writes later). Read after fence. C2. REAL OCCLUSION QUERIES. Status: PROMISING (vi-pc-combo issue #10). What: game never culls because its queries always return "visible"; timestamps are not the card's; dynamic resolution never reacts. Why: real queries let game's own culling kick in; many of 5,000 draws skipped. How: D3D12 query heap; ResolveQueryData after fence; real samples- passed. VICTORY_REAL_OCCLUSION=1. Impact: HIGH. Risk: game's culling too aggressive; visual regressions. C3. MERGED INDIRECT DRAWS. Status: PROMISING (vi-pc-combo). What: drawing a run of records with one call took 25-30 ms off a 5080 (upper bound, picture broken). Correct version needs each draw's descriptor table as heap index. Why: 5,000 single-record draws x 16-18 microseconds = ~80 ms. How: translate descriptor table -> heap index (translator work); merge records. Impact: HIGH. C4. VICTORY_INDIRECT_WINDOW OFF BY DEFAULT. Status: PROVEN (vi-pc-combo). What: currently costs 20-25 ms + spends indirect budgets (wall bug). Turn off. Impact: MEDIUM (+20-25 ms). Risk: walls may disappear without windows in some launches. Test 2+ launches each way. C5. HAIR PHYSICS OFF SWITCH. Status: OPEN (vi-pc-combo). What: VICTORY_HAIR_PHYSICS=0; 6 hair sim programs dropped -> 258 vs 270 ms. Impact: MEDIUM (16 ms if run14; less now). C6. RT OFF SWITCH. Status: OPEN (vi-pc-combo). What: VICTORY_RT=0; 5 RT programs dropped -> 245 vs 270 ms. Impact: MEDIUM (26 ms if run14; less now). C7. VICTORY_DISPLAY_MODE 1080p. Status: PROVEN (VItoriaBr). What: internal rendering resolution 1080p; window upscales on Present. Why: 4K to 1080p = 4x fewer pixels. Works after CPU-side fixes. Impact: HIGH (2x vs 4K). C8. SHADER CLEAN-UP PASSES. Status: PROVEN (victory-amd; RDNA4 fork from ba8697aa). What: dead code, constant folding, reuse of values, branch facts, one read per place. Why: ~43% host instruction count reduction; ~20 ms GPU/frame. All 25,623 shaders pass validator. How: VICTORY_SHADER_OPT=0 disables. Note: first launch after change rebuilds every pipeline (minutes of black world); water missing until game is started again. Impact: MEDIUM (20 ms). C9. PRE-BUILD PIPELINES. Status: PROVEN (all forks). What: after loader knows containers, queue all keys from previous run's early list before first frame. Per-frame budget only for discovered keys. Why: 1,200+ pipelines created on first frame; 270-660 s of session full of more-than-200-ms frames while pipelines are made. How: prebuild(keys); budget() Duration default 500 ms. victory warm --used in RDNA4 fork. Impact: HIGH (stability). C10. SMALL BUFFERS ON CARD (VICTORY_CARD_BUFFERS_MIN_KB=64). Status: OPEN (VIctory-7900XTX next-step). Why: avoids copies. Impact: MEDIUM. C11. SKIP PASSES THAT RUN FOR NOTHING WITHOUT RAYS. Status: OPEN (VIctory-7900XTX next-step). Why: wasted GPU work. Impact: MEDIUM. C12. ANTI-TDR SUBMISSION CHUNKING. Status: PROVEN (VItoriaBr). What: submit 1 command list per fence; zero out-of-range DispatchMesh args; caps 4096 groups, BUDGET = 2^22. VICTORY_SHADER_LOOP_LIMIT default 4096 in release. Why: avoid accumulating more than 2 s of GPU work (TDR). Impact: HIGH (stability). C13. SHADOW BUFFER STATE TRACKING. Status: PROVEN (VItoriaBr). What: each Shadow buffer tracks state via prelude() and intra-list barriers: GENERIC_READ for VB/IB/CBV/SRV/Indirect args+counter, UNORDERED_ACCESS for UAV/clamp. Why: previously indirect::done() left shared title buffers in UNORDERED_ACCESS — IASetVertexBuffers and barrier mismatch (id=527) errors. Impact: HIGH (stability). Test: D3D12 Debug Layer check. C14. DESCRIPTOR RECYCLING. Status: PROVEN (VItoriaBr). What: slots return to heap immediately after synchronous host.execute; MIN_DYNAMIC to 2^18 on capped heaps. Why: zero dropped draws (was 16,384+). Impact: HIGH (correctness). C15. GUARD PASS_BUDGET IN HEAP_TEXTURES. Status: PROVEN (VItoriaBr). Why: prevents watchdog 30 s timeout on 1st 3D frame. Impact: HIGH (stability). C16. TEXTURE UPLOAD ON COPY QUEUE; SLOT SHOWS AFTER UPLOAD. Status: PROVEN (VIctory-7900XTX; RDNA4 fork). What: VICTORY_SHOW_AFTER=1. Why: ended device loss every ~16 min. Impact: HIGH (stability). C17. VICTORY_QUEUE2 + VICTORY_COPY_PLAIN. Status: PROVEN (VItoriaBr). What: copy-back 205 -> 65-78 ms (~3x); ~12,400 in-place copies/frame; textures ~40 -> ~20 ms. How: VICTORY_QUEUE2=1, VICTORY_COPY_PLAIN=1. Note: combine with VICTORY_ASYNC_SUBMIT carefully (see P28). C18. VICTORY_TEXTURE_NO_WAIT. Status: PROVEN (VItoriaBr). What: removes stalls on lock during texture refresh. 900-3,700 -> 6-25 ms (2 orders of magnitude). Impact: HIGH. C19. VICTORY_PAGE_WRITES=slots. Status: PROVEN (VItoriaBr). What: re-enqueue placed textures uploaded before title finished writing their bytes. 7,000+ textures/session recovered. Why: black skin/ground disappears. Impact: HIGH (visuals). C20. DEPTH-ONLY PIPELINES WARM AHEAD. Status: PROMISING (DexNom). Why: reduces missing shadows during loading. Impact: MEDIUM. C21. STREAMED TEXTURES WITH MIDDLE PAGES RESIDENT. Status: PROMISING (DexNom). How: merge overlapping notifications; rescan if queue fills. Impact: MEDIUM. C22. CONTIGUOUS DESCRIPTOR SLOTS SEARCH. Status: PROMISING (DexNom). Impact: MEDIUM. C23. TEXTURE READ-BACK. Status: PROVEN (VIctory-7900XTX; Geckomacabre; RDNA4 fork from fxceless f5c03f3b). What: textures shaders write and CPU reads go back to title memory. VICTORY_TEXTURE_BACK (on by default). Why: ocean height/displacement maps never brought back; boats sank. With read-back, boat stays up through whole run. Impact: HIGH (correctness). C24. LANDING SHADER WRITES ON OWN THREAD. Status: PROVEN (VIctory-7900XTX). What: VICTORY_LAND; what shaders wrote comes back beside write guards, by dwords, own thread. Why: 16 MB/frame as dwords, own thread. Impact: MEDIUM. C25. CARD STEPS (BUFFER FILLS ON CARD). Status: PROVEN (VIctory-7900XTX). What: VICTORY_CARD_STEPS; fills needing bytes still on card done on card. Impact: MEDIUM. C26. BIND TUPLES PER-FRAME (PSO CACHE). Status: PROVEN (pattern from RPCS3/Xenia). What: cache PSOs per (shader, blend state, RT format); invalidate only on change. Impact: MEDIUM (stalls). C27. SHADER PIPELINE CACHE LIMIT. Status: PROMISING (RPCS3/Eden/Citron). What: hard LRU limit on pipelines (e.g. 4096 or 2 GB). Why: prevents OOM stalls and unbounded growth. Impact: MEDIUM. C28. BUFFER OPTIONS OFF BY DEFAULT. Status: PROMISING (RPCS3). Why: "Download" operations have severe performance consequences. Impact: MEDIUM. C29. TARGETED WAIT (SharpEMU). Status: PROMISING (SharpEMU, PS5 emulator). What: when reading GPU-written data, wait only for the specific submission that wrote it, not the whole queue or frame fence. Why: SharpEMU found Unreal render thread spent a third of its time waiting on readbacks. How: Timeline stores address ranges per submission; on readback, find relevant submission; wait only its fence. Impact: MEDIUM-HIGH. C30. GIANT BUFFERS IN SYSTEM RAM. Status: PROMISING (KytyPlus). What: allow large buffers to live in system RAM to fit within 12 GB VRAM. Impact: MEDIUM (allows launch, doesn't speed up). C31. VIEW HEAP LIMIT WORKAROUND (#21 in RDNA4 fork). Status: PROVEN (RDNA4 fork). What: NVIDIA tier-2 cap is 1,000,000 views. Title can request more. How: report title heap size / host cap / slots lost at creation. Remap root descriptor tables past cap into the dynamic area (already landed as #21). Title's user_value stays opaque to translated shaders. Impact: HIGH (correctness; prevents device hang on first-boot screens and black frames in world). Open: directly-indexed heaps (ResourceDescriptorHeap) past cap still unsolved — needs either index-compaction (patch lower.rs index arithmetic; costly) or working-set migration (only correct if usage is temporally clustered — a streaming world is not). Sampler heap 2,048 limit also unsolved: HostHeap::new returns None losing the heap outright. C32. VICTORY_AMBIENT — DEPTH-BASED AMBIENT WITH SKY-FOLLOWING. Status: PROVEN (RDNA4 fork; from Belobug idea). What: replaces indirect diffuse with a constant while ray passes do not run. VICTORY_AMBIENT=0.6 default. VICTORY_AMBIENT_TINT=r,g,b. VICTORY_AMBIENT_SHADE=strength,radius (depth-based shading in creases, grainy). VICTORY_AMBIENT_SKY=off for constant; gain,least,power follows sky dome (gain * mean^power + least with sky hue — day/night/noon auto). VICTORY_AMBIENT_REFLECT=0.5 holds reflections to a part of the constant. Why: without it, game's resolve pass left bright magenta on leaves, cloth, paper, and blocks of color indoors. Impact: visual (required for playability without RT). Risk: not real RT; constant across frame; grainy in creases. C33. VICTORY_PRESENT_TARGET=1x1:1 — RDNA4 FORK RUN PRESET. Status: PROVEN (RDNA4 fork). What: tiny present target; part of their run command. Unclear exactly what it does; verify before adopting. Impact: unknown. -------------------------------------------------------------------------------- 3.3 RAY TRACING (for Series X full parity) -------------------------------------------------------------------------------- RT1. RT WRITE TRACKING FIX. Status: PROVEN (DexNom). What: CPU declared every mapped guest memory writable even when a traversal shader only read. Corrected translator distinguishes guest writes from UAV output. 3,469 -> 969 ms (3.58x). 12,793 -> 2,655 MB compared. 2,036 -> 95 ms wait. Impact: HIGH. RT2. RT MEMORY DIRECTORY GROWTH. Status: PROVEN (DexNom, partial). What: grows beyond 1,023 backing buffers. Per-record views. Impact: MEDIUM (partial; City still exhausts). RT3. RT BUILDER HONOR THREAD COUNTS. Status: PROVEN (DexNom). What: dispatches honor game's thread counts; mask excess lanes. Impact: HIGH (part of RT1). RT4. GUEST ADDRESSES FROM RT DESCRIPTORS. Status: PROMISING (DexNom). What: resolve guest addresses from RT descriptors; preserve raw buffer offsets. Impact: MEDIUM. RT5. WHOLE-RAY DXR (RayQuery). Status: PROMISING (original plan). What: dxr() branch; whole rays via hardware; per-node traversal stays software. Impact: HIGH for RT. RT6. BLAS/TLAS BUILD + REFIT. Status: PROMISING (original plan). What: Scene { build, refit }; dirty-only refit. Impact: HIGH for RT. RT7. SHADOW AND GI PASSES. Status: PROMISING (original plan). What: table-driven passes_for(console). Impact: HIGH for visuals. RT8. RT MEMORY IN RESIDENCY BUDGET. Status: PROMISING (original plan). What: note_rt_bytes(), rt_bytes(); BLAS/TLAS counted. Impact: stability. RT9. SPLIT DISPATCHES MORE THAN 65,535 GROUPS. Status: PROVEN (victory-amd). What: final gather at 2560x1440 asks 115,200 groups -> split. Impact: HIGH for that scene. -------------------------------------------------------------------------------- 3.4 SHADERS AND TRANSLATOR -------------------------------------------------------------------------------- S1. STATIC SAMPLER SELECTION ACROSS UNIFORM BRANCH. Status: PROVEN (DexNom, VItoriaBr). What: phi of path at join (true from second predecessor), not reach[pred]. Why: +40 shader variants recovered. Impact: MEDIUM. S2. WAVE64 LANE MASK SAVE/RESTORE RECOGNITION. Status: PROVEN (DexNom). Why: +1 voxel visibility shader. Impact: LOW. S3. INTEGER RT BLENDING BYPASS. Status: PROVEN (DexNom; RDNA4 fork PR #45, pgm1207/Arvi23). What: mixed render targets retain individual write masks when integer target bypasses blending. Why: windshield-wiper pipeline failed creation; now made. Impact: MEDIUM. S4. VERTEX INTERPOLATION + SIGNATURE ORDERING. Status: PROVEN (DexNom, VItoriaBr). What: preserve game's vertex output interpolation; ISG1/OSG1 order matches console. Why: all 2,191 archive vertex shaders passed DXIL (was 39 failed), including 18 water shaders. Impact: MEDIUM-HIGH. S5. 2x2 PIXEL GROUP EDGE PRESERVATION. Status: PROVEN (DexNom, RDNA4 fork). What: pixel shaders reading neighboring 2x2 pixels preserve values at triangle edges. Cube-map sampling correct mip level for explicit gradients. RDNA4 fork extended to helper pixels (wave reads return 0 from helper pixels on AMD — showed as lines on car paint, glass, skin). Impact: visual. S6. FIVE SHADOW COMPUTE SHADERS. Status: PROVEN (DexNom, RDNA4 fork). Why: missing shadows. Impact: visual. S7. MIMG a16 + LDS BYTE/HALF OPERATIONS. Status: PROVEN (VItoriaBr). What: image_sample_b, _cl/_o, image_gather4_l, ds_read_{u8,i8,u16,i16}, ds_write_{b8,b16}{,_d16_hi}. Impact: MEDIUM. S8. PER-ROW INTERPOLATION MODE RECONCILIATION. Status: PROVEN (VItoriaBr). Why: ~48 dxil.dll errors cleared. Impact: MEDIUM. S9. CUBEMAP image_sample_d_cl. Status: PROVEN (VItoriaBr). What: grads = 2 for cubemaps (kind == 5). Why: +27 shaders. Impact: MEDIUM. S10. MESH SHADER / LDS / BARRIER SAFETY ON NVIDIA WAVE32. Status: PROVEN (VItoriaBr). What: mesh_prologue caps setMeshOutputCounts; LDS RDNA2 OOB semantics; s_barrier memory fence (TGSM_FENCE/UAV_FENCE). Impact: HIGH (stability). S11. SLOT_VIEWS ROOT SRV (252). Status: PROVEN (VItoriaBr). What: descriptor read as data at runtime-calculated index. Why: +40 shaders. Impact: MEDIUM. S12. WAVE64 PINNING. Status: PROMISING (Leonida: 23,841 of 26,503 shaders are wave64). What: programs depending on wave-wide ops pin WaveSize(64). Why: on NVIDIA wave32, cross-half operations in vertex/pixel/geometry are approximate. Impact: 0 FPS; prevents visual bugs. S13. LOOP CAP AS DIAGNOSTIC. Status: PROMISING (original plan). What: 2^20 clamp only for unprovable loops. Impact: MEDIUM. S14. WIDE MEMORY OPS. Status: PROMISING (original plan). What: two adjacent aligned dwords -> one 64/128-bit access. Impact: LOW-MEDIUM. S15. UNIFORM BRANCHES. Status: PROMISING (original plan). Impact: LOW-MEDIUM. S16. BIT-EXACT SHADER VERIFICATION. Status: PROVEN (XPortPC). What: compare translated shader against CPU reference instruction-by- instruction. Impact: 0 FPS; guarantees optimizations don't break result. S17. #UD HANDLER FOR ZEN 2 INSTRUCTIONS. Status: PROMISING (XPortPC). What: SHA-NI, SSE4a, CLZERO, RDPID, CLWB may be absent on host CPU; emulate. Impact: 0 FPS; prevents crash. S18. SHADER CACHE FINGERPRINT (30 SOURCE FILES). Status: PROVEN (DexNom). Impact: stability. S19. VICTORY_SHADER_BUILD_OF — REUSE SHADER CACHE ACROSS BUILDS. Status: PROMISING (RDNA4 fork, diagnostics). What: shader cache entries of another build can be reused. Impact: stability/warm-up. S20. WAVE64 -> WAVE32 SPLIT FORM (wave64-on-wave32.md). Status: PROVEN (RDNA4 fork; steps 1, 2, 4, 5 in). What: one console wave64 runs as two host wave32 waves of the same thread group. WaveSize(32); console lane = flat thread % 64, half = bit 5. - In-half only (step 4): DPP16, DPP8, ds_swizzle, v_permlane16, v_permlanex16 need nothing. - Cross-half (step 5): ballots, v_readlane, v_readfirstlane, v_writelane, v_mbcnt exchange through groupshared memory (Lower::exchange), two barriers. - Console flow (CONSOLE_FLOW): whole program runs as on console — both halves take every branch the same way, loops run while any lane does. structure::structure_console builds per-lane booleans; Structured::execs gives EXEC bit at each vector instruction; branches use s_cbranch_* with each half's ballot exchanged. Why: NVIDIA reports wave range as 32..32; wave64 programs cannot run as-is. This lets 25,623 shaders run on NVIDIA. Impact: HIGH (correctness on NVIDIA). Still open: groups of several console waves (need per-console-wave arrival counters with double-buffered slots and bounded wait), LDS in multi-wave groups, whole-wave sections, ds_(b)permute. Test: hand-assembled GFX10 programs run twice — native wave64 (AMD RDNA reference) and split form (NVIDIA); compared buffer-for-buffer. S21. VICTORY_SHADER_OPT FROM ba8697aa. Status: PROVEN (RDNA4 fork). What: clean-up passes (dead code, constant folding, single instruction per value, branch facts, single read per place). Why: all 25,623 emitted shaders pass validator. Impact: ~20 ms GPU/frame. Risk: water missing until game started again after first launch post-change. S22. VICTORY_AMBIENT_SKY, _TINT, _SHADE, _REFLECT, _FILE. Status: PROVEN (RDNA4 fork). What: ambient tuning described in C32. Impact: visual. S23. VICTORY_SHADER_PATCH, VICTORY_SHADER_SWAP (diagnostics). Status: PROVEN (RDNA4 fork, diagnostics). What: patch one word of a shader's machine code before translation; replace shader containers by files. Impact: diagnostic. -------------------------------------------------------------------------------- 3.5 HPC AND ADJACENT FIELDS (EXPERIMENTAL) -------------------------------------------------------------------------------- X1. EMBER ADAPTIVE PROMOTION. Status: EXPERIMENTAL (Ember, HPC framework). What: hardware GPU access counters drive promotion of hot regions to VRAM; stop promotion before memory fills (avoid thrashing). Why: Ember was up to 21x faster than standard UVM on data-reuse workloads (k-means). How: D3D12 does not expose per-page access counters directly. Research needed (D3D12_QUERY_TYPE_TIMESTAMP + counters per draw — granularity differs). Impact: potentially HIGH; applicability unclear. Risk: D3D12 may not expose needed API. X2. DREAM DEVICE-DRIVEN PAGE FAULTS. Status: EXPERIMENTAL (HPC; requires special hardware). What: GPU threads handle page fault/migration instead of CPU/OS. Why: DREAM showed up to 4x speedup for latency-sensitive applications. How: requires RDMA-capable device (GPUDirect RDMA). Not directly applicable to consumer PCIe GPU. Impact: potentially HIGH on special hardware. Risk: not applicable to consumer GPU. X3. PRE-EVICTION + PREFETCHING. Status: EXPERIMENTAL (HPC patents and research). What: prefetch based on virtual address locality; pre-evict before data is needed, based on past frame patterns. Why: reduces page thrashing; hides PCIe latency. How: track access patterns per frame; predict next; pre-load. Impact: potentially HIGH. Risk: unpredictability; may worsen if prediction wrong. X4. SPARSE MAPPING MIGRATION. Status: EXPERIMENTAL (ShadPS4 plan, PS5PCEM). What: reserve large virtual ranges, map on demand; migrate blocks between "game memory" and VRAM via vkQueueBindSparse (Vulkan) or D3D12 Residency API. Why: predictable block migration instead of unpredictable page faults. How: on D3D12 — IDXGIDevice3::Trim/MakeResident/Evict + custom allocator. Impact: potentially HIGH. Risk: D3D12 Residency API less flexible than vkQueueBindSparse. X5. 16 KB PAGES FOR GPU DATA. Status: EXPERIMENTAL (PS5PCEM). What: 16 KB pages for GPU-originated data. Why: PS5 uses 16 KB pages; may matter for compatibility. How: third span variant after 64K and 2M. Impact: unknown. Risk: not tested on this title. X6. REBAR FOR LATENCY-CRITICAL UPLOADS ONLY. Status: PROMISING (RPCS3 uses for PS3). What: use ReBAR for latency-critical uploads (not for general bidirectional exchange). Why: RPCS3 uses this to emulate PS3's more direct memory access. For general exchange, single-copy failed (see REJECTED). How: identify which uploads are latency-critical; use ReBAR for them. Impact: MEDIUM. Risk: ReBAR non-coherent; explicit flush needed. X7. LIBUMSH PORTABLE LIBRARY. Status: EXPERIMENTAL (libumsh, EuroSys 2027). What: portable library for shared CPU-GPU memory that abstracts platform differences. Why: solves problem of applications adapting to different memory models. How: use as dependency. Impact: unknown. Risk: not tested on this title. X8. CXL / NVLINK-C2C COHERENT INTERCONNECTS. Status: EXPERIMENTAL (hardware, not software). What: coherent interconnects instead of PCIe. Why: CXL latency ~170-250 ns, bandwidth ~32 GB/s per Gen5 x8 lane. GPU can read non-resident page in place. How: requires hardware. Not applicable to consumer PCs. Impact: HIGH if hardware available. Risk: not applicable to consumer setups. X9. COHERENT MEMORY PROBE BEFORE SINGLE-COPY. Status: PROMISING (SharpEMU). What: before enabling single-copy, probe not only ReBAR but also coherence of host-visible memory. Why: on Apple M-series single-copy works because memory is coherent; on PCIe GPU it is not. How: probe: allocate test buffer, GPU write, CPU read without flush — if visible, coherent; else not. Impact: determines whether X10 is safe. X10. SINGLE-COPY ON COHERENT ADAPTERS ONLY. Status: PROMISING for coherent; REJECTED for PCIe. What: single-copy enabled only if X9 probe says coherent. Why: on PCIe GPU single-copy is 2-4x slower (card reads PC memory over bus). On coherent (Apple M-series) works. How: capability switch (auto/on/off); default auto (by probe). Impact: HIGH if applicable; 0 if not (fallback to shadow). Risk: PCIe not coherent. Definitively slower there. X11. 2 MiB LARGE PAGES + ONE-COPY FAST PATH. Status: PROMISING (KytyPlus showed TLB reduction). What: 2 MiB spans in page table, fast path for access inside one copy. Why: fewer TLB misses, fewer dependent loads. How: SPAN_64K=0, SPAN_2M=1; entry(span, heap, low); shader index = address >> (16 + span). Fast path: if (address - base) < limit, read copy; else page table. Impact: MEDIUM. Risk: alignment requirement; dead code if no 2 MiB copies. X12. RESIDENCY BUDGET + EVICTION. Status: PROVEN (vi-pc-combo: VRAM 14.6/15.3 GB full). What: budget from QueryVideoMemoryInfo (80% local); eviction of host copies and textures at frame boundary; never evict in-flight. Why: without this, paging blows up frame time. Condition for stability. How: Budget { local_used, local_budget, nonlocal_used, nonlocal_budget }; pressure; over_limit; Candidate { id, bytes, last_used, in_flight }; choose (oldest first, never in_flight); evict_to. Impact: HIGH (prevents catastrophe). Risk: evict in-flight = use-after-free. X13. PLACED TEXTURE LIFETIME. Status: PROVEN (VItoriaBr PAGE_WRITES=slots). What: release only on title free/remap, not on "not used this frame". Why: title may reuse address without unmap. How: registry keyed by (address, desc, size, generation); release on free/remap; new placement at same address replaces old. Impact: MEDIUM. Risk: release too early = missing texture. X14. DETILE ONLY DIRTY PAGES. Status: PROMISING (vi-pc-combo: texture pass 80-95% memory). What: detile only changed pages, not whole texture. Why: direct work savings. How: page = 64 KiB run of tiled source; detile_pages(tex, pages). Impact: MEDIUM-HIGH. Risk: wrong block computation = artifacts. X15. TARGETED WAIT. (See C29.) X16. GIANT BUFFERS IN SYSTEM RAM. (See C30.) -------------------------------------------------------------------------------- 3.6 DISPLAY / VISUAL (required for parity, not FPS) -------------------------------------------------------------------------------- V1. HDR (VICTORY_HDR=1; DXGI_FORMAT_R10G10B10A2_UNORM). V2. Audio reverb. V3. Speech decode and mix. V4. Trigger rumble. V5. Dynamic resolution (requires real timestamps — see C2). V6. VICTORY_HAIR=1 (RDNA4 fork run preset; exact effect unclear). V7. PHONE BROKEN — with in-game phone out, world unlit (black), phone is empty outline. Open; unfixed. V8. TEXTURE CAP 1024 px default. Streamed textures capped at 1024 (512, 256 as VRAM fills). At 2048, 16 GB card goes 1-2 GB over budget. VICTORY_TEXTURE_MAX=2048 to try. V9. MEMORY 33 GB COMMIT AFTER 15 MIN DRIVE (7 GB title + 8 GB textures + buffer copies + system backing of VRAM). 22 GB baseline at load. ================================================================================ SECTION 4 — REJECTED — DO NOT REPEAT ================================================================================ Measured harmful or useless on this title. R1. Single-copy on PCIe GPU (VICTORY_INPLACE). 2-4x slower. Card reads PC memory over PCIe. R2. VICTORY_INDIRECT_WINDOW on by default. 20-25 ms + wall bug. R3. VICTORY_BVH_BUILDER on. Crash after ~18 s with FIRSTLANE_OWN. R4. VICTORY_CARD_FETCH_INFLIGHT on. 1.9-2.6 FPS vs 3.5-6.0 (off). R5. Joining equal draws into instanced draws. Only 2 of 3,584 continuing draws are equal to the one before. Floor by pipeline: 1,008 groups — nothing to join. R6. Faster card as solution. RTX 4070 Ti = same frame time as 5060 Ti (Series S). RTX 5080 only -13% for +100% card. RTX 4090 -27% for +200%. R7. VICTORY_WIDE_REFRESH alone. No gain; Windows calls serialize in kernel. Works only with VICTORY_TEXTURE_NO_WAIT. R8. VICTORY_LATE_WAIT_LISTS=256. Slower. R9. VICTORY_CARD_WINDOWS_MB=3584. No gain; picture darkens. R10. Unordered early pipelines for everything. AMD compiler crashed. R11. Series S profile as default on Series X machine. Slower. R12. Smaller textures. Slower. R13. Second drawing queue. Slower. R14. VICTORY_ASYNC_SUBMIT=0. Slower in RDNA4 fork (opposite direction: async in general is faster there). R15. Mapping pages on 16 threads. No more pages mapped, frames longer. R16. Scalar buffer loads 4 dwords (VICTORY_SHADER_OPT=127). No gain. R17. Wave sizes. Nothing to 0.1 ms. R18. Fused multiply-adds. Nothing to 0.1 ms. R19. Fast reciprocals. Nothing to 0.1 ms. R20. Raw picked buffers. Nothing to 0.1 ms. R21. Leaving out barriers. Nothing to 0.1 ms. R22. VICTORY_RDNA_FLOAT. 0.8 ms. Not worth it. R23. Running console shader code natively on card. Impossible — Windows driver takes no raw code; two generations differ; Vulkan host ends at same compiler. Remaining gain from shader code estimated under 1 ms. R24. VICTORY_PANEL on-screen panel. Costs some FPS. Off by default; F3 shows on demand. R25. VICTORY_RAYS=1 (RDNA4 fork). Builders translate and run; device removed after ~1.5 min. Two causes fixed with AMD's Radeon GPU Detective, but run now ends on a read at an address no resource ever had. Do not enable. R26. VICTORY_RAYS=1 — "do not expect light from it" (RDNA4 fork). Even when it doesn't crash, no RT light. ================================================================================ SECTION 5 — PRIORITY ORDER TO REACH 60 FPS ================================================================================ Target: 16.6 ms. Current: 46-53 ms water on RX 7900 XTX (19-22 FPS), 5-8 FPS on RX 9070 XT (visual-correctness fork). Both preparing thread (48 ms) and card (41 ms) must fall. Reducing only one is not enough. PHASE 1 — Attack the preparing thread (48 -> 24-30 ms). Expected: 46-53 -> ~30-40 ms (~25-33 FPS on water). Tasks: P1 (thread split), P2 (pipeline next submission), P3 (view card buffers), P4 (bound-buffer tracking), P5 (write detection journal), P6 (lazy copy-back), P25 (descriptor rwlock), P28+P21+P22 (async submit + hoist clamps + stretch — these three are a chain and together give 50 ms). Measure each separately. Combine carefully. PHASE 2 — Attack the card (41 -> 25-30 ms). Expected: ~30-40 -> ~22-28 ms (~36-45 FPS). Tasks: C1 (empty draw elimination), C2 (real occlusion), C3 (merged indirect), C4 (INDIRECT_WINDOW off), C7 (1080p), C8 (shader clean- up), C10 (small buffers), C11 (skip no-ray passes), C21 (VICTORY_HOIST_CLAMPS — already counted in Phase 1 chain, but do here if not). PHASE 3 — Parallel and supporting (foundations). Run alongside Phases 1 and 2. P7-P19 (all foundation items from VIctory-7900XTX and victory-amd — already proven, verify against current code). P23 (multi-thread copy-back). P24 (doubled dynamic slots). P26 (thin LTO). P27 (romainhedouin PRs). P29 (join parts). C12-C25 (all stability and correctness items). C31 (view heap limit workaround — required for NVIDIA tier-2). S1-S23 (all shader fixes; S20 wave64 split is the big one for NVIDIA; S21 shader clean-up is ~20 ms). V1-V9 (visual parity). C32 (ambient) — required for playability without RT. PHASE 4 — Ray tracing for Series X full parity. Only after Phases 1-3. RT1-RT9, all remaining shader fixes needed for 100% coverage. PHASE 5 — Experimental (only if Phases 1-4 do not reach 60). X9 (coherent probe) then X10 if coherent. X3 (pre-eviction) if access patterns are predictable. X4 (sparse migration) if residency pressure persists. X11 (2 MiB pages + fast path) if page-table load is measurable. X6 (ReBAR for latency-critical uploads) if upload latency shows. X1, X2, X5, X7, X8 — only with hardware/API that supports them. EXPECTED FPS TRAJECTORY (must be measured on target): Current 46-53 ms (19-22 FPS) RX 7900 XTX water After Phase 1 ~30-40 ms (25-33) Preparing shrinks After Phase 2 ~22-28 ms (36-45) Card shrinks After Phase 3 ~18-24 ms (42-55) Combined + stability After Phase 4 (RT off) ~18-22 ms (45-55) RT excluded After Phase 4 (RT on) depends on RT cost RT is for parity, not FPS 60 FPS target 16.6 ms Reachable with Phase 1+2+3 plus tuning; RT may require Phase 5 For 60 FPS specifically: prioritize Phase 1, Phase 2, and Phase 3 stability work. Phase 4 and 5 are for visual parity, not raw FPS. ================================================================================ SECTION 6 — IMPLEMENTATION DETAILS FOR TOP PRIORITY ITEMS ================================================================================ P1. PREPARING THREAD SPLIT OVER TWO THREADS. Files: host.rs, queue.rs, descriptor/host.rs, draw.rs, memory.rs, shadow.rs, watch.rs. Interface: pub struct PreparePipeline { pub steps_a: StepQueue, // list steps, refreshes (18 ms) pub steps_b: StepQueue, // descriptor records, write watch // (6+5 ms) } impl PreparePipeline { pub fn split(&mut self, submission: &Submission) -> (Vec<Step>, Vec<Step>); pub fn run(&mut self, a: &StepQueue, b: &StepQueue) -> PreparedSubmission; } Test: A/B on water scene, 3 runs each way; metric preparing_us p50/p95 from FrameSample; expected 48 -> 24-30 ms. Gate: p95 down more than 30%, no card-side regression. P2. PIPELINE NEXT SUBMISSION. Files: host.rs (execute), fence.rs (wait_value), queue.rs (account_frame, retire_frame). Interface: pub struct SubmissionSlot { pub fence_value: u64, pub pending_copy_back: Vec<Range>, pub pending_release: Vec<ResourceId>, } impl Host { pub fn execute_pipelined(&mut self, submission: Submission) -> SubmissionSlot; } Test: A/B pipelined vs sync; metrics frame_us, gpu_us, prepare_us; TDR test 10+ min. Risk: TDR if two submissions accumulate more than 2 s; combine carefully with VICTORY_ASYNC_SUBMIT (RDNA4 fork — that one returns before GPU done, which is different from pipelining). P25. DESCRIPTOR VIEW LOCK: RWLOCK. Files: descriptor/host.rs. What: replace Mutex with RwLock (or equivalent). Measure context switches with PIX (RDNA4 fork measured 6,600/s per thread on mutex). Test: A/B with PIX capture; count context switches; measure prepare_us. Risk: writer starvation. P28 + P21 + P22 — THE ASYNC-SUBMIT CHAIN. These three must be combined to see the gain (RDNA4 fork: 200-238 -> 150-186 ms, but only with P21+P22 in). - VICTORY_ASYNC_SUBMIT — submissions return before GPU done; owed work finished at next wait. Default on; =0 disables. - VICTORY_HOIST_CLAMPS — clamps of a run of indirect draws recorded in a list before the drawing list; run one after another. Default 7; =0 for each before its draw. GPU 225 -> 80 ms in a 9,000-draw scene. - VICTORY_STRETCH — pages shown one 64 KiB view at a time used in place; stretch mapped once at an address of ours; host heap opened there. Copy-back 36 -> 12 ms. =0 disables. Ranges made of several stretches still copied. Test: A/B baseline vs each individually vs all three; verify no TDR, no visual regression, no dropped draws. This chain alone is worth about 50-100 ms on the water scene in the RDNA4 fork. C1. EMPTY DRAW ELIMINATION. Files: list.rs, indirect.rs, draw.rs. What: after culling compute pass, before ExecuteIndirect, read argument buffer count; if 0, skip. Or early-out in mesh shader. Test: synthetic record with count=0 skipped; count>0 drawn. Verify with counters (RDNA4 fork already counts "indirect mesh dispatches ... of N mesh records a frame on the card M ask for any group"). Gate: 38% of mesh and 60% of indirect skipped; no missing geometry; p95 improves. C2. REAL OCCLUSION QUERIES. Files: query.rs, list.rs. What: D3D12 query heap; ResolveQueryData after fence; real samples- passed. VICTORY_REAL_OCCLUSION=1. Test: synthetic query visible -> 1; occluded -> 0. A/B; feature checklist + user sign-off on visuals (game's culling may be aggressive). Gate: draws submitted drops significantly; no visible geometry disappears. C3. MERGED INDIRECT DRAWS. Files: victory-shader/src/emit/lower.rs (descriptor table -> heap index), list.rs, indirect.rs. What: translate descriptor table access to heap index (translator work); then merge ExecuteIndirect records. Test: A/B; visual comparison. RDNA4 fork upper bound was 25-30 ms off a 5080 (picture broken); correct version should retain picture. ================================================================================ SECTION 7 — MEASUREMENT PROTOCOL ================================================================================ Every change must be measured. 1. Baseline: 2 runs before change. Compare with victory compare --max-delta-percent 5. 2. Change behind a switch (env var or config). 3. 2 runs after. Compare with baseline. 4. Metrics to record (FrameSample, 10 columns): - frame_us p50/p95 - gpu_us - prepare_us - copy_back_us - commit_bytes - vram_bytes - dropped_draws - faults - queue_waits 5. If p95 improves and no regression: keep. 6. If p95 not improved: revert. 7. Record in progress log. LAUNCH RULES: - Claims about visual bugs (walls, shadows, dark objects, phone) require 2+ launches each way. One launch is not evidence. - VICTORY_SYNC_SUBMIT=1 restores baseline for bisection. - Timing runs (VICTORY_GPU_TIMING=1) turn off late wait and run each list alone — frame is slower. Use only for breakdown, not FPS. - TDR test: 10+ min in world, check crashes.log for DEVICE_HUNG. - Use PIX timing capture (RDNA4 fork found more in an hour than a day of own counters). Look for mutex contention (descriptor view table, 6,600 context switches/s per thread). ================================================================================ SECTION 8 — INVARIANTS ================================================================================ Must hold after every change. Check before merging forward. 1. Host::execute does not wait INFINITE in steady state. 2. PLACED_TEXTURES has a release path and bounded total. 3. GetWriteWatch has a guard fallback. 4. Residency counts all allocations, including RT. 5. VICTORY_SYNC_SUBMIT=1 restores baseline. 6. No draw dropped without gate failure. 7. VICTORY_INPLACE=0 on discrete GPU. 8. In-flight depth is 3 or less. 9. Do not increase refresh threads (WIDE_REFRESH alone is useless). 10. Faster GPU is not a solution (rest does not shrink with card). 11. Every change behind a switch. 12. Every change with before/after measurement. 13. Bit-exact shader verification passes before and after any shader optimization. 14. RT bytes visible in residency budget. 15. Frame boundary checksum does not diverge between VICTORY_SYNC_SUBMIT=0 and =1. 16. VICTORY_INDIRECT_WINDOW=0 default. 17. VICTORY_CARD_FETCH_INFLIGHT=0. 18. VICTORY_BVH_BUILDER=0. 19. VICTORY_RAYS=0 (crashes after 1.5 min in RDNA4 fork). 20. Do not join equal draws (only 2 of 3,584 are equal). 21. WIDE_REFRESH only with TEXTURE_NO_WAIT. 22. host::execute: 1 list per fence (anti-TDR) unless P28 chain verified. 23. RT write tracking default on. 24. CPU workers verified on gameplay, not just upload benchmarks. 25. Wall bug: several launches each way before any claim. 26. VICTORY_ASYNC_SUBMIT requires P21+P22 in place (RDNA4 fork — gained nothing alone). 27. Wave64 split form (S20) must not regress on NVIDIA or AMD; test both. 28. VICTORY_SHADER_OPT change invalidates cache; first run rebuilds pipelines (minutes of black world); water may be missing until game restarted. 29. VICTORY_STRETCH only where section is contiguous; fallback to copy for scattered. ================================================================================ SECTION 9 — OPEN QUESTIONS FOR THE AI ================================================================================ 1. P1 (preparing thread split): exact dependency graph between steps? Which can run in parallel without breaking GPU order? 2. P2 (pipelined submissions): does this conflict with RDNA4 fork's VICTORY_ASYNC_SUBMIT=1 (which is faster there)? Test both separately and together. 3. P5 (write detection journal): overhead of exception handler on every write? Measure fault rate. 4. P6 (lazy copy-back): fault rate on CPU reads? If high, overhead may exceed savings. 5. C1 (empty draw elimination): can counts be read cheaply after fence? Or must culling shader early-out? 6. C2 (real occlusion): how aggressive is the game's culling? Will visible geometry disappear? 7. C3 (merged indirect): what translator work for descriptor table -> heap index? How large is it? 8. RT1 (RT write tracking): does 3.58x reproduce on NVIDIA? AMD and NVIDIA have different memory models. 9. X9 (coherent probe): how to test without game dump? Synthetic? 10. X1 (Ember): D3D12 has no per-page access counters. What to use? 11. X3 (pre-eviction): how to predict next frame's access pattern? What patterns exist in this title? 12. Series S vs Series X: if Series S is default, does it reach 60 FPS sooner? Or does user want Series X parity? 13. C7 (DISPLAY_MODE 1080p): does it work as lever on target hardware after CPU fixes? Test 1080p/1440p/4K. 14. P25 (descriptor rwlock): does PIX show mutex contention still present with rwlock? Measure context switches after change. 15. C31 (view heap limit): directly-indexed heaps past 1,000,000 views — index-compaction (patch lower.rs) vs working-set migration. Which is feasible? 16. S20 (wave64 split): multi-wave groups (need per-console-wave arrival counters with double-buffered slots). How to bound wait? 17. V7 (phone broken): why is world unlit with phone out? Related to ambient? To a missing pass? 18. V8 (texture cap): can the cap be raised on 24 GB cards without overshoot? At what VRAM headroom? 19. P21 (VICTORY_HOIST_CLAMPS): does hoisting 7 clamps change correctness in any scene? Visual A/B. 20. P28 chain: exactly how much does each of P21, P22, P28 contribute? RDNA4 fork says "gained nothing until the next two changes were in" — measure the marginal contributions. ================================================================================ SECTION 10 — DELIVERABLE SUMMARY ================================================================================ This document gives the AI: - Current measured state across six independent projects. - Exact frame breakdown on target hardware. - Every method ever found, with status, source, and expected impact. - Priority order to reach 60 FPS (Phases 1-5). - Implementation details for the top 6 items (P1, P2, P25, P28-chain, C1, C2, C3). - Measurement protocol. - Invariants that must hold. - Open questions that need answers. TO REACH 60 FPS: - Phase 1: Attack preparing thread (P1-P6, P25, P28-chain). Expected: 25-33 FPS. - Phase 2: Attack card (C1-C11). Expected: 36-45 FPS. - Phase 3: Stability + correctness + shader coverage (P7-P19, P23-P27, P29, C12-C33, S1-S23, V1-V9). Expected: 42-55 FPS. - Phase 4: RT parity (RT1-RT9). Visual parity, may not help FPS. - Phase 5: Experimental (X1-X16). Only if Phases 1-4 do not reach 60. Do not skip Phase 1 and 2. They are the measured walls. Do not repeat REJECTED items (Section 4). They are measured dead ends. Do not claim success without A/B measurement (Section 7). Do not merge forward without passing invariants (Section 8). Use PIX timing capture. RDNA4 fork found more in an hour of PIX than a day of own counters. Combine P21+P22+P28 as a chain. RDNA4 fork: gained nothing alone. Verify S20 on both AMD and NVIDIA. Wave64 split is essential for NVIDIA but may have AMD-specific edge cases. Do not enable VICTORY_RAYS=1. Crashes after 1.5 min; no light even when stable. ================================================================================ END ================================================================================ ```
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:31:31 +00:00
Author
Owner

@⁠mintymerry7-create on GitHub · 2026-11-26 20:10 UTC · original

Measured input for this plan, from an RX 9060 XT + Ryzen 7 7800X3D (Series S, FSR 4.1, frame generation). Scenes vary ±2–3 ms from run to run, so these come from VICTORY_AB in one run: 40–60 phases of 10 s, each phase's median compared with its neighbours.

Helped (ms per frame):

  • release build without diagnostics: −4.6 (at equal draw counts)
  • refresh helper threads awake 200 µs between batches (VICTORY_WIDE_SPIN): −3.3 ± 1.1
  • VICTORY_STORE_BESIDE=1: −2.0 ± 0.6
  • VICTORY_CARD_BUFFERS_MIN_MB=1 instead of 4: about −3

No effect (within ±1): fat LTO + target-cpu=native; 7 helper threads instead of 4; spinning on the guards' lock, the landing pools or the heap-sync thread; COPY_BESIDE. Joining up to 32 parts: +1.1. GUARD_REST=20000: worse.

Where the time goes: the submitting thread is the bottleneck at about 47–50 ms a frame. The title waits for it about 15 ms a frame at presents, and the CPU is 80–87 % busy. Breakdown: refreshes ~9, title bytes under flights' writes ~6, card copies ~5.5, waiting for the heaps' records ~5, card-steps planning ~5, write-watch askings ~4.

The guards' lock is waited for 40–67 ms a frame across threads, though it is held only about 9 ms (≈ 450 handovers a frame), mostly by the title's write faults.

Full report: #345. Code: https://github.com/mintymerry7-create/VIctory-7900XTX/tree/rdna4-perf

(AI-assisted)

**@⁠mintymerry7-create** on GitHub · 2026-11-26 20:10 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/43#issuecomment-7202378792) Measured input for this plan, from an RX 9060 XT + Ryzen 7 7800X3D (Series S, FSR 4.1, frame generation). Scenes vary ±2–3 ms from run to run, so these come from `VICTORY_AB` in one run: 40–60 phases of 10 s, each phase's median compared with its neighbours. **Helped (ms per frame):** - release build without `diagnostics`: −4.6 (at equal draw counts) - refresh helper threads awake 200 µs between batches (`VICTORY_WIDE_SPIN`): −3.3 ± 1.1 - `VICTORY_STORE_BESIDE=1`: −2.0 ± 0.6 - `VICTORY_CARD_BUFFERS_MIN_MB=1` instead of 4: about −3 **No effect (within ±1):** fat LTO + `target-cpu=native`; 7 helper threads instead of 4; spinning on the guards' lock, the landing pools or the heap-sync thread; `COPY_BESIDE`. Joining up to 32 parts: +1.1. `GUARD_REST=20000`: worse. **Where the time goes:** the submitting thread is the bottleneck at about 47–50 ms a frame. The title waits for it about 15 ms a frame at presents, and the CPU is 80–87 % busy. Breakdown: refreshes ~9, title bytes under flights' writes ~6, card copies ~5.5, waiting for the heaps' records ~5, card-steps planning ~5, write-watch askings ~4. The guards' lock is waited for 40–67 ms a frame across threads, though it is held only about 9 ms (≈ 450 handovers a frame), mostly by the title's write faults. Full report: #345. Code: https://github.com/mintymerry7-create/VIctory-7900XTX/tree/rdna4-perf (AI-assisted)
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/avatarmanz--VIctory-7900XTX#43
No description provided.