Every buffer the CPU maps and the card reads counts against DXGI's
non-local budget, which Windows caps at half the RAM, not against free RAM.
On 16 and 24 GB PCs it ran out with gigabytes free, every such buffer was
refused from then on, down to 256 bytes, and the run ended when a host
command list could not close (0x8007000E; #156, #206).
The once-a-second sweep now reads that budget: pressure from 85 % (off
under 75 %), critical from 95 %, the same levels the RAM sample sets, so
spares, staging and texture prefetch shrink before the cap is reached.
The limit and its ending are VIctory-NVIDIA's issue 1520 (trustno1-coder),
whose fix scaled its own L0 caches down on PCs under 24 GiB.
The driver keeps static samplers in a table in the order a process first
makes them, and a compiled pipeline holds their places in it; its disk
cache finds a pipeline again only where those places match. Pipelines are
made by several threads in the title's order, so the places changed from
run to run and the driver compiled again at every start. Every distinct
sampler is now listed in pipelines/static-samplers.txt and made in that
order when the device is made, and before each pipeline's root signature.
Ported from trustno1-coder/VIctory-NVIDIA (pipeline/samplers.rs), without
its pipeline-library and warm-fingerprint hooks.
VICTORY_KEYS presses keys at set seconds, focus or not, but a script that
wants Enter pressed until the world draws cannot know those seconds: the
start screen takes Enter after a time that depends on the cache and the
disk, and a press that comes late lands in the world. With this a script
has Enter pressed every few seconds and makes the file when it sees the
world draw (the window's title has the draws a frame); from then on no
scripted key is pressed. The file is looked for only while a key of the
script is due.
Under Proton on a Wayland desktop this is what lets a measuring run start
with nobody at the keyboard: a key sent from outside reaches the title
only while its window has the focus.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Read Sony HID reports alongside XInput and map the sticks, triggers and
buttons to GameInput. Discover controllers in the background and keep
their device IDs stable across polls.
Send low- and high-frequency rumble over USB and Bluetooth. Cover both
report formats and rumble packets in tests, with a hardware check for a
connected controller.
(cherry picked from commit 9fded1b254)
The launchers' 71b6330:1 is Grand Theft Auto VI's watchdog tick in one
build (image hash b99f876b74d4a77f...); in any other title or build that
address is other data and a write twice a second there corrupts it.
An entry `<hash>@<rva>:<byte>` now only writes into the title whose image
hash starts with <hash>; entries without one write as before. The
launchers set b99f876b74d4a77f@71b6330:1. `off` writes nothing.
The title's watchdog thread (title+0x2215a60) checks once a second that the
main loop's tick (title+0x71b6338) moved, and after 30 checks without it
ends the title on purpose: it decodes a message and writes to address 0 at
+0x23cf683 ("write 0x0: nothing mapped there", the crash in #39). While the
first frames wait for their compute pipelines (2a1965f) the loop can stall
past 30 s. The watchdog starts its count over on every pass while bit 0 of
title+0x71b6330 is set.
VICTORY_POKE (run.rs) was only built with `diagnostics`; it is now in every
build (it does nothing unless set), and Play-VIctory*.cmd set
VICTORY_POKE=71b6330:1 unless it is set already.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under Wine a stack overflow in vkd3d-proton's DXIL-to-SPIR-V ends the
worker thread without unwinding. The pipeline was then failed at once and
its dispatch dropped: #39 (CS_Prop_BatchNoCull under Proton, PR #71's
build), right before the title's write to 0 at +0x23cf683.
- reap() makes such a pipeline once more on a thread with a 4 GiB stack
(reserved only; VICTORY_PIPELINE_RESCUE=0: not), and gives it up (failed,
refused-pipelines.txt) only if that thread ends too.
- make_with() no longer makes a pipeline inside its OnceLock's
initialisation: a thread that ended there held it for good, and a later
caller (a dispatch waiting for its compute pipeline, on the title's
thread) waited for ever. A 'building' flag says one is being made;
others wait for it to be made or given up.
Test: a maker that ends its thread with ExitThread leaves the pipeline
being made; a second caller waits; the rescue makes it and wakes it, or,
ending its thread too, has reap give it up. Passes under Wine and
vkd3d-proton (RTX A3000); the GPU suite as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New from others: the pipeline-refusal listing during warm-up (b57a837),
march UAV views kept with each host texture (2511e6f), ordinary bytes
before the reserve for a large buffer (6e434c6), and DoubleGhosty's #66
fix in the lowering (9a4aa8d), which replaces this fork's own
(structure.rs, the per-lane fallback in emit): victory-shader is now
upstream's as a whole. The rest are this fork's own changes as upstream
cherry-picked them; for the Agility SDK files upstream's wording, the
README keeps the Windows 10 test steps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: the Wine placeholder fallback (kept wine-perf's block-keyed
RwLock), dstorage workers (upstream's worker_count and priority), pipeline
make (both: refused pipelines and upstream's catch_unwind), the indirect
tests (wine-perf's exact assertions; upstream's WARP skip stays).
Also two clippy fixes from wine-perf.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured in one interior without rays: the 180x102 R16G16B16A16_FLOAT image
the CS_Gather_Classified_* programs write has a mean of 0.24 in a clean run
and 0.67 in a veiled one, and the froxel volume the air clamp bounds holds
about 0.05. Before either CS_ReconstructRaymarchClassified* dispatch the
images it reads at table 1, places 96 and 112, are scaled down to the
multiple of the room's slow mean luminance (hue and alpha kept, NaN to 0).
Off unless set; its pipeline and its heap of views are made only then, and
apart from the stand-in's own passes. It needs the estimate
(VICTORY_AMBIENT a number), not constant:<level>, which has no slow mean.
Not built or run on this tree: written against it by reading.
From Dathinel/victory-4gb 743f9b0.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Against GE-Proton11-14's wine (ValveSoftware/wine a47c73f with GE's
protonprep wine section applied): a process's views in a tree by base
as well as the list, so map_view's overlap check and unmap_view's
lookup no longer walk all of them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wine maps thread priorities to niceness only with a hard RLIMIT_NICE
above 20; without, the title's threads compete for eight cores with our
pipeline workers and streaming on equal terms. With the limit raised
(prlimit, as the gamemode group gives): 104 and 106 ms a frame in two
runs, p90 113 and 114, against 118-122 and 134-143 without.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under GE-Proton11-14 on an RTX 5060 (8 GB), Series S at 1080p:
- Log to a file (VICTORY_LOG_FILE): Proton passes no stderr through;
crash reports and panics go there too.
- Pipeline library: ask vkd3d-proton for an empty one with a null
pointer; it refused a non-null pointer of length 0, so no pipeline
was ever kept between runs.
- Pipeline workers that end while making a pipeline (a stack overflow
in vkd3d-proton's DXIL-to-SPIR-V; Wine ends the thread silently) are
noticed, replaced, and their pipeline is left out from then on
(refused-pipelines.txt); a full-budget wait names what is stalled.
- Wine's memory lock: placeholders the runtime reserved are known
without asking (Wine lacks that information class); write watches
are asked in 8 MiB pieces; VICTORY_COMMITTED_QUERY=1 in the script
(QueryWorkingSetEx reads /proc/self/pagemap under the lock).
- Texture pool: a freed piece is used again once every submission
begun before has finished (with retire()'s margin), not only after
2.5 s; cards under 12 GiB keep a tenth of their budget in empty
blocks, not 4 GiB. Loading took 2.7 GB of staging and 4.1 GB of
blocks on the card before.
- Under Wine plan with the card's budget less 1 GiB
(VICTORY_CARD_BUDGET_MB): Linux moves nothing to the PC's memory.
- play-proton.sh: VICTORY_CONSOLE, vkd3d-proton's cache beside ours,
and the GE-Proton11-14-victory compat tool when installed (a
wineserver that keeps a process's views in a tree; the list walk at
every map and unmap was the largest cost of all).
- docs/linux.md: what was found.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/play-proton.sh starts victory.exe under umu-run (Proton) or Wine
with Play-VIctory.cmd's pareto-residency settings. It turns Linux paths
into Wine Z: paths, and keeps the shader cache and saves under XDG folders
outside the prefix. docs/linux.md covers the build with cargo-xwin, the
NVIDIA driver, Steam as an alternative, and what was and was not tested
under Wine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Idle host lists: list.rs keeps up to 512 run host lists for reuse, and a
command allocator keeps its high-water memory over every reset. The docs
attribute 9 GB of the 40-46 GB footprint to lists' allocators. Nothing
trimmed that pool. The once-a-second sweep now lets go of lists, oldest
first, that rested longer than the RAM-scaled idle time, keeping the
newest 64; under memory pressure it drops all but those 64.
VICTORY_LIST_POOL_AGE=0 restores the old behaviour.
VICTORY_THIN started 8 threads whatever the CPU. The default is now a
third of the logical processors, clamped to 2-8: still 8 on the 24-thread
machine it was measured on, 5 on an eight-core/16-thread CPU.
VICTORY_THIN_THREADS still overrides it.
docs/profiling.md: how to measure memory fit, CPU vs card, and our own
GPU passes with the existing tools on a Series X-class PC.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README opened with codec_d's instructions, which link a private
release, then told readers to clone avatarmanz/VIctory-7900XTX. Split it
into a section per fork, build the pareto-residency launcher from source,
clone this repository, and credit codec_d.
findings.md still called VICTORY_INDIRECT_REST=0 an experiment, but
f4b48ad made it the default. The bug journal now notes that its local
paths and binary hashes refer to the author's machine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Queue: passes over the screen first (local/next), then what draws asked
for, the early ones, and those known to take long by a quarter of the
workers. start() woke one worker, which could be one of the two that take
passes over the screen alone: the pipeline then waited for the next push.
All are woken now. victory warm goes through the pipelines no run drew with
in no order, 40 a process. victory translate: VICTORY_HOST_RDNA=1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--shaders after local/models 098ec1d4. The capture's 1,266 containers are
collected from the title's files once (beside the capture) and translated by
this build in 15 s; a pipeline that is refused with them keeps the recorded
ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A captured frame whose lists take 28.6 ms sent in one go takes 37.8 ms with
1.2 ms between its submissions, as the game sends them; with one group of
threads counting on a compute queue it takes 28.6 ms again, and nothing
changes when sent in one go (36.1 against 36.3 ms with its copies).
=turns: 20 s on, 20 s off, to compare in one run. Replay: --awake,
--no-restore makes no copies to restore from.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GPU_UPLOAD heaps, all off by default. Replayed yard frame (capture
play-1125-0127): 36.3 ms; windows in the card's memory 31.9, sends 32.7.
Replay: --pace, --breadcrumbs, copies counted by the memory they cross.
VICTORY_GPU_LOAD_MS: what the title's GPU timestamps show.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After each command that can change a texture, the texel under a point of
the picture is copied out; commands that changed one are named with their
pipeline and the values before and after. The listing names textures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The check of fetched pieces (VICTORY_FETCH_CHECK) with the landing pool:
pieces are gathered and ordered as there; with the check whole pieces come
down and are hashed by the job that lands them. Off, the fetch is the
landing's own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VICTORY_FETCH_CHECK=1 (off by default): with VICTORY_RELAY_COPY a piece is
fetched beside later submissions, and one of those that clears it and fills
it again with the same is not flagged by its compare: title memory and the
CPU's side kept what was in between, and the next refresh of the 64 KiB
sent it up over the right bytes. The compare now gives the piece's hash
with its flag; a fetch that is not that is made again by the next flight
that may write the piece. (The test shows 11-12 of 12 wrong without it.)
VICTORY_UPCOPY_CHECK=1 (diagnostics): at each send up, the words that the
title did not change and the card holds another value of; every few seconds
at rest, the words in which a copy's card side is not its CPU side, and
whether they were declared as written and fetched.
victory replay --upcopies: the same question of a captured frame, and which
pieces were written undeclared (replay1 and replay2: compute
82a2ad6d07417d36 through views picked by index, 73-75 pieces a frame).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One pass clamps the arguments of all indirect executions between two
points where they may change; its jobs are in upload memory that is filled
while the list is recorded. The replayed frame: 2,355 clamps become 980
passes, 86.1 -> 77.7 ms; with VICTORY_INDIRECT_BATCH=2 133 passes,
84.6 -> 75.3 ms.
Replay: --batch-clamps, --only-buffers, --listing; --compare runs turn by
turn.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>