Commit Graph
58 Commits
Author SHA1 Message Date
readmet3xt-labandClaude Opus 5.5 24d6bbb876 VICTORY_FSR_PATH=1: the title's FidelityFX path with its own upscaling, for comparing with DLSS
The image is patched to the FidelityFX path at VICTORY_DLSS_MODE's scale
as for DLSS, without Streamline: on Series X what that path looks like
and costs by itself, so that a fault seen with DLSS can be put on the
path or on DLSS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 20:25:34 +05:30
readmet3xt-labandClaude Opus 5.5 d11233aa22 The title's FidelityFX calls through ours, its FidelityFX path on Series X (from DexNom's fork)
With VICTORY_DLSS=1 or VICTORY_FRAMEGEN=1 and Streamline available, the
executable's imports of amd_fidelityfx_loader_xbox.dll (ffxCreateContext,
ffxDestroyContext, ffxQuery, ffxDispatch) are bound to ours, which call
the title's own DLL for everything and give an upscale dispatch to
victory_gpu::streamline: DLSS takes it (the title's is not called), or,
with frame generation alone, its inputs are noted and the title's runs.
The title's upscaler context stays its own, so its upscaling runs again
on any frame DLSS does not take; each reason is logged once.

Series X never uses that path by itself: no Series X run (stock or
1440p) loaded amd_fidelityfx_upscaler_xbox.dll, every Series S run did.
The renderer selection (title+0x7e9421) takes the FidelityFX path,
renderer 7, only on a Series S (title+0x75140 tests the device type for
6); Series X takes renderer 6, the title's own temporal pass. The title
sizes the FidelityFX path's scene itself (title+0x28ef69a: its scale
times the output size), not through ffxQuery. So with DLSS or frame
generation available, native_1440p::prepare_upscaler patches renderer 7
in and the scaled branch to VICTORY_DLSS_MODE's scale (dlaa 1, quality
2/3, balanced 0.58, performance 1/2, ultraperformance 1/3; noted as the
FidelityFX quality mode), and the temporal scene scale to the same, with
the 1440p output kept (images/native-1440p-upscaler-<mode>-sdr) or on
its own (images/upscaler-<mode>). Each instruction is checked against
the stock bytes first; the test does so with the retail executable.
Without Streamline the image is patched as before.

`victory upscaler-check [--device] [--present]` checks Streamline, DLSS
and frame generation on this PC without the title.

