Repository navigation
Clip GPU-read-only PAGE_GRAPHICS_* sub-ranges from shader UAV writes (+16% FPS) - #1014
mikael-jarvinen wants to merge 2 commits into
Conversation
…1-coder#923 trustno1-coder#890 trustno1-coder#1008 trustno1-coder#1005 trustno1-coder#801, and trustno1-coder#953 by hand Merged from trustno1-coder/VIctory-NVIDIA, all aimed at the 8 GB card / 32 GB RAM class of machine this fork targets: trustno1-coder#784 empty texture blocks kept in proportion to the card's budget (VICTORY_SPARE_SCALE=1) trustno1-coder#986 texture staging retried in smaller blocks after out-of-memory trustno1-coder#923 lists' upload buffers kept and used again, not made for each copy trustno1-coder#890 VICTORY_CARD_BUFFERS_MIN_KB, an 8 GB card's floor trustno1-coder#1008 fault-page bound raised to 16,384, <4 GiB strays skipped trustno1-coder#1005 >65,535-group indirect dispatches enabled on NVIDIA trustno1-coder#801 stall-free per-draw zero-alloc and COM fast paths trustno1-coder#953 (an upload buffer refused for want of memory is asked again once the spare scratch chunks are freed) conflicted with the tree's own try_upload_buffer split; ported by hand with the same semantics and the same log line. Not taken: trustno1-coder#991, trustno1-coder#1014, trustno1-coder#722 - they conflict in pool.rs / draw.rs / memory.rs, which trustno1-coder#784, trustno1-coder#801 and trustno1-coder#1008 already changed here.
…-coder#1014 measured; where the open world stands Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SGw6DM2fQu3WKmCUhFxrrM
|
Independent RTX 5070 Ti 16 GB + Ryzen 7 9800X3D verification on
Visuals rendered cleanly with no new glitches or corruption observed (break-room memory stayed at 27.4 GB RAM / 12.9 of 14.5 GB VRAM; note break-room camera angle had ~10% more draws in the PR run [ Automated checks: Clean merge-tree on Not tested: AI-assisted test run and summary. |
|
An A/B on a different setup: RTX 4070 Ti 12 GB, Ryzen 9 7900X, Series S profile, DLSS off. This PR's head (259c993, based on current main), one build,
So the gain looks tied to setups where those fills are expensive, like Series X at 1440p with DLSS on your RTX 3080. With Series S and DLSS off, the fills don't seem to be the limit. That might be worth a line in the description. 🤖 Generated with Claude Code |
|
A review note from reading the diff, before I run it. I have not tested it.
all.retain(|&(a, _)| a != start);A zero length is the normal case: If the title then maps writable memory at that address, through an allocation without GPU protection bits, or a fixed-address reuse that doesn't pass the null-base clear in The test A test that should fail as written:
Possible fixes:
Two smaller points from the same read:
(Read with my AI assistants, Claude Code and Codex; nothing run yet.) |
|
Tested this PR in a full 20-minute 3D A/B run on Windows 11 (8C/16T CPU + RTX 5080 + DLSS Quality + MFG 4x) — mixed result: 0 errors and strong gains on heavy draw workloads ( Setup
20-Minute 3D A/B Results (Strict 3D-only, Draw-Count-Matched)
Key Observation
|
|
I reproduced the interior-range case in a synthetic unit test on // In shadow.rs, inside gpu_readonly_tests
#[test]
fn zero_length_release_clears_readonly_range_inside_reservation() {
let base = 0x7e40_0000_0000usize;
let inner = base + 0x1_0000;
title_memory_gpu_readonly(inner, 0x1_0000);
assert_eq!(writable_subranges(inner as u64, 0x1_0000), Some(vec![]));
crate::watch::title_memory_freed(base, 0);
let after_release = writable_subranges(inner as u64, 0x1_0000);
gpu_readonly_freed(inner, 0x1_0000);
assert_eq!(after_release, None, "the released range must no longer mask writes");
}This checks the range bookkeeping with the game closed. |
|
Tested on an RTX 5080 + Ryzen 7 9800X3D (8 cores, one CCD), 32 GB, Windows 11 26200. This PR is cherry-picked onto Verification: A/B in one process. A local switch turned
So the fills drop as described (about -55 to -65 %), and the submitting thread's cost per draw drops about 5 %. The frame rate here didn't change beyond the noise. In this scene the title waits 11 to 16 ms a frame at presents either way, and the PC was paging (32 GB, 0.4 to 0.8 GB free). The frame isn't set by the preparing alone on this machine, unlike the RTX 3080 numbers in |
|
Thanks @CuteBooty and @sawetco for catching and reproducing the zero-length release bug, and @Bj0rnis, @urielbeaupre, and @POMXARK for the independent A/B runs. Review fixes pushed
Note on @POMXARK's mixed light- vs heavy-scene resultTraced why
|
…ader UAV writes
commit cd938ecac6425abc6cf622cba9d5600eb5e4f086
Author: edwardteach007 <edwardteach247@gmail.com>
Date: Sat Nov 28 14:03:55 2026 -0500
perf(gpu): implement shared Step::RefreshSet (CopySet) for Memory::bring_up (cuts ~46k per-frame Step::Refresh entries to ~191 and skips repeated sets in O(1) across copy_spans, refresh_ahead, card_steps, and run_deferred)
commit 2e5c0b9d0038e81f2eeaeb86eea30f36f23ea4fa
Author: edwardteach007 <edwardteach247@gmail.com>
Date: Sat Nov 28 13:46:14 2026 -0500
fix(gpu): revert 12t/8t land pool oversubscription and FEW=1024 serial filter (keep GpuWrite declare dedup & empty flush early-exit)
commit 83fffb356e12d3abf0517ac428a6a880f9828e80
Author: edwardteach007 <edwardteach247@gmail.com>
Date: Sat Nov 28 13:36:08 2026 -0500
perf(gpu): inline lock-free refresh pre-filter up to 1024 spans + early-exit/inline <8 + GpuWrite declare dedup (host.rs), and scale victory-under (8t) & victory-records (12t) pools with CPU count (land.rs)
commit 031e17c4f08d680fb915ecfd7f917cc676e3bd7f
Author: edwardteach007 <edwardteach247@gmail.com>
Date: Sat Nov 28 13:19:22 2026 -0500
chore(gpu): pass split_allocations=true to ask_run in ask_once (SkillIssueXO 325c38a7)
commit cd95608004f914e0c4d45204fc0f0beee30ea160
Author: Codex <codex@localhost>
Date: Fri Nov 27 18:41:25 2026 +0200
Initialize water tile reductions before per-lane exits
Adapt the LDS accumulator analysis from fxceless/victory-fork a918163. Assign the initializer to one host thread and synchronize the group before any dispatch-count guard or console branch.
commit 372f4c2733cb63139259c9b6f2c8b3d99eb76dff
Author: Codex <codex@localhost>
Date: Fri Nov 27 23:55:29 2026 +0200
Reuse allocation boundaries when batching write-watch queries
commit 7b0f3f44410bd0d5af4abf5954125d45a1f94734
Author: Codex <codex@localhost>
Date: Fri Nov 27 22:27:49 2026 +0200
Batch refused write-watch ranges within Windows allocations
commit 126e2b144df0683050e7e00af0fc2f3531e9a37b
Author: edwardteach007 <edwardteach247@gmail.com>
Date: Sat Nov 28 13:02:51 2026 -0500
fix(gpu): restore single-window-per-cell named_window and default VICTORY_WINDOW_REACH_KB=0 (eliminates +1-3GB loose_mb bloat & false noRoom=1 while keeping VICTORY_WINDOW_REACH_KB=2048 opt-in)
commit 9d93c9d368910ce822b32cf0596aac7f794f6fae
Author: edwardteach007 <edwardteach247@gmail.com>
Date: Sat Nov 28 12:52:33 2026 -0500
fix(gpu): apply #1197 2 MiB extended window only to near-boundary unsized asks (-1GB loose_mb/d3d_shared_mb, eliminates false noRoom=1 & reuploadFull)
commit cd8a06ba9ec292a967a87e0002e555fa42948b9e
Author: edwardteach007 <edwardteach247@gmail.com>
Date: Sat Nov 28 12:42:32 2026 -0500
perf(gpu): restrict #1197 extended window to near-boundary unsized asks (-1GB RAM/0 noRoom), O(log N) ahead_holds in lock-free watch (SkillIssueXO), skip unguarded PROTECTED GetWriteWatch (Yaekai), and inline small descriptor/send batches (CHECK6960)
commit f32fd7080475fd4e433cdd603c21782af9dc6810
Author: edwardteach007 <jgarder@gmail.com>
Date: Sat Nov 28 12:26:42 2026 -0500
fix(gpu): revert #1214 pool::texture_room (caused false noRoom=1, 23x reuploadFull, 10x unmapped passes & 357ms stall) and restore #1193 triple buffering (+1.2 avg / +2.6 max fps)
commit 83f587800d8133a8a9ca39e3517946002fced47c
Author: edwardteach007 <jgarder@gmail.com>
Date: Sat Nov 28 12:16:48 2026 -0500
perf(gpu): default VICTORY_SWAP_BUFFERS=2 (recover -5.9ms chaos GPU wait) and VICTORY_WINDOW_REACH_KB=1024 (halve #1197 RAM overhead while keeping vehicle/decal fix)
commit bfa96ffbded1018560a5dd2bb8aa0ecbffe4bf75
Author: edwardteach007 <jgarder@gmail.com>
Date: Sat Nov 28 11:53:25 2026 -0500
chore: fix pool::memory block count (#1214) and defer OP_CLEANUP inside OP_CANCEL (#1205+#868)
commit 8631fb9d4d835104cd739796311b70c7ad031d81
Author: ghptc <pittacgh@gmail.com>
Date: Sat Nov 28 12:42:46 2026 -0300
Credit texture budget only for reusable pool ranges
commit 54ede06d3ae0f031ad2caf09509abb61260999d4
Author: Jineggegg <175915664+Jineggegg@users.noreply.github.com>
Date: Sat Nov 28 15:31:32 2026 +0000
XAsync: publish the final status before removing a completed call
An error or zero-size completion removed its call before provider cleanup. A blocking status query could miss the call during cleanup and read E_PENDING instead of the work result.
Keep the claimed call available to waiters during unlocked cleanup, exclude it from new work, then publish the status and remove the entry under the registry lock. Return the captured call result to existing waiters even if the block is reused. Exercise the race deterministically with a paused cleanup.
Adapted from Jineggegg/VIctory round 1 item 3 (e071177) to current main.
commit fabd9896e59ef17842f253ab66210c16dca217a1
Author: champagneluv <319602954+champagneluv@users.noreply.github.com>
Date: Sat Nov 28 17:16:25 2026 +0200
perf(gpu): default swap chain to triple buffering (VICTORY_SWAP_BUFFERS)
commit a2cab03cc73cad0e3ba7a94e2bf98eaf562b8b9a
Author: timorjay <203254134+timorjay@users.noreply.github.com>
Date: Sat Nov 28 23:31:19 2026 +0800
Cache the raw SRV byte-bias flag with its root binding
commit 94be2877d336fc008a07d57bb36f2f59b5e5d2a9
Author: CristianCiubancan <77240071+CristianCiubancan@users.noreply.github.com>
Date: Sat Nov 28 18:18:05 2026 +0200
GPU: every ask inside a cell names the cell's one long window
With the reach, an ask without a length named a 6 MiB window while an
ask with a length in the same cell still named the 4 MiB one: two
copies of the same memory where there was one. On the 4 MiB grid an
ask with a length whose window is that cell now names the long window
too. Asks cut finer than a cell, or over more than one, name the
window they did.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
commit 07dcdcd661747f17de9caf99e291f9254202052f
Author: CristianCiubancan <77240071+CristianCiubancan@users.noreply.github.com>
Date: Sat Nov 28 17:23:14 2026 +0200
GPU: a view without a length reads 2 MiB past its 4 MiB window
The title binds each mesh's vertex block as a root view, which has no
length: the console reads from the address as far as the program goes.
The window of title memory behind such a view ended with its 4 MiB cell,
so a block that began near the cell's end was cut off and what lay past
it read zeros: vehicle bodies with panels missing or drawn as slabs
across the body, matte paint, decals missing from part of the body.
A window asked for without a length is now its cell and
VICTORY_WINDOW_REACH_KB of the next (2048 by default; 0: as before).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
commit 3abf095fd4ea43ed49c93f3749cc4e41c34ee374
Author: Hamody47YT <hmd2832006@gmail.com>
Date: Sat Nov 28 18:48:22 2026 +0300
get-nvidia-sdks.ps1: require valid NVIDIA signatures on downloaded DLLs
commit ea46a519fa4d4b59e795f500bbdfaaa0815d9455
Author: Yuanzer <259577338+Yuanzer@users.noreply.github.com>
Date: Sat Nov 28 23:43:08 2026 +0800
CLI: contain one shader panic during precompile
commit 30f3da69630624c08e9784f18ab477f84b73bfd3
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sun Nov 29 03:45:48 2026 +1100
Series 1.0.2.1: every archive of the package is checked as RPF9 before the start
Beyond the port: a damaged archive further in stops the title later and
says nothing either. In Marvisak/VIctory#3492 a resumed download had left
pack\story000_restofworld\story000_restofworld.rpf at the right size with
its first 16 MiB zeroed. The title trapped at +0x29defb1 one to four
minutes into the start, and replacing the damaged files ended it. #1250
here has that trap.
All 22 archives of Series 1.0.2.1 are RPF9 (counted in Marvisak/VIctory#12).
So before that build runs, every .rpf beside the executable and under its
pack folder must start with "9FPR". Those that don't are named, relative to
the folder, and the start stops. `--set VICTORY_ARCHIVE_CHECK=0` starts
anyway. Blocks zeroed further in are not seen. Other folders and file types
are not looked at, and a bare file name checks the current folder.
Test: damaged_archives_of_the_package_are_named.
commit 05efca76778d49c9ac2dbde51436393865c7924c
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sun Nov 29 02:44:48 2026 +1100
Series 1.0.2.1: the startup archive is checked before the title runs
Without appdata0.rpf beside the executable, or with another file in its
place, the title stops in its package mounts at a breakpoint (+0x2237178)
before any window, and nothing says why. Upstream found this (Marvisak/VIctory
#8, #12): removing only appdata0.rpf reproduced the breakpoint and its
registers.
Ported from Marvisak/VIctory a3acc87 by Peter Bonanni: KNOWN_BUILDS names
Series 1.0.2.1 by its executable's BLAKE3 (a build identity, which
docs/asset-policy.md allows), with appdata0.rpf as its startup archive. Before
executing that build, `run` reads the archive's first four bytes and stops
with an error naming the file if it is missing, unreadable, too short or not
RPF9 ("9FPR"). The build line now says "Series 1.0.2.1" instead of "unknown".
Test: the_startup_archive_is_checked_before_the_title_runs.
commit ae903937a2a484bd831414a740498595ccab68a4
Author: ghptc <pittacgh@gmail.com>
Date: Sat Nov 28 12:42:46 2026 -0300
Reclaim unregistered page-pool records while retiring their handles
commit dad2028a5b11c8a17bae1e85df52098d4bcab46c
Author: ghptc <pittacgh@gmail.com>
Date: Sat Nov 28 13:45:18 2026 -0300
Compose BGRX scene planes through their legal sampled views
commit 25ce0f771ae125558f16ece382bc1aaa44056a4e
Author: KelvinSilvaDev <63024154+KelvinSilvaDev@users.noreply.github.com>
Date: Sat Nov 28 12:56:03 2026 -0300
Profiler: unwind a copy of the sampled thread's stack (VICTORY_PROFILE no longer crashes the title)
VICTORY_PROFILE ended the process about when sampling began: an access
violation inside ntdll from stacks::frames_of -> crash::unwind_into ->
RtlVirtualUnwind, reading through a frame register that held anything
(after a step taken by rsp) or stack pages the thread never committed.
frames_of now copies the stack (from rsp up, at most 512 KiB, zeros
after) with ReadProcessMemory while the thread is suspended, resumes it,
and unwinds the copy (crash::unwind_copy): stack registers that point
into the copied range are moved into the copy, and a frame register that
points elsewhere ends the walk. unwind_into, the crash handler's live
walk, stops where a frame register lies outside the thread's stack.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit 560c0ea31f933433be553868970bd5efa981ee7e
Author: Damokles2 <128941550+Damokles2@users.noreply.github.com>
Date: Sat Nov 28 16:56:32 2026 +0100
perf(shader): borrow native code without export patches
commit a6267411f6f5dd2b0443b2c8f9069823497ba3d4
Author: Damokles2 <128941550+Damokles2@users.noreply.github.com>
Date: Sat Nov 28 17:25:05 2026 +0100
perf(formats): avoid mip layout scratch allocations
commit bccd303d0cb134286213d8a8a33c1f618d633e04
Author: CristianCiubancan <77240071+CristianCiubancan@users.noreply.github.com>
Date: Sat Nov 28 18:44:32 2026 +0200
GPU: small textures back to back do not make one another stale
A placed texture view made every older view stale whose memory began
within 4 KiB of its own. The title packs its smallest textures back to
back (colour tables of 256 bytes, sixteen to a 4 KiB block), so each
one written made its neighbours null: far buildings, which take their
walls' tint from such a table, came out black. Views at address 0,
which describe no memory, did the same to one another.
Two views now clash only where one begins inside the other's head (its
first 4 KiB, or all of it where it is shorter), and a view at address 0
is not looked at.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
commit 683e59cd85e54d3585bc2a85403a77243bf45891
Author: edwardteach007 <jgarder@gmail.com>
Date: Sat Nov 28 11:44:29 2026 -0500
perf(gpu): batch card_steps constant slots (#1157), deduplicate all root CBV/SRV/UAV/table bindings in draw.rs, fix cores::TITLE_PLACED, and clean compiler warnings
commit d195300a3b0d1f9d88175cd6e5acba47a244d2eb
Author: Ethan Anderson <ethan@hellofans.ai>
Date: Sat Nov 28 13:32:53 2026 +0100
cores: place dual-CCD V-Cache CPUs on CCD0 and isolate victory-submit on a dedicated core
On dual-CCD 3D V-Cache processors (e.g. Ryzen 9 9950X3D / 7950X3D, where
all cores share one efficiency class and one L3 complex has >= 16 logical
processors and a larger cache than the other):
- Place the process default CPU sets on the larger-cache half
(VICTORY_CACHE_CORES=0 disables) and move background pipeline makers,
DirectStorage workers, and D3D Background Thread shader compiles to the
other half.
- Carve one physical V-Cache core (removing both SMT siblings from the
process default CPU sets) and pin victory-submit to its primary logical
processor at THREAD_PRIORITY_HIGHEST (VICTORY_SUBMIT_CORE=1|0|ccd1,
VICTORY_SUBMIT_PRIORITY=-2..2).
commit 27400eb862bebd3fc7640aaa0ac4c4ba4cce58ca
Author: edwardteach007 <jgarder@gmail.com>
Date: Sat Nov 28 11:26:53 2026 -0500
chore(gpu): finalize #1094 lock-free PageEpochs, SeqLock ranged, pending_len, and Arc card_dirty integration
commit d11bd1cae489afb0f5d049d3f53061aec8f0206b
Author: Ethan Anderson <ethan@hellofans.ai>
Date: Sat Nov 28 14:58:34 2026 +0100
shadow: add explicit Release fence after odd SeqLock store in ranged writer
commit 2775a6cc9125e8f92e57b2e2c446cc6410908b37
Author: Ethan Anderson <ethan@hellofans.ai>
Date: Sat Nov 28 13:34:10 2026 +0100
gpu: lock-free refresh checks, single-lock scoped pool, and zero-clone card_dirty
Eliminate lock contention and per-flush heap allocations on the
victory-submit critical path:
- watch.rs: 3-level lock-free PageEpochs table (128 TiB, single-page
fast path, Release store under exclusive JOURNAL write lock),
lock-free is_kept() mirror, reusable ahead_snapshot_into, and
zero-alloc nothing_new_with / nothing_new_single.
- shadow.rs: replace Shadow::copied Mutex<Vec<u64>> + ranged Mutex with
copy_lock + Box<[AtomicU64]> + SeqLock ranged + pending_len
AtomicUsize (smaller struct, zero-lock nothing_new_with); single-lock
zero-alloc wide_each_scoped sharing Workers::queue (0 exit locks for
non-last helpers); remove per-page Mutex in merge_under_writes;
zero-clone Arc<Vec<(usize, usize)>> in card_dirty / SentRuns.
- host.rs, host/send.rs, host/upcheck.rs: skip redundant
ask_ahead/ask_ahead_done when ask_once is active, batch FLUSHES[2]
updates per chunk, reuse Batch::ahead_snap, and pass Arc ranges.
- land.rs: lock-free AtomicUsize work index in land::Pool.
commit 90e6816d50348236b14010484d792c443841ca29
Author: edwardteach007 <jgarder@gmail.com>
Date: Sat Nov 28 11:12:44 2026 -0500
perf(gpu): deduplicate IASetVertexBuffers/IASetIndexBuffer & host SetRootArg calls, separate intentional RT builder skips from real DROPPED (now 0/frame), and label GDKX Deserialize*PipelineStateX
commit e73015455480ce231b246edae171596c48d90f6e
Author: edwardteach007 <jgarder@gmail.com>
Date: Sat Nov 28 11:05:25 2026 -0500
feat(gpu): enable per-reason dropped-call telemetry in release builds (#800), elide zero-work draws/dispatches & redundant IASetPrimitiveTopology, and label GDKX Deserialize*PipelineStateX
commit f4a1d4a10be1cd9660f2fb7d5d23f8174e3108d4
Author: edwardteach007 <jgarder@gmail.com>
Date: Sat Nov 28 10:50:01 2026 -0500
perf(gpu): pre-filter all no-op refresh spans under one JournalRead before ask_ahead (#1133) and make VICTORY_GPU_RO_SKIP opt-in (=1) to eliminate 8x GpuWrite flush fragmentation
commit d8582e5bf0ad2341b11c93dfcb5b23f7b1e08e63
Author: edwardteach007 <jgarder@gmail.com>
Date: Sat Nov 28 10:24:54 2026 -0500
chore: integrate #1014 (GDKX PAGE_GRAPHICS_* UAV clip), #1147 (transient RT aliasing + copy-queue sync), and origin/main menu
commit 7bb32ec044dc10ce1d433d536e5aa5164638e657
Author: Mikael Järvinen <mikaeljarv@gmail.com>
Date: Sat Nov 28 16:12:06 2026 +0200
gpu: physical-page transient RT aliasing, lazy depth-UAV twins, and unmapped RT reclamation
commit f62f0a59f6917575563996bde345250843b8fbd8
Author: invismann <73877188+invismann@users.noreply.github.com>
Date: Sat Nov 28 12:13:03 2026 +0100
Shaders: fix ds_bpermute_b32 lane selection on Wave32 hosts
commit d11592515cf214b6bd9befcfa917f216d1711f0c
Author: Mikael Järvinen <mikaeljarv@gmail.com>
Date: Sat Nov 28 17:01:38 2026 +0200
Resolve zero-length release extents and page-align GPU-RO tracking
commit 4573ff72fb75cd4651ae578d0463dd578e27cfcb
Author: Mikael Järvinen <mikaeljarv@gmail.com>
Date: Sat Nov 28 12:59:14 2026 +0200
Clip GPU-read-only PAGE_GRAPHICS_* sub-ranges from shader UAV writes
commit 79a4b2c7e87e6cb276d6fe9e2e4fa05f7348d7e1
Author: ghptc <235817223+ghptc@users.noreply.github.com>
Date: Sat Nov 28 09:59:59 2026 -0300
Use the shared compiler for replay merge and test its GPU output
commit 34c4fc8b1dee5358fda9bffe151d3d9cbee45e1b
Author: ghptc <pittacgh@gmail.com>
Date: Sat Nov 28 10:08:01 2026 -0300
Shader: check the DXGI software flag before creating a WARP device
DXVK can return its first hardware adapter from EnumWarpAdapter. A shader readback requested on WARP then silently repeats the hardware run. Check the DXGI adapter flags before device creation. Add a test that resolves the created device by LUID and verifies its software flag.
commit 12fa4f8b3cc76e26d3e93057e9badcabd3f51838
Author: Hermes Agent <hermes-agent@localhost>
Date: Sat Nov 28 13:22:09 2026 +0000
fix(loader): keep Windows crash handling out of portable builds
Gate Win32-only crash reporting and host-executable PE tests to Windows. Keep cache publication available on Windows and under test so the portable loader builds and its Linux tests run.
commit 55273cdff9f802186db22606112800bb32713c25
Author: adwen-007 <adwen-007@users.noreply.github.com>
Date: Sat Nov 28 12:50:55 2026 +0200
fix(input): pause mouse capture and warp while dragging or resizing the window
commit 862f2dabf4d6a75ff04011e8792cf2ce23b13a56
Author: Pedro Castro <128580843+cloph-dsp@users.noreply.github.com>
Date: Sat Nov 28 12:51:02 2026 +0000
victory play: map verbatim UNC paths back to network paths (#1072)
commit 75c8d20371f0eccc9aa96aa1492d555b184ce9ec
Author: Hermes Agent <hermes-agent@localhost>
Date: Sat Nov 28 12:57:33 2026 +0000
fix(config): report invalid configuration file paths
Only fall back to defaults when the optional victory.toml is genuinely missing. Report invalid file types, dangling symlinks, and filesystem errors with the configuration path.
commit 1ceadb816470bdfaa203652b0d1f15f426e336a8
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sun Nov 29 02:08:46 2026 +1100
Mouse and keyboard: bindings read again after KEY BINDINGS, also after a file that did not read
config() reloaded bindings.ini when F1's KEY BINDINGS wrote it only if the
first read had worked. With a typo in the file (as `RT = LeftClick`), mouse
and keyboard were off at the start ("Mouse and keyboard disabled: Invalid
binding on line ..."). Setting the line in KEY BINDINGS then wrote a good
file, and said "SAVED TO BINDINGS.INI AND USED AT ONCE", but it was never
read again until a restart.
The rule is now refresh(): read the first time, then again whenever the
write count moved, whatever the last read gave. A write that no longer reads
still keeps the last bindings.
Test: bindings_are_read_again_after_a_write_even_after_a_file_that_did_not_read
(it fails with the old rule).
commit 4aa64482a6e93330b2672e0955d79a5d3bad43aa
Author: whoalin1 <207920491+whoalin1@users.noreply.github.com>
Date: Sat Nov 28 12:22:18 2026 +0200
feat(victory-hle,victory-gpu): VICTORY_WINDOW_OFFSCREEN=1 keeps the title's window off every screen
Port of ScarlettPort 5831360 for background test runs (nothing of a test may
show on the user's screen). Off by default. The title's top-level window is
created at -32000,-32000 with WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE (no taskbar
button, never takes the keyboard), and our window procedure keeps every later
move there (WM_WINDOWPOSCHANGING, on the title's own thread). Not minimized or
hidden, so the title renders and presents as before; VICTORY_KEYS works
without focus. This fork's VICTORY_FULLSCREEN and VICTORY_MOUSE_CAPTURE are
skipped while it is on. The GPU crate's fallback window follows the switch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit af232712a55d7fb2594ba128cf57ee17acffe554
Author: ghptc <pittacgh@gmail.com>
Date: Sat Nov 28 11:35:18 2026 -0300
Record Linux trial memory from outside the workload cgroup
commit c485969de17ebeb198b73d681e1a94afb6e9bd7c
Author: Hermes Agent <hermes-agent@localhost>
Date: Sat Nov 28 14:06:51 2026 +0000
fix(diagnostics): preserve traces and report frame and scan results accurately
Keep timeline artifacts distinct and avoid dropping or misattributing waits when a fence was not captured. Surface census probe I/O errors, and base fault-book rates and hot-block counts on completed frames. Cover the regressions with synthetic fixtures.
commit 325647c2848f4e46bd4e76c89d1ea326d43cba47
Author: mstrmoos <259750491+mstrmoos@users.noreply.github.com>
Date: Sat Nov 28 14:12:40 2026 +0000
Words of the title's image held at given values (VICTORY_IMAGE_HOLD, off by default)
The write-back twin of VICTORY_IMAGE_WATCH, as a trainer does: a value the
title keeps moving, such as its world clock, held still ten times a second
so that launches compared against each other show the same scene (by day,
the card is ~71% busy; by night 91-95%, and frame times differ by 30-60%).
The offsets and values come from the user's settings; nothing of the
title's is in the layer.
commit 23941cfc73a7734d42128950f167bb34b4f3968b
Author: 101Leafy <6332664+101Leafy@users.noreply.github.com>
Date: Sat Nov 28 05:54:07 2026 -0600
Crash: VICTORY_STACKS_AT_KILL=1 prints every thread's stack when the title writes to address 0, its GPU watchdog's kill
commit 4c7ca9d331b2c95981ed5e5335d333c00b2da630
Author: 101Leafy <6332664+101Leafy@users.noreply.github.com>
Date: Sat Nov 28 08:43:58 2026 -0600
Timers: VICTORY_TIMER_LOG lines in release builds too, so they can be timed on the game clock
commit df5d90dbd6340b1e63293d165affab482e75de5b
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sun Nov 29 00:13:13 2026 +1100
Relay: fence_short's note that fail() already names why the device was lost
A review asked for the removal reason (hung or reset) in the lost-device
wording. fail() already adds it to the same line ("; device removed: ...
(0x887A0006)", as in #972's log), so the note says so instead of asking twice.
commit d582504c0e966a78aeb06c8f1f7aed5d37e27e4a
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sat Nov 28 21:53:36 2026 +1100
Relay: a fence wait cut short by a lost device says so, not "fence 18446744073709551615"
Once the device is removed, every fence reads u64::MAX, and the relay
already takes that as the device gone (fence_reached). Its message still
printed it as a value: "relay: fence 18446744073709551615 did not reach
312701; device removed: ... (0x887A0006)", which was read as an
underflow of ours (#972) when the cause was the hang named after it.
The message now says the device was lost before that fence value was
reached. A fence that read a real value short of its target is told as
before.
commit ff907f4c4ea6f60acf8c8e58400f51f6169b7dd1
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sat Nov 28 23:25:26 2026 +1100
victory play: on Windows 10, a runtime in place and still below 6.6 names Windows' own floor, not only the driver (#1035)
With Microsoft's D3D12 runtime fetched beside victory.exe and the card
still at shader model 6.5, the start stopped with "it is the graphics
driver: update it, or use Windows 11". On Windows 10 that runtime is
only loaded from version 1909 with its updates (build 18363.1350, or
19041.789 for 2004 and 20H2; never on 1809 or LTSC 2019), so an older
Windows 10 is as likely as the driver. #1035: the runtime fetched and
signed, still 6.5, on an RTX 5060 whose driver runs 6.8.
On Windows 10 the message now gives the build and that floor, and says
to update Windows or the driver. Windows 11 keeps the driver message.
commit 45fb0587052c2225770bb832ea2e45f40cb4d6f2
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sun Nov 29 01:34:28 2026 +1100
victory.exe: only a copy of Windows' own d3d12.dll beside it is set aside
The hook loaded System32's d3d12.dll whatever lay beside the program. But a
d3d12.dll there can be wanted: the Wine notes in #120 put vkd3d-proton's
beside victory.exe, with a native override. check_d3d12_beside now reads the
file before Direct3D 12 is loaded. Only a copy of Windows' own (a 10.x version
resource from Microsoft Corporation) sends d3d12.dll to System32; anything else
is loaded as before.
A copy of this PC's own d3d12.dll beside the program also broke it on main
(`victory shader-model` answered "none"); with this it answers 6.8.
Test: a_copy_of_windows_own_direct3d_12_is_set_aside_for_system32s.
commit 9783b7c3dab4fd59c0321bb1210030f3d1627cd2
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sun Nov 29 01:26:27 2026 +1100
victory.exe: Direct3D 12 from System32, never a d3d12.dll beside it (#1035)
victory.exe delay-loads d3d12.dll (build.rs), and the delay-load helper
looks in the program's folder first. #1035's game folder held Windows 10
2004's D3D12.dll (10.0.19041.423). On Windows 11 with an RTX 5060 that copy
answered shader model 6.5 and ignored D3D12SDKVersion and the Agility SDK
runtime beside it, so `victory play` refused the start.
A notification hook (__pfnDliNotifyHook2, which delayimp.h lets a program
define) now loads d3d12.dll with LOAD_LIBRARY_SEARCH_SYSTEM32 before the
helper would. Other DLLs are left to the helper. It still loads at the first
use, so D3D12SDKVersion is read when it was. A d3d12.dll beside the program
is named at the start as not used.
Checked with a stand-in D3D12.dll beside a copy of victory.exe: main's stops
with 0xC06D007E (the helper loading that file), this one loads System32's
and `victory shader-model` answers 6.8.
Test: direct3d_12_is_windows_own_from_system32.
commit 04ca6f9a01efc95e71c3341a56f74c43475ee262
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sun Nov 29 00:11:49 2026 +1100
MFG Unlocker offer: not to Ada workstation cards numbered 2000 or 3000
"NVIDIA RTX 2000 Ada Generation" and "NVIDIA RTX 3000 Ada Generation Laptop
GPU" read as models 2000 and 3000, so older_rtx took them for RTX 20 and 30
cards and the start offered them MFG Unlocker, though they run DLSS Frame
Generation of their own (dlss_framegen_card is true for both). older_rtx now
leaves out every card dlss_framegen_card names.
Found in review by Exopus-0x65f7ad0. Test: cards_offered_mfg_unlocker.
commit 761b2b036c67fa3760a92c2f44c78d41e97b2ffa
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sat Nov 28 22:55:13 2026 +1100
Frame generation: a card's model number is read past a mark in its name (#1028)
dlss_framegen_card read the four digits right after "RTX" in the card's
name, and so did the launcher's older_rtx. A sign there that is neither
a digit nor whitespace (a trademark sign, a zero-width space) stopped
the number: #1028's notice says "GPU: NVIDIA GEFORCE RTX 5080" (the
notice's font keeps ASCII letters, digits and spaces only) over "DLSS
FRAME GEN: NOT ON THIS CARD (RTX 40 AND UP)". Read as it is written, the
name returns true; so it has such a sign.
rtx_model reads the number on the name's ASCII letters and digits alone,
past "(TM)" and "(R)", and both checks use it. The card families each
one takes are the same as before.
commit 230c3850f2442e0b4711487191e46199f4e30847
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sun Nov 29 00:06:58 2026 +1100
MFG Unlocker: loaded only at a start with DLSS frame generation (#955)
With MFG UNLOCKER on, every start loaded the mod, even with frame generation
off or AMD's FSR 3 picked, where it has nothing to unlock. It hooks the game's
DirectX all the same: on an RTX 3060 with frame generation off, black and
glitching textures went away once it was turned off (#955).
It is now loaded only where DLSS frame generation is on or made ready
(VICTORY_FRAMEGEN=1, which also covers switching it on in F1 while playing).
Otherwise the start says it is on but not loaded, and why. It is still fetched
once it is on, as turning it on said. The offer's text, the F1 line and the
README say when it runs.
Test: mfg_unlocker_is_loaded_only_with_dlss_frame_generation (off, on, FSR 3
picked, option off, ready but off, no NVIDIA files); it fails on main's rule.
commit 33daca6b1f0f21102fb0f36ae26dbe28418902e4
Author: Alxspb <26502530+Alxspb@users.noreply.github.com>
Date: Sat Nov 28 17:32:25 2026 +0300
DLSS MODEL: AUTO, a preset per mode (M for performance, L for ultra, K for the rest)
VICTORY_DLSS_PRESET and the F1 DLSS MODEL row gained "auto": the preset
is then chosen from the resolution mode the frame runs in, the way
NVIDIA App recommends - M for performance, L for ultra performance, and
K for quality/balanced/DLAA. A 64 MiB block of VRAM and the FP8 cost
differ by model, and a fixed model across all six modes pays for the
worst case everywhere; "auto" gets the right model per mode without
the user having to think about it. The default stays "default" (the
title asks; we obey) - "auto" overrides that on purpose.
plan::AUTO is a sentinel; plan::resolve() maps it at DlssOptions::new
time, where the mode is known. Logs and stats print "auto" plus the
model it resolved to, so a capture still tells you which nvngx binary
ran.
commit bb0cee6736b2e4ab2af3d66ffcad5519ee7514b3
Author: ghptc <235817223+ghptc@users.noreply.github.com>
Date: Sat Nov 28 10:17:13 2026 -0300
Release stale early pipeline entries after promotion
commit dae41bf053d17a22968d2eaba20abaab7122ec54
Author: local <local@localhost>
Date: Sat Nov 28 14:27:36 2026 +0100
Pipeline library: keep pipelines whose static samplers were primed, and drop quick ones from the slow list
Pipelines with static samplers never went into the library (7fa0e95): a
pipeline loaded in another process read through the samplers at its
places in that process's driver table. Since the samplers of the list
are made first in one order (`samplers::prime`), those places are the
same in every process. On an RTX 3060 (driver 621.40) the driver's own
cache did not find these pipelines either: about 1,100 were made at
every start, 2.2 s each (median), 4.5 minutes at 3.5 fps in the world.
- A pipeline whose static samplers were all made by `prime` is loaded
from and stored in the library, under a name that holds their places.
Samplers met later in a run may come after the layer's own (composite,
tiles): pipelines with them are made as before, and kept from the next
start on. VICTORY_LIBRARY_STATIC_SAMPLERS=0 keeps none (as before),
=1 keeps all (as before 7fa0e95).
- A pipeline listed as slow that comes in under SLOW_MS (loaded from the
library) leaves slow-pipelines.txt: listed, it waited behind the
quarter of the workers slow ones may have at every start.
lut3d_probe on the RTX 3060: stored and loaded with the same ten samplers
made first, 64 of 64 samples filtered; loaded after ten others, 0 of 64
(the fault 7fa0e95 avoids).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit 38e06f42ec8164ddb31cac80886da87cfb4a6908
Author: Mumogg <104529023+Mumogg@users.noreply.github.com>
Date: Fri Nov 27 20:15:16 2026 -0600
XMem: title memory below 128 GiB, the by-address directory's reach
Shaders that reach title memory by address look pages up in a directory of
MEMORY_PAGES (2^21 x 64 KiB = 128 GiB). XMemVirtualAlloc allowed up to 40 bits,
so on some starts Wine placed ~7.5 GB of the title's pools above 128 GiB: every
access there capped to page 0x1fffff ("pages that had no copy", read 0), and
vehicle body panels vanished a second after they were drawn (#218).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit df0893b44c3c99b76dbe9fa32e0d96e122039ec2)
commit 855213a38d18e431578c69e7410a11a8ae7ff67f
Author: invismann <73877188+invismann@users.noreply.github.com>
Date: Sat Nov 28 12:11:45 2026 +0100
Replay: sample depth and stencil using their copy layouts
commit 39d77cd7b93d019b3e9fed473fa81857151d3154
Author: Damokles2 <128941550+Damokles2@users.noreply.github.com>
Date: Sat Nov 28 11:57:52 2026 +0100
fix(formats): reject block-compressed 1D texture layouts
commit 8ccf5e7cc5297990f85453b0e56c4dcfb5f80c54
Author: Pedro Castro <128580843+cloph-dsp@users.noreply.github.com>
Date: Sat Nov 28 13:04:45 2026 +0000
victory-shader: bounds-check bitcode value lookups
commit 803cbd4001d07f46be0f67a119d910c398a9d1b9
Author: ghptc <235817223+ghptc@users.noreply.github.com>
Date: Sat Nov 28 10:17:09 2026 -0300
Evaluate shader lane-mask selects iteratively
commit 9313132e5d6cdbe291a498ea98608c9dc3b879eb
Author: ghptc <pittacgh@gmail.com>
Date: Sat Nov 28 10:08:01 2026 -0300
GPU: retain immutable SRVs for each depth-plane twin
The 256-entry global ring can wrap during recording, even within a single array texture. Previously recorded draws then see the wrong layer. Keep one shader-visible heap per twin, initialized once with one SRV per (slice, mip). The recording retains the twin until reset.
Add an opt-in hardware regression that draws a 4x4 mask from slice zero of a 257-layer texture, with a different class in all subsequent slices.
commit d8bcb568a37d5dfeb6e7c736be22e0218b68fd80
Author: whoalin1 <207920491+whoalin1@users.noreply.github.com>
Date: Sat Nov 28 12:20:58 2026 +0200
fix(gpu): enable >65,535-group indirect dispatches on NVIDIA (`runs_wide`)
Allow indirect dispatches wider than 65,535 groups in x (up to `2^20`, matching AMD) on NVIDIA hardware (`0x10de`), opt-out via `VICTORY_INDIRECT_WIDE=0`.
Previously `!amd` clamped NVIDIA indirect compute dispatches to `65_535` groups, cutting off the tail of 1440p tile dispatches (e.g. `CS_FinalGather` lists of ~67,440 groups, leaving the bottom fifth unlit/smudged).
Includes `card_runs_wide_indirect_dispatches` enabled for both AMD and NVIDIA (verified passing on RTX 4070 SUPER).
commit 0036361c3577b2405acf129b31c2574a534af5da
Author: seabed-dev <362369861+seabed-dev@users.noreply.github.com>
Date: Sat Nov 28 15:57:31 2026 +0100
GPU: small unordered-access textures get their host copies with their views (the terrain's page table)
A host copy is made when a list names its texture. A texture written
through unordered access may never be named: the title's programs can take
both the view they write and the view they read from the view heap by an
index they read from a buffer. The terrain's virtual texture does. Its
page table (256x256 R16_UINT, six levels) is written by
terrain_indirection_texture:CS_UpdateIndirection and read by the
tessellated terrain's PS_TexturedDeferred that way, so its slot waited for
a host copy for a whole run and read as a null view. Every lookup gave
page 0: one tile of the atlas repeated over the ground next to water, in
strips, changing as the title drew that page again. (Seen once that
ground is drawn at all: #996.)
A texture with the unordered-access flag and neither the target nor the
depth flag, of at most 1 MiB of texels, now gets its host copy when a view
of it is written into a view heap. Targets and depth textures are left as
they are: the list that binds them names them.
VICTORY_UNORDERED_NOW_KB sets the size (1024 by default; 0: as before).
Counted on an RTX 5080 over water, a beach, a bar's inside and a street:
of about 400 such textures, 32 to 34 that nothing else makes are under
1 MiB, 1.9 MiB together; without the size limit 41 to 43, 112 MiB.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
commit 9fe86acd8a02f020641567b2c9f33d5bb60f1071
Author: invismann <73877188+invismann@users.noreply.github.com>
Date: Sat Nov 28 11:53:37 2026 +0100
GPU: fix indirect mesh dispatches when the console supplies only X
commit d11a7ba198432644da78a1e0efc2505ce19863c2
Author: shawn <me@bentsignal.com>
Date: Sat Nov 28 08:11:56 2026 -0500
Texture pass: stops after 128 slots held back for room, not 1,024 (VICTORY_TEXTURE_HELD_CAP)
With the card at the texture line every look at a slot that can only be held
back costs the recording thread some 15-20 us and makes nothing. At a
cutscene's cuts on a 16 GB card, passes held 6,000-35,000 slots a second and
took 150-550 ms a second. The slots not reached stay due for the next pass.
VICTORY_TEXTURE_HELD_CAP=1024 restores the old cap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit 905114160bf4f024929d6f238d52c660722ceba3
Author: erax4193 <erax4193@users.noreply.github.com>
Date: Sat Nov 28 16:13:57 2026 +0300
pipeline: classify stores in a single decode pass
Both `stores` and `stores_by_address` previously decoded the native
shader program independently, paying the full decode cost twice per
program. The new `classify_stores` function decodes once and checks
both predicates in one pass, short-circuiting as soon as both are
found.
Closes #1055
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
commit 3973612ce1ffe82f47b435d9b5853ad43b230028
Author: 101Leafy <6332664+101Leafy@users.noreply.github.com>
Date: Sat Nov 28 06:33:41 2026 -0600
Indirect light stand-in: VICTORY_AMBIENT_ASIDE=1 makes its passes on a thread of ours and leaves them out until made, so a list thread never waits in the driver cache with the frame behind it
commit c5003856d64868b496aade2d463fa5b719721369
Author: 101Leafy <6332664+101Leafy@users.noreply.github.com>
Date: Sat Nov 28 06:34:22 2026 -0600
Send: VICTORY_SEND_PASS_AWAY=1 makes the pass for changed words off the submitting thread, copies meanwhile
commit c24fe55022fb9449b08d36a962c0e8f0162e543d
Author: adwen-007 <adwen-007@users.noreply.github.com>
Date: Sat Nov 28 12:50:55 2026 +0200
perf(gpu): use runtime-dispatched AVX2 non-temporal stores for large snapshot copies
commit 7d22685316434b138f046fdfde1b864271afe83d
Author: Yumaste <yumaste@outlook.fr>
Date: Sat Nov 28 12:46:17 2026 +0100
GPU: batch memory notifications from each landing job
commit 6ea6158aa26a39db573934de81c342c4049530c7
Author: shreezzz <shreeshgupta01@gmail.com>
Date: Sat Nov 28 19:42:23 2026 +0530
fix(xmem): apply address_range(0) bounds to watched_reservation
Keep large write-watched XMemAllocDefault reservations out of the low 4 GiB reserved for ADDRESS_32BIT / ALLOC_32BIT requests and honor the 64-bit upper bound from address_range(0), with regression checks across min, 64 KiB, and 2 MiB alignments.
Assisted-by: OpenAI Codex, Google Gemini
commit e57a3f758d1c75413498bb73411c8f263f29a78c
Author: shreezzz <shreeshgupta01@gmail.com>
Date: Sat Nov 28 07:44:38 2026 +0530
perf(xmem): write-watch large XMemAllocDefault allocations
commit 6f7a85ef0d2457a71040bab8104137f14c5f1c04
Merge: a9f29662 9ce3cf9e
Author: jgarder <jgarder@gmail.com>
Date: Sat Nov 28 10:16:23 2026 -0500
Merge remote-tracking branch 'origin/main' into test
# Conflicts:
# crates/victory-gpu/src/host/menu.rs
# crates/victory-hle/src/modules/gameinput.rs
commit a9f29662fe1bfd88fbd9db1994a1c9a6f5b94f17
Author: edwardteach007 <jgarder@gmail.com>
Date: Sat Nov 28 05:56:24 2026 -0500
chore: integrate #923/#973 Spare::give eviction, #933 watch::protect, #908/#883 dstorage, and #868/#913/#939 xgamesave cancel completion
commit 82677db5cea20b17388e8f1831d4013ce135f181
Author: jptorres96 <jaimepereztorres96@gmail.com>
Date: Sat Nov 28 11:23:21 2026 +0100
GPU: a full scratch pool frees its oldest chunks to keep the one given back (#930)
Spare::give refused the returned chunk once the kept bytes reached the limit, so chunks of a size nobody asked for any more held the room and every chunk of the size in use was made and freed again. Now the chunks kept longest are freed until the returned one fits; the trim window counts only what was kept before it. VICTORY_SPARE_EVICT=0 keeps the old behaviour. Unit tests include the 128 MiB pool of 256 KiB chunks from the issue (0/64 -> 63/64 reuses) and the one-big-chunk-then-trim case.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H4Yjw2JbmwkmbLrWRuREWT
commit 4ef8dcc3845452fa39b0ab5391483dba0eeac7e9
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Sat Nov 28 03:54:08 2026 -0500
Lists' upload buffers: a test that the next list gets one given back, and a bench
commit 3904e87a421570917c86d8b4c1dd68a0675d3e5a
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Sat Nov 28 03:37:36 2026 -0500
Lists' upload buffers are kept and used again, not made for each copy
The upload buffer of a list's copy (the texels a title copy takes from
a buffer, the zeros of a texture's new levels) was memory of its own,
made on the thread translating the list: made not resident, made
resident and, with VICTORY_CARD_STEPS=2, waited for until mapped
through a copy queue's round trip. In an RTX 5070 Ti run with that
switch, new memory was waited for 28,000 times (22.7 s, the longest
1.8 s near the card's memory budget) and until mapped 25,000 times
(19.4 s); those lines do not say which memory, and these buffers are
among the few made that often.
They are now made at powers of two from 64 KiB to 32 MiB and kept when
their list is reset, which is after its submissions finished, for the
next list that asks for one of that size, as the scratch chunks are:
up to 64 MB (256 MB with VICTORY_KEEP_FREED), dropped when the PC's
memory is pressured. VICTORY_UPLOAD_POOL=0 makes one for each copy as
before.
commit 3e8215c16b52389cdd71cbfafc5075637923f627
Author: Victorywillbeours222 <361156427+Victorywillbeours222@users.noreply.github.com>
Date: Sat Nov 28 10:25:07 2026 +0100
Shaders: the face programs keep shared memory past their header size (faces with only eyes and teeth)
VICTORY_LDS_BOUNDS reads 0 and drops writes past LDS_SIZE in the header.
The face network (compute_graph_ops: matrix products, dot products,
reductions) and the two programs that rebuild face normals from the
blend shapes (ped_morphable_model_cs, ped_standard_head_cs) use shared
memory past that size; held to it their results were zeros and only the
eyes and teeth of a head were drawn (#100, #586).
Those 25 programs, named by the first 16 hex digits of the container's
BLAKE3, are exempt by default; every other program keeps the bounds.
VICTORY_LDS_BOUNDS_EXEMPT=<hash>[,..] replaces the list, =0 exempts none.
The setting is in the shader cache's key. host_shader passes the
container's hash to the translator through emit::with_program.
RTX 5080, Series X, 10-minute walk through the opening: faces drawn in
the interview and the store flashback; the submitting thread waits 1.0 ms
a frame for the card (median; 70.9 ms with VICTORY_LDS_BOUNDS=0), 18.1 fps.
commit 89bd77bd0d91ad515f7c9b470abcc20fa1c5777a
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Sat Nov 28 02:30:21 2026 -0500
Kernel writes: their range noted without the guards' lock
Every DirectStorage read of the title's to a plain address and every
ReadFile and fread of its took the write-watch guards' one lock twice:
once to open what may have been guarded and note the range the kernel
writes (Guards::kernel), once to take the note back. That is the lock
every refresh holds while it guards.
Now the range goes in a small table of atomic slots (KERNEL), and the lock
is taken only if a block of the range is guarded or about to be
(PROTECTED), guarded together with other views of its page (ALIASED), or
known absent (ABSENT, a new mirror of Guards::absent). A refresh leaves
the slots' blocks alone as it left Guards::kernel's; one that made up its
mind before a range was noted sets the blocks' PROTECTED bits, looks at the
slots after that and leaves out what it finds (protect_here,
protect_alias), while the kernel write notes its range and looks at those
bits after that: one sees the other. ABSENT is set before a block's
PROTECTED bit is cleared, so a write that finds the latter cleared finds
the former set. More than 64 writes at once go in Guards::kernel as before.
VICTORY_KERNEL_UNLOCKED=0: under the lock every time, as before.
Tests: a write to unguarded memory waits for no lock (and one to a guarded
block does, and opens it); a refresh leaves alone and tells as written what
the kernel writes unlocked; a guard leaves out blocks whose write was noted
after the refresh looked; kernel reads racing refreshes all land and are
told by a refresh that ends after them (fails with the refresh's look at
the slots taken out: a read finds its destination guarded).
kernel_writes_beside_refreshes (ignored; --release --ignored --nocapture):
four threads doing what a raw DirectStorage read does in the guards' notes
(kernel_writing, its drop, kernel_will_write) beside two threads writing
and refreshing a 64-block view. Medians of 7 alternating runs, on
hcx-in-progress at 9108f25, two sets (other builds running on the machine):
before (locked): 0.70 / 0.60 us a read, 99th percentile 141.2 / 142.3 us,
242,270 / 246,619 reads/s
after (unlocked): 0.20 / 0.10 us a read, 99th percentile 1.5 / 1.6 us,
2,494,554 / 1,902,540 reads/s
(On 990b979, on a quieter machine: 1.00 against 0.10 us, 121.2 against 1.3 us.)
commit 1707f5682444771717cb58fd352faf83fceef8a6
Author: yumaste <65047631+yumaste@users.noreply.github.com>
Date: Fri Nov 27 12:10:36 2026 +0000
Shaders: preserve FP16 rounding changes in whole-wave sections
Port of https://github.com/Marvisak/VIctory/pull/2886 to VIctory-NVIDIA. AI-assisted (Codex).
commit 10a4a550cf04376be623d7c2d6d0854b5ca4f77f
Author: Manley.B <kibagami.gaming@gmail.com>
Date: Sat Nov 28 21:23:49 2026 +1100
Slot eviction: what it did is in the frame-rate lines (#955)
VICTORY_SLOT_EVICT=1, on in the launchers since v2026.11.28.01, lets go
of the host copies of idle textures above 85% of the card's budget. Its
counts (copies let go and their bytes, slots put back to waiting,
textures made again and those back within 2 s, the time they were away,
the passes given up) were kept but written nowhere: a log could not tell
whether it was at work while textures came and went (#955).
With the switch on, the frame-rate lines now tell it for every second
in which something was let go, put back, made again or given up, with
the last pass's state. Nothing is written while nothing happens.
commit 9496b4443746ff38ebee79b32742afe980ca57a6
Author: Erwan Leboucher <10486029+eleboucher@users.noreply.github.com>
Date: Sat Nov 28 11:19:42 2026 +0100
victory-gpu: ray-tracing arenas on the card count against their own most, not the windows' 1024 MB
commit 4a82875aadcd6f57146a8a55540b6869c0331cb8
Author: yeedgrthfgv <220001521+yeedgrthfgv@users.noreply.github.com>
Date: Sat Nov 28 11:07:57 2026 +0200
F1 menu: THIN LISTS without "HEADS MAY BE MISSING"
The faces without skin first reported in PR 66 turned out to come from the
first start, before the pipelines are made, with THIN on or off (RTX 5070,
5070 Ti and 5080 in that PR). The label and its comment said THIN caused
them. On the 6 core PC of that report THIN is also the faster: 23.6 frames
a second against 21.1 with a warm cache.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit 24c407a32ab51fda5eb42027b1543a4cdd384153
Author: psttt432454 <361943018+psttt432454@users.noreply.github.com>
Date: Sat Nov 28 11:50:28 2026 +0300
Slot eviction: say what it did every 5 seconds
`resource::SLOT_EVICT` and `SLOT_STATE` (memory stack by skornuta) are
counted by `slot_evict` and the copy's return, but nothing read them: a
run could not tell whether eviction freed anything, nor why not. With
`VICTORY_SLOT_EVICT=1` (on in `victory play`) the 5-second texture lines
now carry one more: textures and MB let go, slots put back, textures made
again (within 2 s, and their average time away), attempts given up, and
the last look's state (evicting or not, idle-looking textures, kept by a
table, not to be taken as a slot shaders pick by index shows them).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit 3c3d1b619a8d2d6deac7625612162f6e22096d92
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Sat Nov 28 03:50:03 2026 -0500
A library rebuild says which pipelines came twice and which were refused
At the end of an RTX 5070 Ti run the rebuilt library kept 928 pipelines
while the run had loaded 1,199 and made 1,394, and the line could not
say whether the rest were names that came again (a pipeline the title
made twice is loaded twice) or pipelines the new library refused. It
now counts both.
commit 4fa1666bea702add83a99ac3c0da5042a23130b3
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Fri Nov 27 21:14:40 2026 -0500
Pipeline library rebuilt with the pipelines a run used once it passes 1 GB
The host's pipeline library has no way to take a pipeline out, and each
change of a translation stores its pipelines under new names beside the
old ones: an NVIDIA run's library held 80,703 pipelines in 4.78 GB, of
which the run loaded 986.
At the end of a title's run, a library larger than VICTORY_LIBRARY_KEEP_MB
(1024; 0: never) is written anew with the pipelines that run loaded or
made, when it used at least 1,000 (a run that ended at the menu leaves it
as it is). The early list still names the others, so the next run starts
them at their creation; the driver's own cache makes those quick where
it holds them. The tools that fill the library do not rebuild it.
commit f7a9ed921023665a2680af52af6fa15ca565b27c
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Fri Nov 27 21:14:40 2026 -0500
Pipeline library saves no longer hold up new pipelines, and come less often
A save writes the whole library again however few pipelines were added,
every 20 s while any came in. At 4.78 GB (an NVIDIA run's library) that
dirtied 4.78 GB of the file cache every 20 s beside the title's own
streaming, and every pipeline made meanwhile waited for the save to end
before it was stored and handed to the draws that wanted it.
A pipeline made during a save is now used at once and stored after it
(VICTORY_LIBRARY_STORE_LATER=0: as before). A save waits 20 s up to
256 MB and as much longer as the library is larger, about 6 minutes at
4.78 GB; the save at the end of a run is not held back
(VICTORY_LIBRARY_SAVE_S=20: as before).
commit 75c4646b063fe1e35623a9699795691319eb189c
Author: Yoshi-233 <76078963+Yoshi-233@users.noreply.github.com>
Date: Sat Nov 28 16:42:26 2026 +0800
Diagnostics: request a frame capture while the title is running
commit 4a1d4341dc192a28a7fea2e1501a5e0bcc885f31
Author: cccw <66506837+CwWwWwW@users.noreply.github.com>
Date: Sat Nov 28 15:29:52 2026 +0800
GPU/diagnostics: count the pieces that differ on the relay and card merges
C::BackDiffer is what the frame account prints as "finding N pieces that differ" and was added only in copy_back_with. The relay_merge, card_merge and card_merge_relay merges find the differing pieces but never counted them, so the frame line misreported in relay/card configurations. Add one diagnostics-gated increment after each merge compare.
Note: on this tree the relay paths are fallbacks behind the land paths; counting the land paths too would be a small follow-up.
Ported from fxceless/victory-fork PR #1479 (head d2884ccaf11d85521eedddfe75c199827f741732).
Original author: CwWwWwW <66506837+CwWwWwW@users.noreply.github.com>.
commit 6e39868be3c35dc26a2167875a8f6bed2ce4b443
Author: Yumaste <yumaste@outlook.fr>
Date: Sat Nov 28 11:25:13 2026 +0100
HLE: fail DirectStorage startup when no worker can start
Port of Marvisak/VIctory#3207. Preserve the NVIDIA fork worker count and thread priority settings.
commit 24d642276a963a2d82887a9e2ff1ff7d029c19e1
Author: aidanthehorrible <73363987+aidanthehorrible@users.noreply.github.com>
Date: Sat Nov 28 05:10:40 2026 -0500
Files: overlapped opens keep their flags (ReadFileScatter needs no buffering)
As in Marvisak/VIctory#2427: an overlapped open keeps
FILE_FLAG_NO_BUFFERING, since the host's ReadFileScatter takes only a
handle with both. In our runs the game opened its archives synchronous
only (flags 0x20000000), so the measured results are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit c4e24142d919ca44ad898dba2abee99ca4c0271e
Author: aidanthehorrible <73363987+aidanthehorrible@users.noreply.github.com>
Date: Sat Nov 28 05:10:40 2026 -0500
Files: read the game's archives through the Windows file cache (faster loading)
- The game opens each of its archives twice, once with
FILE_FLAG_NO_BUFFERING (63 of 127 opens), and at loading reads them in
some 80,000 small synchronous ReadFile calls (most 4 KiB or less), one at
a time. On a SATA SSD each unbuffered call took about 1 ms: the loading
screen read ~5 MB/s for 70-76 s, the drive 99% busy, the CPU idle.
DirectStorage made only 51 requests in that stretch.
- A read-only open (no write access asked for) now goes to the host
without FILE_FLAG_NO_BUFFERING and FILE_FLAG_RANDOM_ACCESS, so the host's
file cache and read-ahead serve it: the same calls took 4 us each. From
the start to the first frame of the world (over 1,000 draws): 129-139 s
before (3 runs), 47-48 s after (2 runs), 58 s on the first start after a
restart (RTX 5070 Ti, Ryzen 7 7800X3D, 32 GB, game on a SATA SSD, Series
X, release build). Frame times in the world unchanged. The bytes read are
the same; opens for writing keep their flags. VICTORY_FILE_BUFFERED=0
goes back to the game's flags.
- The gain scales with the drive's latency for one small read: an HDD
should gain the most, an NVMe drive a few seconds; later starts gain on
any drive, from the cache.
- The log names the first open of each kind of flags with its path, and
sums up the game's ReadFile calls in loading bursts (1,000 or more in
2 s): calls, how many of 4 KiB or less, MB, microseconds a call.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit f938593e95f3c111e70cec44b73bceb94ab2b997
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Sat Nov 28 03:47:11 2026 -0500
XGameSave: async calls do their disk work on a save thread, not the title's
An autosave through XGameSaveSubmitUpdateAsync wrote every blob, flushed
each file and the manifest, walked the provider's containers for the quota
and renamed the new version, all inside the title's call and before it
returned: a frame hitch at every autosave. The async model asks that
calling an async API be safe on a time-critical thread.
The async calls (initialize, remaining quota, delete, read, submit) now
start the call and hand the work to one save thread, which runs it in the
order the title made the calls: a second update lands after the first, and
a quota or read call sees the updates asked for before it, as the quota
pages say. A call completes once its work is done, so a save is on disk
when it completes and reads after that see it. The update's data is shared
with the save thread, not copied, so the title may close or change the
update while the save runs. The staged version and the rename that commits
it are unchanged. A save canceled before the thread reaches it fails with
E_ABORT and writes nothing.
VICTORY_SYNC_SAVES=1 puts the old path back: the work done in the call.
Measured with a 5.3 MB save (four blobs, all rewritten), 20 saves a run,
release build, calling thread per submit: medians 35-37 ms before (one
noisy run 253 ms), 0.011-0.014 ms after; with VICTORY_SYNC_SAVES=1, 24-37
ms. The blob writes before the submit copy the data on the title's thread
as before: about 1.1-1.7 ms for this save.
commit 1cbcf8e7db92e4723425fd2561f734a522a9666d
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Sat Nov 28 02:46:17 2026 -0500
Title image: its two hashes on several threads
A start hashes the title's 115 MB twice: the file's bytes (which build it
is) and the patched ones (where the published image is). Each took 18 ms on
one thread.
BLAKE3 is a tree of 1 KiB chunks whose left subtree is always the largest
power of two of chunks smaller than the whole. victory_loader::hash splits the
input there, hashes each half as a subtree (blake3::hazmat: set_input_offset,
finalize_non_root) on a thread of its own and joins them, down to pieces of
a core's share: at most 8 threads, none for less than 4 MB, the same hash as
blake3::hash. A thread that cannot be had is hashed on the caller's.
115 MB: median 18.3 ms on one thread, 3.7 ms on 8 (hash::tests::bench_hash).
Publish step (read, prepare, publish an image already there), 5 alternating
rounds of 9 on an idle machine: medians 59.3-61.2 ms with one thread,
30.9-32.0 ms with the threads (publish::tests::bench_publish_step); peak
memory the same.
commit 259754f638af38fff22a7639994c9e20012f505a
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Sat Nov 28 02:27:49 2026 -0500
Title image: published under the hash of its patched bytes, not read back at every start
Every start read the published victory-image-*.dll whole (115 MB for the
title) only to compare it with the bytes just prepared, and prepare() copied
the 115 MB it was given once more before patching. Peak: three blocks of
115 MB, two reads.
The image now goes to <cache>/<BLAKE3 of the patched bytes>/<same name>. A
start that finds that file, of that length and with the modified time stamped
on it at publication, uses it as it is. The key is of the patched bytes, ours
and the switches' patches together, so a change to a patch publishes beside
the old copy and can never be taken for it. A file damaged since (written
over, truncated) has another time or length and is published again. The name
stays the module's (logs, profiles, VICTORY_WRITE_SITES know it by it).
Publication still stages a file of its own per process and call, flushes it
with the stamp put on, then renames it. A rename refused because another
runner published the same bytes first and mapped them counts as done. The
name's copies under other keys, and the copy older runners wrote straight in
the folder, are removed once a minute old; a mapped one stays (Windows will
not delete it), and other builds' images are left alone.
prepare_owned() patches the bytes where they were read; the runner and the
title's DLLs use it.
Publish step (read, prepare, publish an image already there), the test
binary padded to 115 MB, warm cache, 4 alternating rounds of 9 runs:
medians 95.4-102.4 ms before, 64.5-69.2 ms after; peak private memory
346 MB before, 116 MB after (publish::tests::bench_publish_step).
commit bd71eadef1d5dbce3a06181e42355cf9e3505478
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Sat Nov 28 02:27:49 2026 -0500
Warm-up mark: keyed on victory.exe's length and modified time, not its bytes hashed at every start
Every play start read and hashed the whole of victory.exe (11 MB) to name its
warm-up mark. The mark is now warmed/<length>-<modified time>: a build writes
the exe anew and its time changes; a copy keeps the time, as it keeps what the
driver learnt of the bytes.
On an 11 MB file, 5 alternating rounds of 21: medians 7.2-8.9 ms before,
0.04-0.06 ms after (play::tests::bench_warmup_mark).
commit 52680f5b461dfe8f824a06ffc394966636883ea7
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Sat Nov 28 03:41:00 2026 -0500
HLE: the blocking XGameSave calls, and XStore's product and licence calls through the block
XGameSave's blocking InitializeProvider, GetRemainingQuota,
DeleteContainer and SubmitUpdate, and EnumerateContainerInfoByName and
EnumerateBlobInfo, returned E_NOTIMPL: a title on the blocking save path
(the one the GDK's samples use) never saved. They now use the helpers
the async calls use.
XStore's product queries (by id, for the game, for a package), the
licence acquisition checks and the update download returned E_NOTIMPL
from the *Async call itself: an error no console returns, and a title
that ignored it waited for its callback for good. They now complete
through the block with the store's network error, as the other calls
that need the service do. XStoreQueryAddOnLicensesAsync, the usual DLC
check at start-up, answers an empty list: the user owns no add-ons.
commit bcbe2cb27444f0e40a06fd962ed28fc4cfffa7e9
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Sat Nov 28 03:36:04 2026 -0500
DirectStorage: EnqueueSignal, the error calls, Query, the legacy CreateQueue and QueryInterface
Gaps that would crash or hang a title that uses more of the API than
this one:
- The queue's method table had 12 slots, the file's 8 and the status
array's 5: a call through a later slot (IDStorageQueueX1's
EnqueueSetEvent) jumped through whatever followed the table. They are
padded with logged stubs.
- EnqueueSignal never signalled its fence, so a CPU or GPU wait on it
hung. The fence (the title's ID3D12Fence, AddRef'd) now completes in
queue order like a status entry, once every request before it is done,
and closes the failure window as one does. Signals run on a thread of
ours, not under the scheduler's lock.
- GetErrorEvent returned E_NOTIMPL as a handle, and RetrieveErrorRecord
and Query left their structs as they were. GetErrorEvent now returns
the queue's manual-reset event, set when a request fails;
RetrieveErrorRecord gives the failure count and the first HRESULT and
resets it; Query fills DSTORAGE_QUEUE_INFO.
- The legacy IDStorageFactoryX::CreateQueue (0x18) failed. It now makes
the queue from the DSTORAGE_QUEUE_DESC, with default options.
- QueryInterface returned E_NOTIMPL without nulling the pointer. It
answers for IUnknown (and the factory's id) and otherwise returns
E_NOINTERFACE with the pointer nulled; so does DStorageGetFactory.
commit f5315983fee7245b5b216f8d956301bb1c1bb57d
Author: 0xkn0wh3r3 <360897260+0xkn0wh3r3@users.noreply.github.com>
Date: Sat Nov 28 03:32:55 2026 -0500
HLE/xuser: the input devices gameinput hands out are the user's
With the default user added silently, the system's devices for that user
are passed to the title. XUserFindForDevice always answered
E_GAMEUSER_USER_NOT_FOUND, and the module said there were no input
devices, though gameinput hands out pads, a keyboard and a mouse. Titles
that map controllers to users saw every pad as unpaired, and may ignore
its input or ask the player to choose an account.
XUserFindForDevice now returns the one user for any device id gameinput
issued …
…CTORY_GPU_RO_SKIP=1 turns it on) On an RTX 5070 Ti (Series X, 1440p, pier route) it cost about a third of the draws (8,400 -> 5,200-6,000) and left a ship and buoys black. VICTORY_GPU_RO_CHECK=1 logged no changed bytes, so the loss is not caught by the compare pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o1-coder#1038's write-watched large XMemAllocDefault) for measuring Conflicts with this fork's trustno1-coder#1014 port resolved by keeping both (lib.rs exports, title_memory_freed). VICTORY_LAZY_LAND and VICTORY_LAZY_FETCH stay off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tried the PR's single commit on trustno1 main of 2026-11-28: RTX 5070 Ti 16 GB, Ryzen 7 7800X3D, 64 GB, Windows 11, Series X profile, native 1440p, no DLSS. Same save at a pier, camera still, scripted 4-minute runs.
AI-assisted (Claude Code); runs and observations by me; no game data. |
|
Tested on main
|
Summary
Tracks Xbox GDK read-only GPU page protections (
PAGE_GRAPHICS_READONLY,PAGE_GRAPHICS_EXECUTE,PAGE_GRAPHICS_EXECUTE_READ) fromXMemVirtualAlloc(includingMEM_REPLACE_PLACEHOLDER) andVirtualProtect, and subtracts those read-only intervals from shader UAV write declarations (Shadow::shader_writes).Why
On console hardware, a title can reserve a virtual placeholder (
MEM_RESERVE_PLACEHOLDER), split it viaVirtualFree(..., MEM_PRESERVE_PLACEHOLDER), replace each sub-range viaXMemVirtualAlloc(..., MEM_REPLACE_PLACEHOLDER, protect)with differentPAGE_GRAPHICS_*protections, and place a single large buffer and raw UAV across adjacent regions of mixed GPU protection.Specifically, the 174 MiB (
0xae00000) heap noted indocs/findings.mdspans:0x1b00000) prefix:PAGE_GRAPHICS_EXECUTE_READ(CPU-written constant/upload ring — hardware GPU-read-only)0x9300000) suffix:PAGE_GRAPHICS_READWRITE(GPU-writable pools)Because
XMemVirtualAllocpreviously returned early onMEM_REPLACE_PLACEHOLDERwithout noting GPU protection bits, binding one raw UAV over all 174 MiB declared the 27 MiB CPU constant ring as shader-writable. Every CPU upload-buffer fill reading from that prefix then either stalled waiting for in-flight submissions or was diverted intocard_steps(~4,000–7,500 fills/frame).Changes
crates/victory-hle/src/modules/xmem.rs: Records read-only GPU protection bits (PAGE_GRAPHICS_READONLY | PAGE_GRAPHICS_EXECUTE | PAGE_GRAPHICS_EXECUTE_READ, without writable bits, and excludingPAGE_GRAPHICS_NOACCESSused on empty placeholder reservations) inXMemVirtualAlloc(bothMEM_REPLACE_PLACEHOLDERand normal allocations) andVirtualProtect, aligned to whole 4 KiB host pages; clears stale records on fresh reservations (null-base or fixed-addressMEM_RESERVE), writable transitions, and successfulMEM_COALESCE_PLACEHOLDERSfrees.crates/victory-gpu/src/shadow.rs:GPU_READONLY) with lock-free atomic min/max bounds for a zero-allocation fast path when a UAV does not overlap any read-only range.Shadow::shader_writes, subtracting GPU-read-only sub-ranges whenVICTORY_GPU_RO_SKIPis enabled (on by default;VICTORY_GPU_RO_SKIP=0disables), while keeping explicit host-recordedCopyBufferRegiondestinations on unclippedShadow::gpu_writes.gpu_readonly_tests) covering prefix clipping, middle holes, suffix clipping, merging, splitting, freeing, and zero-lengthMEM_RELEASEover interior/split sub-ranges.crates/victory-gpu/src/draw.rs&memory.rs: Route root UAV, descriptor-table UAV, and small-buffer shader writes throughShadow::shader_writes.crates/victory-gpu/src/host.rs: AddsVICTORY_GPU_RO_CHECK=1verification mode (CardPlan::check_gpu_ro) to keep full ranges declared and warn if any compared, non-picked 64 KiB piece that changed on the card overlaps a GPU-read-only region; reports clipped MB/frame (GPU_RO_LEFT) alongsideVICTORY_WC_NO_BACK.crates/victory-gpu/src/lib.rs&watch.rs: Exportstitle_memory_gpu_readonly/title_memory_gpu_writableand resolves zero-lengthMEM_RELEASEallocation extents viaallocation_end(VirtualQuery) before clearing intervals intitle_memory_freed.docs/findings.md&docs/README-foxhound.md: Documents the mechanism, switches (VICTORY_GPU_RO_SKIP,VICTORY_GPU_RO_CHECK), and A/B benchmark results.Verification & A/B Benchmarks
Tested on Windows 11, NVIDIA GeForce RTX 3080 10 GB (driver 621.14), Series X profile, 2560×1440 output, release build, warm shader/pipeline cache (
0pipelines compiling), frame generation off, identical scripted startup/cutscene/world sequence (115–120 s per run).Correctness (
VICTORY_GPU_RO_CHECK=1, diagnostics build)0xa00000,0x100000, and the0x1b00000/ 27 MiB prefix of the 174 MiB buffer).0warnings across boot, menu, cutscene, and gameplay (~320 GPU compare passes/frame): zero GPU writes ever touched any compared, non-picked 64 KiB piece inside a GPU-read-only region. (Note:VICTORY_GPU_RO_CHECK=1checks compared non-picked card ranges; write-combined and uncompared writes are not covered by this diagnostic.)DLSS Performance (2560×1440 output, 1280×720 internal — CPU/submission-bound)
VICTORY_GPU_RO_SKIP=0VICTORY_GPU_RO_SKIP=1preparing(median / late)waiting for flights(median / gameplay)planning card_steps(median)card_stepsfills/frame (median)merge_under_writes(median)Native 2560×1440 (
--dlss off— GPU-bound in 5,000-draw scenes)VICTORY_GPU_RO_SKIP=0VICTORY_GPU_RO_SKIP=1preparing(median)waiting for flights(median)planning card_steps(median)card_stepsfills/frame (median)Independent Community A/B Results
card_stepsfills −76.1% / −85.3% KB (4,494 → 1,072),planning card_steps−53.1% (3.2 → 1.5 ms),preparing−8.3% (32.7 → 30.0 ms), mid-scene gameplay +11.2% FPS (27.6 → 30.7), peak +11.6% (36.3 → 40.5), clean visuals &0faults.card_stepsfills ~4× lower (1,685–1,939 → 375–479), clean visuals, no FPS change (35.2 vs 35.2cutscene,+0.85fps after scene change — within noise, as fills are not the bottleneck on Series S with DLSS off).VICTORY_WAIT_RESIDENT=0,VICTORY_LAND_SKIP=1, 20-min 3D A/B): 0 errors / clean visuals,card_stepsfills −79.7%, upload ranges −66.5%, strong gains on heavy scenes (7k–10k+4.1%,>=10k+21.3%), net regression on1k–7kdraw frames (−4.5%to−11.4%) wherewaiting for flightswas already0.1 msand CPUstepsgrew (refreshes +5.6 ms,copies&fills +2.6 ms).Automated Checks
cargo test -p victory-gpu --lib: 457 passed, 0 failed (including 4gpu_readonly_tests)cargo test -p victory-hle --lib: 189 passed, 0 failed, 3 ignored (includinggpu_protection_page_alignment)cargo clippy -p victory-gpu -p victory-hle --all-targets&--all-features: 0 new warningscargo xtask policy: 294 files ok