From a checkout about 170 characters deep, blake3's build script fails in
ml64.exe with "A1009: line too long" even with long paths enabled, because
its object files are written under target; a short CARGO_TARGET_DIR avoids
it (measured in #2029: 150 characters built, 170 failed, a 33-character
CARGO_TARGET_DIR built). The note also says where victory.exe lands then,
since the commands below name target\release.
Fixes#2029
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The title now plays the intro cutscene and reaches the prologue with the
graphics fully displayed. Splits the two in the stage table, updates the
subsystem rows, the memory requirements and the pipeline pre-build timing.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
VICTORY_TRACE_SHADERS now also reads back the records of every indirect
execution whose pipeline holds a listed shader, in every frame, not only in
dumped capture frames, and the line names the frame. Traced commands are
logged without the 500 cap in listed capture frames.
Why: whether the tiled-lighting draws get instances could only be seen in
frames with VICTORY_DUMP_TARGETS, which cost ~40 s each and at today's
speeds never reached a cutscene shot with geometry. Run light2 (traced
VS_TiledLighting 25ebc92075b62822): 2,760 executions over world frames
1678-1723, 10-16 of the 60 per frame with an instance in cutscene shots, 2
in sky shots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pack's records are converted to the descriptions a run builds, so
pre-built pipelines carry the run's names. A mesh pipeline's topology
is given explicitly: the library refused every mesh pipeline without it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Every shader the title can ask for is translated into the run's cache
ahead of time; refusals are cached. The cache key is the translator's
source, not the executable. A pipeline is listed for an early start at
its first draw; draws go ahead of early starts. Progress on stderr.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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 <noreply@anthropic.com>
A buffer read through a slot that holds a texture view reads an empty
buffer instead of faulting. Host objects are retired after the lists
that name them.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Buffer views and title-written textures get host views when the title
writes them; lists that index the heap have every range current at
submission. Changes are tracked per 64 KiB page with guards, kernel
writes and aliased mappings reported.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Their root addresses arrive as user data and every access is
bounds-checked; list upload memory lies below 2^40 and is
write-watched; root unordered writes go back byte for byte.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The host FidelityFX path (VICTORY_FIDELITYFX_DIR) and what the console
upscaler's shaders need (dot4 instructions, packed f16, typed clears,
feature queries). 64-bit typed atomics for the alpha prepasses. The BVH
intersection instruction on the host (boxes, triangles, sorting). Lane
masks in mesh and pixel programs: stale registers behind dead edges,
masks spilled to VGPR lanes, fire-light loops over the host wave. A
per-slot stride table for structured buffers taken from the heap.
image_gather4_l, LDS byte and half accesses, hardware SGPR inputs.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Getting started names Rust (pinned in rust-toolchain.toml) without saying
how to get it. Add rustup through winget or rustup.rs, that the pinned
toolchain then comes on the first cargo command, and the MSVC C++ build
tools the Windows target needs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six diagnostic switches (VICTORY_D3D12_DEBUG, _GBV, _DRED, _WARP,
VICTORY_GPU_TIMING and VICTORY_DUMP_TARGETS) were on whenever their
variable existed, so VICTORY_D3D12_WARP=0 still selected the software
adapter. They now go through one helper that reads a value other than 0
as on and an unset variable or 0 as off; every other value keeps the
meaning it had. The README says so above its switch table.
With indirect execution the world's first frame asked for over 1,200
pipelines at once and took more than 30 s, so the title's own GPU
watchdog ended the run. Host pipelines are now made by worker threads: a
first use waits at most 0.5 s per title frame, and that pipeline's draws
are dropped until it is ready. The world presents frames again, and
indirect execution is the default (the switch is gone).
Pipelines are cached across runs:
- every host pipeline goes into a pipeline library saved under the cache
folder (named by a hash of the translated code, our root signature and
the state; a blob the device rejects starts an empty library);
- the pipelines drawn with are remembered and started during loading on
the next run.
One cold and one warm run: the last pipeline was ready 38 s after the
world's first frame cold, 1.4 s warm; the first world frame took 3.2 s
cold, 0.37 s warm.
Also:
- Copy-backs of shader-written ranges return only the bytes the GPU
changed; they used to overwrite what the title's CPU wrote meanwhile,
which crashed the title.
- Indirect dispatch records are bounded (group counts were not), and the
console's single-dispatch argument type runs as a dispatch.
- Per-shader counts of dropped draws in the diagnostics log; a switch
that submits and times each list alone.
Not working yet: the world shows no geometry, and runs end on a GPU page
fault after at most about 55 s.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Translated loops stop after 2^20 iterations per lane so that a loop
over not yet mirrored data (zeros) cannot run four billion times. A pass
where every lane reaches that limit still takes seconds, though: 2^20
iterations times a 4K screen's 8 million pixels is about 10^13 loop
bodies. The world's frames now take 1.5-3 s, and loops spinning to the
limit on data that reads as zeros are one candidate.
A diagnostics build now reads VICTORY_SHADER_LOOP_LIMIT (decimal or 0x
hex, at least 1). If a low value such as 4096 makes world frames much
faster, loops hitting the limit are what makes them slow. If not, they
are ruled out. The limit is part of the translation, so the shader cache
keys on it, and a run that overrides it logs a warning. Release builds
always use 2^20.
The host device was removed seconds into the world because a shader read
a descriptor of the wrong kind: empty slots held a null 2D texture view
where the shader expected a buffer, which gave a garbage heap index and
a read far past the view heap. Null descriptors now have the kind the
shader expects (raw buffer, constant buffer, or a texture of the title's
own dimension). The world then ran to a 240 s time limit with no removal.
Also:
- Host lists hold the textures, pipelines, root signatures and heaps they
name, and heap slots hold the resource they view (the title releases
objects before submitting lists that use them).
- The device-removed report places the fault against the host descriptor
heaps and names our own uploads; VICTORY_D3D12_GBV turns on GPU-based
validation, VICTORY_DUMP_TARGETS works.
- Indirect execution (draw, indexed draw, dispatch, mesh dispatch): the
world draws most of its geometry this way. Arguments are clamped and
charged to a per-list budget by a small compute pass first, so garbage
cannot hang the GPU. Off by default (VICTORY_INDIRECT=1): with it on
the title's own GPU watchdog ends the run about 30 s into the world.
- Shader-written ranges are copied back once per submission and only
where they differ; refreshes beside them copy only stale pages. The
frame-rate line counts copy-backs and dropped draws.
Not working yet: the world's picture is black (indirect draws off, and
hundreds of draws per frame have no translated shader).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Says how far the title gets (menus at 30 fps, the world reached but not
rendering), what each subsystem does and still needs, and warns that the
world can reset the display driver on a real GPU. Adds how to run the
title, the translate command, and tables for the keyboard pad and the
debugging switches.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The title now boots through every first-boot and menu screen at its own
30 fps, drawing with translated shaders, with input, sound, saves and
loading served; it reaches the world, where the host GPU path still
fails (see "Not working yet").
Loader and runtime
- Crash reports unwind properly, name C++ throws and host GPU failures,
carry the title's last debug lines and are appended to crashes.log.
- Thread notices on our own threads, reentrant late DLL loading, exit in
the console's order, relaunch on a launch-new-game request.
- Offline guard: the title cannot reach the network (sockets, name
lookups, WinHTTP, the media source resolver); by-name lookups and
loads follow the import rules.
- Every runtime area the title calls is served (networking hint,
packages, store, saves, display, UI, speech stubs, user, async pool).
Saves persist; an update is one rename and survives a kill at any step.
- DirectStorage reads for real: shared worker pool, priorities, zlib and
BCPack. BCPack is our own decoder; the format's constant tables ship in
crates/victory-formats/src/bcpack-tables.bin (the asset policy's one
exception, see docs/asset-policy.md).
- GameInput from XInput pads and the keyboard, with a keyboard stand-in
pad; console timers (1 ms) for the whole process.
- Audio: XMA2 decoding on the emulated contexts, Opus on the decoder
queues, the DSP interface as a stub; title memory placed below 2^40.
- Console texture layouts (sizes, tiling, detiling) and the layout
library's imports.
GPU
- Draws, mesh dispatches and compute dispatches run on the host with
shaders translated at first use and cached on disk; descriptor heaps,
views, root signatures, barriers and host texture states; rectangle
lists; comparison samplers.
- Title memory reaches the host through persistent mirrors that copy
only pages written since the last copy; shader-written buffers are
copied back.
- Presentation with frame pacing per event kind; framerate in the window
caption.
Shaders
- DXIL emission for vertex, pixel, compute and mesh programs from the
console's native code, with a differential test suite against the PC
compile. World set: mesh 8,191 of 8,506, vertex/pixel 10,617 of
12,346, compute 1,643 of 2,539; utility set complete.
Build
- Debugging aids (debug logs, frame capture, stack dumps, scripted keys,
the host debug layer, the software adapter) exist only with the
`diagnostics` feature; `[profile.diag]` keeps that build apart.
Not working yet
- In the world the host device is removed within seconds (descriptor
handling fixes are in, unproven by a surviving run) and frames present
black.
- 64-bit image atomics, merged geometry stages and the BVH builder's own
shaders do not translate; reverb is silent.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Rust workspace for VIctory: PE analysis, loader, HLE skeleton,
DXBC/DXIL parsing with a GFX10 decoder, conversion cache, CLI and
asset-policy enforcement.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>