The FidelityFX description layouts and the image patch of the FidelityFX
path are ported from DexNom/VIctory (crates/victory-hle/src/modules/
fidelityfx.rs, apps/victory/src/native_1440p.rs prepare_fsr_4k,
GPL-3.0-or-later); here the title's DLL keeps serving the API and the
1440p output stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 20:22:58 +05:30
readmet3xt-labandClaude Opus 5.5 9a791323ba 1440p output for the Series X retail image (from DexNom's fork)
VICTORY_NATIVE_1440P=1 (scene 2560x1440) or VICTORY_RENDER_1080P=1
(scene 1920x1080 scaled up by the title) patch the retail image's SDR
display mode, scanout reservation, temporal scene scale and Settings
viewport load before it is mapped, each checked against the stock
bytes; the patched image is cached apart from the stock one. The
frontend's legacy 4K projection gets its viewport on the 1440p target.
Ported from DexNom/VIctory (GPL-3.0-or-later), native 1440p part only.

Series X on an RTX 4070 SUPER, the opening's cutscene: median frame
77 -> 67 ms, 95th percentile 506 -> 401 ms (bench x-nowait vs
x1440-vol, with the volumetric light also on).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 15:46:08 +05:30
localandClaude Opus 5.5 af3c946271 Merge local/next into day/shaders; pipeline workers are all woken
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 <[email protected]>
2026-11-25 15:32:48 -06:00
localandClaude Opus 5.5 bd7be01b3b Pipelines known to take long are made beside the others, by a quarter of the workers (VICTORY_PIPELINE_SLOW=0: in the order created)
Run shaders-1, the first with a changed translator (fresh shader and
pipeline caches): 3,020 pipelines started at creation, all 16 workers in
programs of seconds to tens of seconds each while the title loaded (97 made in 20 s),
then the quick ones at 100-190 a second, too late: 0.5-1.6 s a frame and up
to 2,900 draws a frame dropped from 60 to 150 s. A pipeline that took a
second is now noted (slow-pipelines.txt; `victory warm` notes them too) and
waits in a list of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 14:35:11 -06:00
localandClaude Opus 5.5 2f22f6e2c2 The title's pipelines written down (VICTORY_PIPELINE_BOOK=1, off) and made ahead of a run, each batch in a process of its own (victory warm)
Every pipeline the title creates goes to known-pipelines.bin beside the
pipeline library, its containers to known-shaders.bin (in the cache folder;
they are the title's code). `victory warm` makes their host pipelines in
idle-priority processes of 200 each and lets them go: the driver's cache on
disk keeps them. Those earlier runs drew with come first; what is done is
noted by translator and driver (warm-done.txt); a pipeline that ends or
hangs its process is named in warm-bad.txt and skipped. VICTORY_EARLY_ALL
does this in the running title and ended it inside the driver.

Not measured yet: how long, and how much the driver's cache grows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:32:18 -06:00
local 8c69173bf0 Merge day/shaders 2026-11-25 13:29:56 -06:00
localandClaude Opus 5.5 ebdefa6f99 The image's name is kept for VICTORY_WRITE_SITES (the program did not build)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:21:00 -06:00
localandClaude Opus 5.5 2ad419b24d Writes of the title's that change nothing are not made: faulting stores and copies beside the guards, and flags it sets that are set (VICTORY_WRITE_SITES=<file>: places changed at load to look first; off without it)
A store that faults, or a part of a copy into a guarded block, whose bytes
are there already is left out (with VICTORY_STORE_BESIDE, VICTORY_COPY_BESIDE).
The places in the title's code where that is the rule and the instruction is
an `or` of a byte with a constant are written into the file, and made to look
before they write at the next start. The file holds offsets, no code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:10:05 -06:00
localandClaude Opus 5.5 4b3141fac5 Frame replay: shaders of another translation (--retranslate, --shaders, --shaders-b turn by turn), times per pass as medians
--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 <[email protected]>
2026-11-25 12:49:12 -06:00
localandClaude Opus 5.5 3b3aabc896 Merge branch 'local/next' into night/card
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:47:24 -06:00
localandClaude Opus 5.5 86694b5ad2 VICTORY_CARD_AWAKE: the card's clocks kept up between submissions
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 <[email protected]>
2026-11-25 04:00:22 -06:00
localandClaude Opus 5.5 26b15e8fe3 Card memory the CPU maps: windows, sends and scratch (VICTORY_WINDOWS_BAR_MB, VICTORY_SEND_BAR, VICTORY_SCRATCH_BAR); the card's own stamps (VICTORY_CARD_SPANS)
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 <[email protected]>
2026-11-25 03:35:03 -06:00
localandClaude Opus 5.5 baf947a380 Diagnostics: a sampling profiler (VICTORY_PROFILE=<from>,<to>,<ms>,<file>[;...])
Samples the 28 busiest threads, whole stacks, with what the frame is at.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 02:58:07 -06:00
Marvis 9849814165 Diagnostics: VICTORY_POKE writes title bytes twice a second
A title that ends itself when its main loop has not ticked for a while
runs on through slower frames.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
(cherry picked from commit 532cb7cdfee02e6139a683f79ee4c9b4a92828a4)
2026-11-25 01:03:03 -06:00
AgneyaK 603a3eaf8f run: stop with a clear message when the title's own DLLs are missing
A package copied without the DLLs that ship beside the executable leaves
every import from them unbound, and the title stops at its first call into
one: Grand Theft Auto VI 1.0.2.1 at +0x2237178 during System Init (#930,
#1553, #8), with nothing saying why.

After mapping the title DLLs, name the main image's static imports that
must come from the title's folder (neither the host nor our runtime serves
them) but were not mapped from it. Print them; when executing with the
default trap policy, stop before running title code. With
`--unimplemented zero` the title still runs (stubs were asked for).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit e9cb14ad3ea2f7a3ec051d9f9691684d7e9037ae)
2026-11-25 01:03:03 -06:00
DoubleD17 8777df612c Deduplicate image paths in victory census
(cherry picked from commit 142ec8dd4563608b67ffabc8ba47175508f9a660)
2026-11-25 01:03:01 -06:00
David Palacios 36212045ae CLI: add AVX2 pre-flight CPU check before executing titles
(cherry picked from commit 534e1dd74c57448bef4c525e204acc123387d6f2)
2026-11-25 01:03:00 -06:00
Aws 2a23c5be20 List successfully emitted shaders in offline translation scans
(cherry picked from commit 6d174aeeeb93669ab9f43ff01b24963933433af8)
2026-11-25 01:03:00 -06:00
Thomas Askharoun c5692adf0a Show on-disk file size in victory inspect
(cherry picked from commit 43e2ca9de29f5833941970e82ed89872c9f86a81)
2026-11-25 01:02:59 -06:00
LF2000 Builder 20602d4b13 translate: refuse a VICTORY_EMIT_DUMP directory inside the repo
translate writes emitted DXIL and validator reports to the
VICTORY_EMIT_DUMP directory. Both are derived from the game's shaders,
but the directory was never checked against the source tree. With
VICTORY_EMIT_DUMP=. run from the checkout, the .txt reports land in the
repo, and git and cargo xtask policy both let them through.

Check the directory once at the start of translate::run, as Config
already does for the cache and data directories.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 988fd9a64718ee9a235cff3b60192b6b86006c4d)
2026-11-25 01:02:59 -06:00
nathanbzrr 9f36aa67ce Census: deduplicate PE imports without hint
(cherry picked from commit a3f89eda547690efa8542b8b993b9de894f05bb1)
2026-11-25 01:02:58 -06:00
FIocker 6ecd412795 Shader info: show stage I/O even when instruction decoding fails
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit e6ebec9ccf0bc27cfe0b5509ec3d07a0969eb25f)
2026-11-25 01:02:58 -06:00
Bloxive 7bc655a5c3 Census: report directory traversal failures
Fail when a requested scan root cannot be opened. Report traversal errors below a readable root alongside the other skipped inputs.

