The system's budget while the world loads depends on what the desktop
holds then, and falls by 1-2 GB later as the driver keeps memory for each
pipeline made (#140). After a fresh boot it said 5.1-5.6 GB on an 8 GB
RTX 5060 (3.8-4.6 GB after hours of desktop use): the texture queue filled
the card before the render targets, buffer copies and pipelines came, the
card went over, and the run stayed at 260-280 ms a frame (the card 50-100 ms
of it), with 1.3-1.6 GB stranded in the texture blocks; 4 runs of 4. With
VICTORY_CARD_BUDGET_MB=4500 on the same freshly booted machine and build:
94 ms a frame (the card 5-12 ms), 0.77 GB in the blocks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
79b07f21 turned off only the relay thread (host::relay). shadow::relay
stayed on when VICTORY_RELAY is unset, so late_stage picked stage 3 from
it, and on an RX 6750 XT under Windows that half-off state still lost the
device about 20 s into the world, where VICTORY_RELAY=0 runs 14 minutes
(Kr4tzin, #139). Under Wine (RADV, RX 6600) the half-off state keeps the
device and is about 30% faster than all off (japel, #139), so it stays
there. The host is asked which card it is before the choice is made.
scripts/play.ps1 still set VICTORY_RELAY=2, and it clears every
VICTORY_* variable but the paths, so VICTORY_POKE never reached its runs
and the title's watchdog ended them at world entry (KingKaom, #161). It
no longer sets the relay and sets the launchers' poke.
While the world loads the render targets hold ~0.25 GB, so 1,536 MB kept
~1.3 GB of the card from the textures of the opening cutscene: the card
reached "no room" within seconds and faces came out black or blotched in
its first shots (the queue's oldest due texture 290 frames old at that
moment), the jumpsuit dark red, some frames black.
RTX 5060 8 GB, Series S prologue, release build, two runs each, a capture
every 2 s for the first 30 s: 1536: the hat man's face black in one run,
the shots dark, black captures mid-cutscene; 768: faces and jumpsuit right,
the shots lit, no black captures. Card peak (nvidia-smi 7.5-7.76 GB),
buffer copies turned down and frame times the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While the card is over its budget (on an 8 GB card from the first world
frame on: 5.4 GB in use of 4.5 GB), the texture pass made no new host
textures, and a slot the title gave a new texture read zeros for the rest
of the run: Lucia's jumpsuit black (its colour slot null in a recorded
frame; watched live, a slot written at frame 1309 was refused at every pass
until the run ended), the cell dark red with untextured people, table and
bunks. Meanwhile 1.3 GB of the texture blocks stood free.
- A texture that fits in a free piece of a block in use (`pool::fits_free`;
not the empty blocks kept ahead) is made all the same: it takes no more of
the card. `VICTORY_FILL_FREE_PIECES=0`: refused, as before.
- The pool cuts pieces from blocks in use before empty ones: one cut from an
empty block kept ahead has another made ahead in its place, which grew the
blocks by a gigabyte.
- `VICTORY_TEXTURE_BLOCK_MB` (4 to 64, default 64): a block goes back only
when empty, and with 64 MiB ones a third of the blocks stood free in
pieces while the title streamed textures in and out. play-proton.sh: 16
on NVIDIA cards of 10 GB or less.
RTX 5060 8 GB, Series S prologue, release build, warm cache, two runs each
(10 captures a run): fill off: cell dark red, silhouettes, frame 84 / 99 ms;
fill on, 64 MiB blocks: cell lit and textured (jumpsuit print, table,
posters, faces), blocks 3.1-3.4 GB of which 0.95-1.32 free, 111 / 280 ms;
fill on, 16 MiB blocks: picture the same, blocks 2.3 GB of which 0.3 free,
93 / 101 ms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
963f7195 turned the relay off on AMD only when VICTORY_RELAY is unset, but
every launcher set VICTORY_RELAY=2 when it was not defined, so that default
never applied: RDNA 2 cards kept losing the device a minute or two in
(RX 6950 XT #62, RX 6750 XT #139, which runs 14 minutes with
VICTORY_RELAY=0). RDNA 4 runs with the relay at about twice the frame rate
(RX 9070 XT, #161), so the default now looks at the card: off on AMD cards
of RDNA 2 and older (by PCI device id), on elsewhere. Unset already meant
the relay's second stage, so the launchers' line is dropped and nothing
changes for other cards. VICTORY_RELAY=2 still turns it on anywhere.
VICTORY_TEXTURE_DROP_MIPS=1 where nvidia-smi says 10,240 MB or less and the
variable is unset. RTX 5060 8 GB prologue, warm cache: the oldest due
texture waited 8 frames instead of 55, textures the title fills alive
1,099 MB instead of 796, the budget at the end 4,159 MB instead of 3,335.
No copy with a shrunken texture was skipped; frames as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 8 GB card's budget falls from about 5.7 to 3.5 GB during a run (the
driver keeps ~3 MB per pipeline outside vkd3d's heaps, #140), and the
texture queue then refused textures that were due for a minute and more.
- VKD3D_CONFIG=no_upload_hvv: about 0.5 GB of the card back (4,654 -> 4,142
MB in use at the end of a run), frames no slower.
- VICTORY_CARD_ROOM_FOR_TARGETS_MB=1536 instead of 3,072: the prologue's
render targets peak at ~1.36 GB at 1080p, so ~1.7 GB was kept for
targets that never came; the oldest due texture waited 55 frames instead
of 1,163.
Both only where unset. Tried and not taken: VICTORY_TEXTURE_POOL=0 (less
memory, but color textures missing) and VICTORY_TEXTURE_ROOM_PERCENT=96.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The estimate (VICTORY_AMBIENT a number) follows the light the visible
surfaces send out, which is direct light only. A room lit mostly by light
that bounced gets almost none: the prologue's cell, lit through one window,
kept its people as silhouettes. VICTORY_AMBIENT_FLOOR=<level> (in the spare
root constant) holds the estimate at least at that warm fill, shaded in
creases as the rest; unset or 0, nothing changes. play-proton.sh sets 0.4:
under Proton on an RTX 5060 (Series S, 1080p) the cellmates, the bunks and
the card game on the floor show, and the brighter scenes keep their estimate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both start victory.exe themselves and were left without the watchdog poke
the other launchers set, so a cold-cache boot could still end at
+0x23cf683. They set b99f876b74d4a77f@71b6330:1 unless VICTORY_POKE is set.
watch.rs's placeholder() put NtQueryVirtualMemory(class 7) to the system
for every hole block it was asked about. Wine has no answer for that
class (STATUS_INVALID_INFO_CLASS) and logs a fixme line for each: 33,198
of 33,342 lines of a 5.5-minute session (#114). The first such answer is
now remembered and the fallback (the placeholders the runtime reserved)
taken from then on; on Windows the class answers and nothing changes.
play-proton.sh defaults WINEDEBUG to -all (#116). Proton's own script
does this already; plain wine (VICTORY_WINE=1) does not.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without -RayTracing nothing traces rays, but the skinning for the
acceleration structures (41 bvh_skinning programs) and the probes'
gather copy (2 programs) still run every frame. The switch sets
VICTORY_SKIP_PIPELINES to their hashes (scripts/rt_work_off_hashes.txt).
Off unless asked for; ignored with -RayTracing.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On a host of 32-lane waves CS_DefragHeap_ComputeRelocations
(02384a60fda6f2d0) only translates in the form whose host waves meet by
spinning, and it was the costliest command of an RTX 5060's frame:
18.6 ms of about 95 (VICTORY_GPU_TIMING, prologue). VIctory-NVIDIA's
launcher leaves it out (VICTORY_LEAVE_OUT), noting smears when it runs.
With VICTORY_SKIP_PIPELINES=02384a60fda6f2d0 (release, warm cache,
17 samples each): 102 -> 91 ms a frame, waits for the card 22.7 -> 5.2 ms,
the card 91 -> 74 % busy, the same pictures, no crash. Only where
/proc/driver/nvidia exists, and only if VICTORY_SKIP_PIPELINES is unset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from trustno1-coder/VIctory-NVIDIA (shadow.rs). The title asks
for its big GPU buffers with the console's write-combined bit (0x400):
memory its CPU writes and does not read. XMemVirtualAlloc now notes those
regions (freed with the rest of title memory), and with
VICTORY_WC_NO_BACK=1 a card copy that lies wholly in one, of at least
VICTORY_WC_NO_BACK_MIN_KB, keeps what shaders write there on the card:
no snapshot, compare, fetch or merge into title memory. Off by default;
the frame line counts the ranges left.
Risks as upstream of it noted: the CPU reading such memory sees older
bytes, and a page the CPU writes goes up whole over shader bytes in it.
With every copy left (no minimum) small results the title reads back
went stale there; 1024 KB is what that launcher runs with.
RTX 5060, GE-Proton11-14, prologue, warm cache (17 samples each):
copying back 27.4 -> 10.9 ms a frame, preparing (median) 78.8 -> 66.5 ms,
frame 115 -> 120 ms (the card is 95 % busy here: within noise), same
pictures, no crash. play-proton.sh turns it on.
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>
The shader and GPU tests found no shader model 6.6 device on Windows 10
(only WARP): its own D3D12 has none, and only victory.exe told the runtime
of the Agility SDK (#69). The unit and integration test programs of
victory-shader and victory-gpu now export D3D12SDKVersion and
D3D12SDKPath too (agility_tests.rs; the linker is told by a .drectve
directive in the object, so no build script flag reaches other programs),
and scripts/get-agility-sdk.ps1 also puts D3D12Core.dll in
target\\debug\\deps\\D3D12.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
victory-shader and victory-gpu get an agility-sdk feature: their test
programs export D3D12SDKVersion/D3D12SDKPath only with it, for the same
reason as victory.exe (no DLL beside them: D3D12_ERROR_INVALID_REDIST,
which is what failed Windows CI). README: the Windows 10 test steps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With D3D12SDKVersion exported and no D3D12Core.dll in D3D12\\, D3D12 does
not fall back to the system's runtime: every call fails with
D3D12_ERROR_INVALID_REDIST (0x887E0003), as Windows CI's GPU tests did
with the same exports. So a default build exports nothing, as before,
and Windows 10 builds with --features agility-sdk and runs the script.
The exports are now told to the linker by a .drectve directive in the
module, and build.rs is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Windows 10's own D3D12 has no shader model 6.6 bindless heaps: root
signatures with CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED failed with E_INVALIDARG.
victory.exe now exports the Agility SDK's two symbols (version 619, path
.\\D3D12\\; build.rs has the linker export them), and
scripts/get-agility-sdk.ps1 puts D3D12Core.dll 1.619.6 from NuGet there.
Without the DLL, or where the system's is newer, the runtime uses its
own, as before. The DLLs are fetched, never committed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With D3D12SDKVersion exported and no D3D12Core.dll in D3D12\\, D3D12 does
not fall back to the system's runtime: every call fails with
D3D12_ERROR_INVALID_REDIST (0x887E0003), as Windows CI's GPU tests did
with the same exports. So a default build exports nothing, as before,
and Windows 10 builds with --features agility-sdk and runs the script.
The exports are now told to the linker by a .drectve directive in the
module, and build.rs is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shader and GPU tests found no shader model 6.6 device on Windows 10
(only WARP): its own D3D12 has none, and only victory.exe told the runtime
of the Agility SDK (#69). The unit and integration test programs of
victory-shader and victory-gpu now export D3D12SDKVersion and
D3D12SDKPath too (agility_tests.rs; the linker is told by a .drectve
directive in the object, so no build script flag reaches other programs),
and scripts/get-agility-sdk.ps1 also puts D3D12Core.dll in
target\\debug\\deps\\D3D12.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Windows 10's own D3D12 has no shader model 6.6 bindless heaps: root
signatures with CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED failed with E_INVALIDARG.
victory.exe now exports the Agility SDK's two symbols (version 619, path
.\\D3D12\\; build.rs has the linker export them), and
scripts/get-agility-sdk.ps1 puts D3D12Core.dll 1.619.6 from NuGet there.
Without the DLL, or where the system's is newer, the runtime uses its
own, as before. The DLLs are fetched, never committed.
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>
An entry that matches nothing stops with its name. -Exe, victory.exe and
the repository folder are taken as written. If victory.exe does not start,
the launcher exits 1.
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>
A change of protection costs far more under Wine than on Windows (Wine's
memory lock, a TLB shootdown on every core running the process). With a
written block resting 50 ms instead of 3: blocks made read-only a frame
861 -> 461, guard faults 478 -> 364, the guards' lock waits 221 -> 173 ms;
frame time alike within the runs' spread.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream leaves the hair passes out as broken; on an RTX 5060 under
Proton they draw right (the prologue's characters were bald without
them) at no cost measured (101 ms a frame with, 119 without).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FidelityFX's upscaler, the title's choice on Series S, is a network of
8-bit dot products: its eight largest layers (one dispatch each, at the
output size) took 120 of the 200 ms of an RTX 5060's frame, with the card
at 51 W of 145 and its memory 3-13 % busy. With VICTORY_UPSCALER=6 the
prologue went from 207 to 115 ms a frame, the picture alike.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Play-VIctory.cmd's constant:0.8 the prologue's rooms were dark red
and its yard milky white under Proton; with the estimate the rooms are
lit by their lamps and the yard by the sunset, at the same frame time
(219 against 207 ms, within the runs' spread).
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>