VIvidia is an experimental, research-oriented Xbox Series (Scarlett) compatibility runtime, HLE layer, and GFX10/RDNA2-to-DXIL shader translator targeting native Windows x86-64 execution on NVIDIA GeForce RTX GPUs (Direct3D 12, Shader Model 6.6+, Wave32). It currently focuses on running GTA VI (game_scarlett_master.exe, Xbox Series build v1.0.2.1) using user-supplied title files.
Legal & Asset Safety Notice This repository contains zero proprietary game files, binaries, shaders, textures, archives, keys, or screenshots. Users must supply their own legally obtained dump of the title outside the repository directory. See Asset Policy.
VIvidia is an independent technical project and is not affiliated with, endorsed by, or supported by the title's developer or publisher, Microsoft, AMD, or NVIDIA.
- Project Scope & Architecture
- Workspace Crates
- Milestones & Recently Resolved Issues
- Self-Reported Hardware & Performance
- Shader & Wave64 → Wave32 Lowering Status
- Known Issues & Roadmap
- Prerequisites & Building from Source
- Usage & Key Environment Variables
- Repository Safety & Policy Enforcement
- License & Upstream Acknowledgements
VIvidia executes native console x86-64 title code under Windows while translating console graphics, system APIs, and asset formats on the fly:
- PE Mapping & TLS Redirection (
victory-pe,victory-loader): Validates and maps the title executable and companion DLLs into the host address space, redirects static TLS slot accesses, and installs a structured crash handler (module+rvaunwind reporting). - Console High-Level Emulation (
victory-hle): Implements console-only runtime modules (xgameruntime.dll, virtual storage path mapping underVICTORY_DATA_DIR, offline service stubs, audio, and GameInput/DualSense/DualShock 4 USB & Bluetooth support) while enforcing a strict host DLL pass-through policy (HostPolicy). - GFX10/RDNA2 → DXIL Shader Translation (
victory-shader): Lifts native GPU shader binaries to an SSA IR, strips hardwareEXECmasks via control-flow structurization, traces descriptor/memory lineage back to root signatures, performs Wave64 → Wave32 lowering (widen,with_pair_meetings,split_lds_kernelwithSLOT_GROUP_SCRATCH, andSLOT_VIEW_ADDRESSES), and emits Shader Model 6.6 DXIL bitcode validated againstdxil.dll. Since commit17303ca,VICTORY_NAN_GUARDis disabled by default (and keyed inshader_cache.rs) so valid±Infvalues exported by shadow-mask pixel shaders are preserved intact. - D3D12.X Memory & Command Bridge (
victory-gpu,victory-formats):- Coherency & View Guards (
watch.rs,shadow.rs,inplace.rs,safecopy.rs): Tracks unified-memory writes via WindowsGetWriteWatch, read-only view guards, andbesidecopy/store fast paths. - Class 2 GPU-Resident Ownership (
gpu_owned.rs,VICTORY_GPU_RESIDENT=1): Keeps GPU-written64 KiBpieces of VRAM-backed (Card) title buffers authoritative in local VRAM without periodic GPU piece-hashing, PCIe readback, or CPUland.rsmerges, while armingPAGE_NOACCESSVEH traps on the CPU mirror for on-demand synchronousFastCopy(COPYqueue) pull-back and automatic circuit-breaking (MAX_BUFFER_VEH_FAULTS = 8,4 MiBsub-region batch demotion). - Submission & Staging Offloads (
host.rs,host/fast.rs,shadow/par_refresh.rs,texture.rs): Asynchronous retired D3D12 object destruction (VICTORY_BURY_ASIDE,victory-buryworker), R8 single-level linear plane deduplication (VICTORY_PLANE_SAME), and longest-first + batched front-pass scheduling (VICTORY_FRONT_FAST=1). - Allocators, Textures & BVH (
pool.rs,book.rs,residency.rs,indirect.rs): Block-pooled VRAM and staging allocators with OS commit-headroom admission, AMD-only gated SQ descriptor address decoding inbook.rs, tiled-to-linear texture detiling / BCPack decoding, and console compute/BVH ray tracing (VICTORY_BVH_BUILDER=1).
- Coherency & View Guards (
All converted caches, pipeline libraries, and runtime save data are written strictly outside the source tree via victory_core::ensure_outside_repo.
| Component | Responsibility |
|---|---|
crates/victory-core |
Configuration (victory.toml), asset-policy path guards, logging initialization |
crates/victory-pe |
Read-only PE32+ and import-library inspection |
crates/victory-loader |
Console image mapping, import binding, TLS redirection, crash diagnostics |
crates/victory-hle |
Console OS/WinRT/XGameRuntime/filesystem/input HLE and HostPolicy |
crates/victory-gpu |
D3D12.X command replay, Class 2 GPU ownership (gpu_owned), write-watch guards, pools, descriptors |
crates/victory-shader |
GFX10/RDNA2 disassembler, SSA IR, structurizer, Wave32 lowering, DXIL emitter |
crates/victory-formats |
Console texture tiling/detiling, BCPack decompression, audio format decoding |
crates/victory-pipeline |
Converter trait and content-addressed conversion cache |
crates/victory-game |
Build identities (v1.0.2.1), title-specific format hooks and patches |
apps/victory |
CLI front end (play, run, shaders, translate, warm, preload, census) |
xtask |
Asset-policy verifier (cargo xtask policy) and git hook installer |
tests/fixtures/hle-probe |
Self-authored synthetic PE fixture for loader verification tests |
Self-Reported Verification Note: All measurements and stability observations below are self-reported from local testing on the hardware profile documented below using native rendering (no DLSS, no Frame Generation).
| Milestone / Fix | Status | Technical Notes |
|---|---|---|
| Executable boot & HLE | ✅ Verified | game_scarlett_master.exe (Xbox Series v1.0.2.1) boots, handles menu/DualSense/DS4/XInput input, and enters open-world gameplay. |
| Stair-step / blocky shadow artifacts | ✅ Fixed (17303ca) |
Root cause: nan_guard clamped ±Inf in pixel-shader exports inside shadow masks. Disabled VICTORY_NAN_GUARD by default and keyed it into shader_cache.rs. |
NVIDIA POOL: diagnostic false positive |
✅ Fixed (ca92822) |
book::texture_address() decoded CPU descriptor heaps using AMD SQ_IMG_RSRC layout; gated by crate::indirect::amd(&host.device) (0 errors in diag and release logs). |
| Retired D3D12 drop stalls & R8 plane churn | ✅ Fixed (ca92822) |
Offloaded bury() D3D12 drops onto victory-bury (VICTORY_BURY_ASIDE=1 default) and deduplicated unchanged single-level linear R8 uploads (VICTORY_PLANE_SAME=1 default). |
| Class 2 GPU-resident piece ownership | ✅ Verified | gpu_owned.rs (VICTORY_GPU_RESIDENT=1) + FastCopy dedicated COPY queue keeps 419 blocks (27.5 MB) VRAM-owned on RTX 4090, skipping 374 compares and 27.0–27.6 MB refreshes per frame with 0 ERROR, 0 WARN. |
| Target 30 FPS in dense scenes | 🔧 Close | Light/medium scenes (1,079–1,517 draws) hit 27.9–29.6 FPS; dense street scenes (4,646–6,119 draws) reach 25.9–27.9 FPS cleanly, with 0.0–1.1 ms on GPU and CPU preparing (~30–36 ms) remaining as the sole bottleneck. |
- GPU: NVIDIA GeForce RTX 4090 (24 GB VRAM, native Wave32, SM 6.8)
- CPU: Intel Core i9-13900K (24 cores / 32 threads)
- Memory & OS: 64 GB DDR5, Windows 11 (
x86_64-pc-windows-msvc) - Execution Profile: Series S (
1280x720internal), native rendering (no DLSS / no FrameGen),releasebuild,VICTORY_HOST_WAVE=32,VICTORY_COPY_BESIDE=1,VICTORY_STORE_BESIDE=1
All three checkpoints below were recorded on the same machine, clean shader cache (VICTORY_NAN_GUARD off), and in-world streaming/street traversal (gta6-debug-*.log 0 ERROR, 0 WARN):
| Build / Checkpoint | Scene Complexity (draws/frame) | FPS | Frame Time | CPU Preparing | GPU Time | Copy-Back | Scene-Load Min FPS |
|---|---|---|---|---|---|---|---|
Baseline (17303ca) |
Heavy (5,665) |
20.2 |
49.5 ms |
~39–63 ms |
1.7 ms |
13.0 ms |
— |
Step 1 (ca92822: BURY_ASIDE + PLANE_SAME + FRONT_FAST) |
Heavy (4,751) |
26.8 |
37.3 ms |
32.8 ms |
0.0 ms |
10.6 ms |
4.4 (225.5 ms) |
Step 1 (ca92822) |
Densest (6,344) |
24.3 |
41.1 ms |
36.7 ms |
0.0 ms |
9.8 ms |
4.4 (225.5 ms) |
Step 2 (+ GPU_RESIDENT=1, STAGE_MS=8) |
Light/Stream (1,079–1,517) |
27.9–29.6 |
33.8–35.8 ms |
29.7–31.0 ms |
0.6–1.1 ms |
7.9–8.2 ms |
17.8 (56.2 ms) |
Step 2 (+ GPU_RESIDENT=1, STAGE_MS=8) |
Dense Street (4,646–4,779) |
25.9–27.9 |
35.8–38.6 ms |
31.7–34.4 ms |
0.0–0.1 ms |
8.8–9.4 ms |
17.8 (56.2 ms) |
Step 2 (+ GPU_RESIDENT=1, STAGE_MS=8) |
Densest (6,098–6,119) |
23.9–25.9 |
38.5–41.8 ms |
33.8–36.1 ms |
0.3–1.1 ms |
9.3–9.9 ms |
17.8 (56.2 ms) |
Where the remaining CPU preparing (~34.4 ms) goes on the RTX 4090:
refreshes(11.5–12.2 ms):6.5–6.7 mssynchronous front-pass waits (refreshes in front of the steps) +2.3 msper-write flushes (~205items) +3.6–4.0 mscopies/fills on bidirectional host-written buffers (66.8–75.1 MB/frame).copies in the card's memory(5.9–6.3 ms):card_before(3.1–3.3 msdeclaring/taking +1.7 mssync list).asking the write watch(3.9–4.1 ms).- Remaining list steps & overhead (
~9–10 ms).
VICTORY_SEND_THREAD=1(asynchronous submit queue without frozen send snapshots): Loweredsending the lists(1.5 → 0.0 ms), but dynamic skinning/face buffers updated by subsequent submissions caused severe character face corruption becauseVIvidiaonly freezes explicit snapshots rather than all dynamic host copies. Removed cleanly beforeca92822.VICTORY_ALIAS_TARGETS=1+VICTORY_GPU_DETILE=1(732113e): Copy-queue synchronous waits and extra prelude compute dispatches regressed FPS and broke face rendering at frame 9846. Reverted.VICTORY_NAN_GUARD=1by default: Clamped valid±Infvalues in shadow-mask pixel exports, producing blocky stair-step shadows. Disabled by default (17303ca).VICTORY_COPY_BESIDE/VICTORY_WC_BAR=1/VICTORY_PORT_CONSTANTS=1pitfalls:WC_BARandPORT_CONSTANTSare explicitly avoided due to driver/PCIe stalls and face corruption reported upstream.
- Shader Cache Census (
victory.exe preloadunderVICTORY_HOST_WAVE=32,VICTORY_NAN_GUARDoff):25,787runnable shaders translated and cached in100 s(198unsupported containers:195unreferenced geometry-onlyGscontainers and3empty containers). - Used Pipeline Prewarming (
victory.exe warm --used):3,709actively drawn pipelines (3,387+322) compiled cleanly for NVIDIA GeForce RTX 4090 in39 sfor the incremental pass (0failures). - Dynamic Descriptor View Addresses & Full-LDS Kernels: Dynamic-offset shadow mask variants (
SLOT_VIEW_ADDRESSEStablet251+MASK_ELSEWHERE) and 32 KiB LDSvfx_triangleClipcompute kernels (SLOT_GROUP_SCRATCHUAVu250) are supported.
- Heavy-Scene CPU Ceiling (>4,500 draws/frame): GPU time on the RTX 4090 sits at
0.0–1.1 ms, while synchronousrefresh_frontwaiting and bidirectional buffer copies keep dense scenes at24–28 FPS. - Wave32 Visual Approximations & Material Quirks:
- Certain vehicles render with solid green fallback textures (
VICTORY_HOST_WAVE=32/ untranslated or partial compute/wave paths). - Localized black pixel tiles on water transmission lighting (
water_tile_append/water_light_writers), blocky hair/character shadows fromAPPROXIMATEWave64 local-wave lowering, and missing loose-piece shader pipelines (native/pieces.rs).
- Certain vehicles render with solid green fallback textures (
- Host Commit-Limit Throttling (
residency.rs): Speculative texture prefetch throttles automatically if available Windows commit headroom drops below 4 GiB.
- Step 3 — Async Front-Pass Join (
host/join.rs,VICTORY_REFRESH_JOIN=late): Overlap the6.5 msrefresh_frontwork with list step walking to cross the native30 FPSthreshold in dense scenes. - Step 4 — Shader & Wave32 Completeness:
- Folded Wave64 emulation (
fold.rs,emit/lds.rs) to make shadow masks & hair shaders exact instead of approximate; foxhoundWave32 water lighting fixes (water_tile_append.rs,water_light_writers.rs);Broadside-RTloose-piece pipeline support (native/pieces.rs) andcanon.rstwin shader deduplication;Whiplashsparse_buf.rs(64 KiBTier-4 virtual sparse buffer pool forLOOSEwindows) to reduce host commit usage.
- Folded Wave64 emulation (
- OS: Windows 11 (x64), or Windows 10 22H2+ with Direct3D 12 Agility SDK (
victory get-d3d12/D3D12\D3D12Core.dll) - GPU: NVIDIA GeForce RTX GPU (or D3D12 SM 6.6 + mesh-shader capable adapter) with current drivers
- RAM / Storage: 32 GB+ system RAM (64 GB recommended; ensure generous Windows pagefile/commit headroom), NVMe SSD
- Build Tools:
- Rust toolchain pinned in rust-toolchain.toml (
1.98.1,x86_64-pc-windows-msvc, Rust edition2024) - Visual Studio Build Tools with Desktop development with C++ (MSVC & Windows SDK, including
dxil.dllfor--validate)
- Rust toolchain pinned in rust-toolchain.toml (
# Verify asset policy compliance before building or committing
cargo xtask policy
# Optional: install git pre-commit asset-policy hook
cargo xtask install-hooks
# Run victory-gpu unit & hardware D3D12 tests
cargo test -p victory-gpu --lib
# Release build (standard runtime — creates target\release\victory.exe)
cargo build --release -p victory
# Diagnostics build (separate target\diag profile with tracing/diagnostics enabled)
cargo build --profile diag -p victory --features diagnosticsConfigure external title/cache paths outside the repository:
# Inspect missing/covered console imports without executing title code
target\release\victory.exe census C:\Path\To\TitleDump --missing
# Pre-translate all shaders into the external cache
$env:VICTORY_HOST_WAVE = "32"
target\release\victory.exe shaders C:\Path\To\TitleDump
# Pre-warm only pipelines previously drawn in-game (fast, ~1 minute)
target\release\victory.exe warm --used
# Or run full shaders + warm + pipeline library preload
target\release\victory.exe preload C:\Path\To\TitleDump
# Direct HLE execution (window title: "VIvidia | <fps> fps ...")
target\release\victory.exe run --execute C:\Path\To\TitleDump\game_scarlett_master.exe --console series-s| Variable | Default | Purpose |
|---|---|---|
VICTORY_GAME_DIR / VICTORY_CACHE_DIR / VICTORY_DATA_DIR |
From victory.toml |
External paths for title dump, derived caches, and saves (kept outside the repo) |
VICTORY_HOST_WAVE |
Auto | Target wave width override (32 for NVIDIA GeForce RTX Wave32) |
VICTORY_GPU_RESIDENT |
0 |
Enables Class 2 64 KiB GPU-resident buffer piece ownership (1) with PAGE_NOACCESS VEH fault handling and FastCopy readback |
VICTORY_FRONT_FAST |
0 |
Enables longest-first + batched claiming (1) in Batch::refresh_front |
VICTORY_BURY_ASIDE |
1 |
Offloads retired D3D12 object destruction to background victory-bury worker (0 disables) |
VICTORY_PLANE_SAME |
1 |
Deduplicates unchanged single-level linear R8 plane uploads across frames (0 disables) |
VICTORY_NAN_GUARD |
0 |
Clamps Inf/NaN in translated shader exports (1 enables; off by default to preserve shadow masks) |
VICTORY_COPY_BESIDE / VICTORY_STORE_BESIDE |
0 |
Side-channel copy/store fast paths beside write-watch guards (1 enables) |
VICTORY_TEXTURE_POOL / VICTORY_POOL_SMALL |
1 / 1 |
Controls 64 MiB heap/staging block pooling |
VICTORY_TEXTURE_STAGE_MS / VICTORY_TEXTURE_CATCHUP |
250 / 1 |
Per-pass texture upload millisecond cap (8 smooths scene-load drops) and 3× catch-up (0 disables) |
VICTORY_SHOW_NEW_LATER / VICTORY_TEXTURE_NO_WAIT |
0 / 0 |
Delays showing newly pooled textures / avoids blocking texture refreshes during title remaps |
VICTORY_CARD_BUFFERS_MIN_KB |
1024–16384 |
Minimum title buffer size (KiB) promoted to Card local VRAM (64 covers sub-1 MiB buffers) |
VICTORY_BVH_BUILDER |
0 |
Enables title compute/BVH ray tracing (1) |
VICTORY_PIPELINE_BOOK |
0 |
Records created pipelines for victory warm driver-cache prewarming |
VICTORY_JOIN_PARTS / VICTORY_TURBO_THREADS |
Auto | Joins submission parts (16–128) and configures Neptune worker thread count (8 on 13900K) |
- Pre-commit & CI Policy Check:
cargo xtask policy(xtask/src/policy.rs) enforces an allowlist of source/documentation extensions, rejects files ≥ 640 KiB, blocks binary signatures, and flags long hex/base64 sequences. - Permitted Sole Binary Exception:
crates/victory-formats/src/bcpack-tables.bin(~78 KB) holds standard BCPack entropy/dictionary tables required for format decoding and is explicitly registered inxtask/src/policy.rs(not covered by the repository source license; see docs/asset-policy.md). - Runtime Path Isolation: Runtime outputs are checked with
victory_core::ensure_outside_reposo derived artifacts never enter the git working tree.
- License: Workspace crates are licensed under GPL-3.0-or-later (see Cargo.toml; excluding the documented
bcpack-tables.binformat-constant table). - Upstream Acknowledgements: VIvidia builds directly upon and gratefully credits the open-source research and engineering of the VIctory community:
- trustno1-coder/VIctory-NVIDIA — primary upstream base for NVIDIA Wave32 lowering,
besidecopy/store optimizations, DualSense/DS4 input HLE, Streamline integration, and memory-packing work. - Whiplash — Class 2
64 KiBGPU-resident piece ownership (gpu_owned.rs),FastCopydedicatedCOPYreadback queue, and longest-first/batched front-pass refresh (host/fast.rs). - foxhound — background retired D3D12 object destruction (
victory-bury) and single-level R8 plane deduplication (VICTORY_PLANE_SAME). - Broadside-RT, fxceless/victory-fork, Marvisak/VIctory, DexNom/VIctory, Belobug/VIctory-Belobug-AMD, and FQY55kai/ZJOU-VICTORY — foundational shader translator, GPU memory/write-watch tracking, BVH ray-tracing work, pool diagnostics, and HLE contributions documented in docs/findings.md and docs/bug-journal.md.
- trustno1-coder/VIctory-NVIDIA — primary upstream base for NVIDIA Wave32 lowering,