- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .cargo | ||
| .githooks | ||
| .github/workflows | ||
| apps/victory | ||
| crates | ||
| docs | ||
| scripts | ||
| tests/fixtures/hle-probe | ||
| xtask | ||
| .gitattributes | ||
| .gitignore | ||
| .victory-root | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
| victory.example.toml | ||
victory-sauque1
victory-sauque1 is an experimental Xbox Series X|S (Scarlett) user-mode compatibility layer and D3D12.X-to-D3D12 translation runtime written in Rust. This fork focuses on pushing real-world playability, CPU/PCIe pipeline throughput, visual correctness, and AMD RDNA 3 stability on modern Windows 11 PC hardware.
Legal Notice: This repository contains original Rust translation and runtime source code only. No game assets, encryption keys, copyrighted binaries, Xbox system files, or proprietary AMD SDK DLLs are hosted, distributed, or linked here. Users must supply their own legally obtained files locally.
Current Progress & Milestone Status
Tested on AMD Ryzen 7 5800X / Radeon RX 7800 XT (16 GB VRAM) / 48 GB DDR4-3000 / Windows 11 (RDNA 3):
| Milestone | Status | Notes |
|---|---|---|
| Executable Loads & Boots | Achieved | PE loader, HLE bindings, and D3D12.X runtime initialization |
| First Frame Rendered | Achieved | Native D3D12 swap chain presentation with Scarlett XOR texture deswizzling |
| Main Menu & UI | Achieved | Responsive profile selector, menus, and HUD rendering |
| In-Game (Exteriors & Interiors) | Achieved | Playable driving in dense city traffic, NPC interactions, and interior shops with fixed HDR exposure |
| 15–30 FPS Target | In Progress | Currently ~7–10+ FPS in dense city scenes; CPU-bound in the submission thread (victory-queue-behind) |
| Long-Session Stability | In Progress | Multi-minute city & interior runs without TDR (0x887A0006) or memory faults |
Key Engineering Improvements in This Fork
1. RDNA 3 Stability & Visual Accuracy
- Interior HDR Auto-Exposure Fix: Preserves deferred readback ranges (
deferred.backs) for small luminance/exposure targets (5×1/1×1), eliminating blown-out white flashes and overexposure inside buildings and doorways. - TDR-Safe Synchronization: Preserves RDNA 3–safe memory run granularity (
word_runs/dword_runs) and write-watch guard boundaries (PAGE_READONLYchecks) to preventDXGI_ERROR_DEVICE_REMOVED (0x887A0006)and access violations. - Scarlett Texture Deswizzling: Hardware-accurate XOR tiling and fast texture refresh paths in
victory-formatsandvictory-gpu.
2. CPU, Memory & PCIe Pipeline Optimizations (victory-gpu)
- 16 GB VRAM Card-Buffer Budgeting: Defaults
card_buffers_min_kbto1 MiBon 16 GB GPUs, cutting per-frame CPU snapshot volume from >120 MB down to ~28 MB. - GPU-Only Readback Skipping & Relay Coalescing: Buffers
>= 8 MiBwithout recent CPU reads or writes skip redundantCARD_COMPAREand PCIe readbacks (~260 MB/frameskipped in city scenes, cutting PCIe fetch traffic by >55%), whilerelay_workercoalesces back-to-back flights when no thread is waiting. - Lock-Free Descriptor Heap Sync (
descriptor::sync_heaps): Adds a lock-freeplaced_slotsbitset, atomic due-time fast paths, and hierarchical 4 KiB SIMDmemcmpscanning across descriptor heaps. - Submission Thread (
Host::submit/watch.rs) Overhaul:- Atomic
KEPTfast path and merged interval binary search (O(log N)) inwatch.rsto eliminate linear scans and redundantGetWriteWatchsyscalls on guarded ranges. - Single-pass
Batch::refresh_frontwith Largest-Processing-Time (LPT) worker scheduling andStep::GpuWritededuplication. - Batched per-list locking in
card_stepsand single-pass run classification insend::take. - Exact
1×per-frame stage telemetry (submit stages,refresh_and_steps breakdown, andsubmit outer).
- Atomic
3. Dynamic AMD FidelityFX SDK 2.4.0 Bridge
- Dynamically loads user-supplied signed PC binaries (
amd_fidelityfx_loader_dx12.dll/amd_fidelityfx_upscaler_dx12.dll) viaVICTORY_FIDELITYFX_DIRor[paths].fidelityfx_dirwith full graceful fallback when absent. - Supports querying and selecting runtime upscaler versions (
4.1.2,3.1.6,2.3.4). - Disabled by default in
Host::present(opt-in viaVICTORY_FSR=1) while native HLE interception ofamd_fidelityfx_loader_xbox.dllis implemented to avoid duplicate post-present scaling.
Workspace Layout
apps/victory— CLI entry point (run,inspect) and runtime configuration wiring.crates/victory-core— Configuration parser (victory.toml+ environment overrides) and shared utilities.crates/victory-formats— Scarlett texture formats, swizzle/deswizzle routines, and binary parsers.crates/victory-gpu— D3D12.X-to-D3D12 command translation, shadow memory coherence, descriptor heaps, write-watch tracking, and FidelityFX DX12 bridge.crates/victory-hle— High-level Xbox OS, DirectStorage, and title DLL module bindings.
Building & Running
Prerequisites
- Windows 10/11 (x86_64) with a DirectX 12 Feature Level 12_2 GPU
- Rust toolchain (stable, MSVC target)
Build & Verify
cargo test --offline -p victory-core
cargo test --offline -p victory-formats
cargo test --offline -p victory-gpu
cargo clippy --offline --workspace --all-targets -- -D warnings
cargo build --offline --release
Configuration
Copy victory.example.toml to victory.toml (git-ignored) and set your local paths. Key runtime environment variables:
| Variable | Default | Description |
|---|---|---|
VICTORY_CARD_BUFFERS_MIN_MB |
1 (on 16 GB GPUs) |
Minimum buffer size kept resident in VRAM |
VICTORY_GPU_ONLY_MB |
8 |
Minimum size for GPU-only readback skipping (0 disables) |
VICTORY_RELAY_COALESCE_US |
1500 |
Flight coalescing window in microseconds (0 disables) |
VICTORY_TEXTURE_STORE |
0 |
Enables persistent texture store caching (1 enables) |
VICTORY_FRAME_INTERVAL_MS |
16.667 |
Target frame pacing interval in ms |
VICTORY_FIDELITYFX_DIR |
(unset) | Path to local AMD FidelityFX SDK 2.4.0 signed DX12 DLLs |
VICTORY_FSR |
0 |
Opt-in toggle (1) for the Present-stage FidelityFX bridge |
Launch Example
.\target\release\victory.exe run "<path-to-your-title-executable>" --execute
Current Blockers & Roadmap
- CPU Submission Bottleneck (
victory-queue-behind): Further reducingrefresh_and_stepsand copy/shadow synchronization overhead to push city frame times below50–65 ms(15–20+ FPS). - HLE Interception of
amd_fidelityfx_loader_xbox.dll: Intercepting the 5 exported FFX API entry points (ffxCreateContext,ffxDestroyContext,ffxConfigure,ffxQuery,ffxDispatch) directly invictory-hleto feed real pre-HUD color, depth, motion vectors, and jitter to the native PC FidelityFX runtime (3.1.6/4.1.2) and control internal render resolution viaffxQuery. - Long-Term Frame Pacing: Smoothing frame delivery once CPU submit times drop below the GPU frame budget.
License & Disclaimer
Unofficial, independent compatibility research project. Not affiliated with, endorsed by, or connected to Microsoft, AMD, Rockstar Games, or Take-Two Interactive.