(cherry picked from commit b1bdd8994a456755255b1e096f641ef47ff719c9)
2026-11-25 01:02:56 -06:00
localandClaude Opus 5.5 f0bc1d234c Merge local/world: fork main 8dd30ab (every view of a page is guarded)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:39:06 -06:00
localandClaude Opus 5.5 c45d109380 Merge fork main 8dd30ab: writes through one view of a page are seen at its other views
The fork's guard over every view of a physical page is kept on our own block
bits, known holes, kernel writes and changing blocks; what both had, ours.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:38:57 -06:00
local 1161647e1d Merge local/next 2026-11-25 00:01:05 -06:00
localandClaude Opus 5.5 fa83615d1e victory replay --flow, --images, --until; shader-info names the hashes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 00:00:07 -06:00
localandClaude Opus 5.5 b4b13e4f32 victory replay --pixel: which commands change a pixel, in every target
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 <[email protected]>
2026-11-24 23:50:34 -06:00
fxcelessandClaude Fable 5.2 847a0af35e A write through one view of a page is seen at its other views; page writes counted; levels on demand (off); warm-up; card memory numbers
Memory sync:
- The guard over every view of a physical page (code by myokex, victory-amd
  c6dc4d8, after pull request #115 by Spexivus, its correction by joroyt and
  a part of VIctory #1122 by tightfall): the title shows one page at several
  addresses and a copy was guarded at one only. 0.8 to 1.0 million writes
  through another view in a five-minute run on the test machine.
  VICTORY_VIEW_GUARD=0 turns it off.
- Kernel reads into title memory are read beside and copied in (Joshua Odom,
  10ea38e).
- Writes of the storage layer into physical pages are counted where the
  title has the pages mapped and can open the guards there
  (VICTORY_PAGE_WRITES, off: counted only). Failed page-destination reads
  are retried.

Card memory:
- Levels on demand, off unless VICTORY_LEVELS_ON_DEMAND=1: a texture the
  title fills takes card memory for the levels the title holds; held levels
  get memory only while the card has room and are asked for again. Its test
  runs on the software adapter; not run on a card yet.
- Refused texture slots are held back so a pass reaches the slots behind
  them; room can be kept for card copies of title buffers (off).

Tools: translate --warm all; the shader cache is keyed on the translator's
source; counters for copy-back races, page writes and the copies the
texture sweep never lets go; a walls trace.

Game runs of these changes on an RTX 4070: five five-minute runs without a
device loss or a failed request. This merged tree was built; its test
suites were run on the tree the changes come from (gpu 129, hle 97).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 00:44:25 -05:00
localandClaude Opus 5.5 c11b92e9ac Merge local/next d4772b3
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 <[email protected]>
2026-11-24 22:36:00 -06:00
localandClaude Opus 5.5 c7cf0c6aa9 Merge local/gpucost
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:21:05 -06:00
localandClaude Opus 5.5 7ab355413d Merge local/shaders
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:21:05 -06:00
localandClaude Opus 5.5 f86aae992a What goes up to card copies: a check, and fetches caught in between put right
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 <[email protected]>
2026-11-24 22:17:50 -06:00
localandClaude Opus 5.5 ce3c03a801 Argument clamps in batches (VICTORY_INDIRECT_BATCH)
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 <[email protected]>
2026-11-24 22:10:47 -06:00
localandClaude Opus 5.5 5686c41b47 Shader forms: sizes of views nothing reads, ordered sections, wave sums off the beaten path, counters
- An image or structured buffer whose descriptor is read for its size
  alone (the puddle passes, a water simulation step).
- The record count of a structured buffer is asked of the raw view the
  host makes of it: as a structured view's it was in bytes on AMD.
- Primitive-ordered pixel shading becomes rasterizer ordered views (the
  hair cards' layers).
- A 16-bit wave sum where not every lane runs, on 64-lane waves, bit for
  bit as the console's tree.
- "Some lane is left" of a mask operation as a number; scalars parked in a
  VGPR used before; a one-channel store into a counter texture (the
  upscaler).
- translate --list prints a hash of every emitted module.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 22:02:52 -06:00
localandClaude Opus 5.5 b01486de02 Frame replay: the CPU's copies leave what the card wrote; buffers in the card's memory fit
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 21:37:32 -06:00
localandClaude Opus 5.5 bac2b33de2 Frame replay: where identical runs diverge; resources dying as a capture starts
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 21:29:09 -06:00
local eb50022824 Merge local/replay: frame recorder and replayer
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	apps/victory/src/main.rs
2026-11-24 20:30:25 -06:00
localandClaude Opus 5.5 7fa012814f Only changed dwords go back into title memory; cheap safe copies; title's own arguments; more shader forms
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 20:28:42 -06:00
localandClaude Opus 5.5 94fe5d9dee Frame replay: usage doc, mesh draws and a title's size in its tests
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 20:23:46 -06:00
localandClaude Opus 5.5 048201b13c victory replay, larger tests of it
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 20:09:57 -06:00
localandClaude Opus 5.5 dd3307943c Streaming, copy queue, texture pools and a shader cache that survives rebuilds
Textures and staging cut from 64 MB blocks; a kept view per page section and
page lists read again until the title has filled them in; the GPU side told
when streamed bytes land; results fetched over the copy queue
(VICTORY_RELAY_COPY=1); the write-watch journal behind a reader-writer lock;
the shader cache keyed by the translator's sources and `victory shaders`;
helper lanes as in upstream 1733 (VICTORY_HELPER_OWN).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 18:55:40 -06:00
fxcelessandClaude Fable 5.2 43ebd22d7d Put the parked lane-mask change (#11) back
The previous commit took it out; that was not wanted. The tree is again as
it was before that commit.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 17:00:18 -05:00
fxcelessandClaude Fable 5.2 149217c8d3 Take the parked lane-mask change (#11) back out for now
Its programs translate and run, but on the test machine the lighting gain
could not be shown, it costs about 40 ms of GPU time per frame, and the
picture is being re-checked one change at a time from a known-good tree.
It may come back once that is settled.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 16:59:43 -05:00
fxcelessandClaude Fable 5.2 29f9e89df6 The game is no longer named in the tree
Comments, documents and descriptions now say "the title". No code changes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 15:45:05 -05:00
cxccxcandClaude Opus 5.5 57fcf21b80 Shaders: restore parked lane-mask pairs a few instructions apart; relative VGPR reads keep parked lanes (#11)
The console compiler parks a wave64 lane mask in two lanes of a spare VGPR
and may restore the halves with other instructions between the two
v_readlane_b32. The pair restore now looks ahead in the block (nothing between
may touch the second register, write the first, or save into the lanes), so
the mask comes back as a mask. This lets indirect_light_probes
CS_IrradianceCache_Shade / ShadeSecondary translate: they were dropped every
frame, leaving the irradiance cache unlit and everything in shadow black.

An M0-relative read (v_movrels_b32) names every VGPR from its base up, which
marked the parking VGPR as an ordinary one and turned unspilling off for the
whole program. Relative reads no longer count there (relative writes still
do). billboard_nobump CS_RaytracingResolve_a56bfb9c translates with it.

translate: VICTORY_TRANSLATE_ONLY=<hash prefixes> limits a run to those
containers; VICTORY_HOST_MAX_WAVE=32 translates as on a 32-lane host, so
--pipelines matches what the runtime creates on NVIDIA.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-24 15:35:04 -05:00
fxcelessandClaude Fable 5.2 d7823e8a38 Shader clean-up passes; a test that needs a card skips without one
- Clean-up passes over each translated module (VICTORY_SHADER_OPT bits: dead
  code, folding, reuse, branch facts, loads within a block, wave64 first-lane
  exchange), part of the shader cache key. About 43 % fewer host instructions
  over the pack; about 20 ms less GPU time per frame on the test machine.
- translate: a census of the emitted code.
- Checked with plain game runs of this tree on the test machine.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 15:13:27 -05:00
fxcelessandClaude Fable 5.2 6fa814fba5 victory-gta6: this fork's changes on top of VIctory main (ffe310e)
World rendering, lighting, frame-rate and memory work for Grand Theft Auto VI
(Xbox Series X profile) on one Windows PC with an NVIDIA RTX 4070. The README
describes the state, the changes and the credits. Based on VIctory by Marvisak
and contributors (GPL-3.0-or-later); XCL by ivall and contributors was used as
a reference. No game files are included.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 13:02:18 -05:00
r4.andClaude Fable 5.2 f28a9f462e Merge upstream main (8e79c80) into shader/per-lane-phi
main now has CI (clippy with -D warnings, then the workspace's tests) and
three new tests that call `resource::track`, which this branch gives a
fourth argument. No textual conflict, but the test target did not build:
those three calls (emit/lower.rs, twice in emit/mod.rs) now structure the
program first and pass it, as this branch's other callers do. Both of
CI's clippy commands are clean on the result.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-24 11:10:23 +02:00