Read-only copy of github.com/Xayia/VIctory-xmem-cadyx · Patched RADV + Smart Barriers
  • Rust 99.8%
  • Shell 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-12-01 13:18:34 +01:00
.cargo
.githooks
apps/victory
config
crates
patches
scripts
tests/fixtures/hle-probe
tools
xtask
.gitattributes
.gitignore
.victory-root
build.sh
Cargo.lock
Cargo.toml
env.sh
LICENSE
README.md local: update README for VIctory-xmem-cadyx fork, features, hardware & settings 2026-12-01 13:18:34 +01:00
run.sh
rust-toolchain.toml
rustfmt.toml
setup.sh
victory.example.toml

VIctory-xmem-cadyx

Personal Linux + AMD fork of VIctory-xmem (based on VIctory). A patched Mesa/RADV driver maps the title's unified memory directly into the GPU without copying it back and forth every frame, extended here with native FSR 4.0.2 ML Frame Generation, fixed RDNA 4 hardware ray tracing, GFX1201 PM4 L2 barrier optimizations, visual bugfixes, and faster VRAM residency.

No game files are included. Bring your own dump.

What's New in This Fork

  • Native FSR 4.0.2 ML & FSR 3.1.6 Frame Generation — Built-in FidelityFX Frame Generation (VICTORY_FIDELITYFX_FRAMEGEN=4|3|1) with HUD-less separation (VICTORY_FRAMEGEN_HUDLESS=1), ahead-of-time dispatch (VICTORY_FRAMEGEN_AHEAD=1), and +FG4.0.2 status badge in the HUD panel.
  • Hardware Ray Tracing on RDNA 4 (GFX1201) — Fixed canonical 64-bit BVH64 GPU VA reconstruction, 42-bit hardware node descriptors, NIR image-heap coherency in Mesa (nir_lower_memory_model.c), and targeted BVH write barriers so VICTORY_BVH_HARDWARE=1 renders cleanly.
  • Patched-RADV GFX1201 PM4 L2 Fast-Path & Smart Barriers — Deferred L2 writebacks (RADV_LAZY_L2_WRITEBACK) and expanded through_l2 access masks in radv_cmd_buffer.c, WAR read-to-write barrier elision and dirty-stage filtering (VICTORY_SMART_BARRIERS), adjacent barrier coalescing (VICTORY_JOIN_BARRIERS), and 512 in-flight command lists (VICTORY_LATE_MOST=512, eliminating 256 lists in the air stalls).
  • Honest RADV VRAM Budget & Fast Unified Memory Residency — Fixed RADV winsys VK_EXT_memory_budget reporting (allocated_vram_vis / allocated_gtt, restoring ~2.4 GiB of visible headroom on 16 GiB cards), expanded title paged VRAM budget (VICTORY_CARD_KEEP_MB=10240, ~6,064 MiB on 16 GiB GPUs), and faster cold-page reclamation and promotion (64 MiB / 200 ms).
  • Visual Fixes — Fixed black terrain 1D mesh dispatches (VICTORY_MESH_ONE_DIM), baked texture confetti (VICTORY_KEEP_GPU_WRITTEN), and optional pixel quad guard (VICTORY_QUAD_GUARD=1|2) for glass/lantern flashes.
  • Multi-Resolution FSR 4 & Scaled HUD — FSR 4 upscaling (quality, balanced, performance) works with any VICTORY_OUTPUT (720p–4K) with a scaled HUD interface plane.

Status & Tested Setup (2026-12-01)

Tested on: Ryzen 7 9800X3D, 32 GB RAM, AMD Radeon RX 9070 XT 16 GB (RADV GFX1201), CachyOS Linux (kernel 7.3.6-3-cachyos), Proton-CachyOS SLR (ntsync).

  • 4K FSR 4.1.2 Quality (2560x1440 -> 3840x2160) + Hardware RT ON + Native FSR 4.0.2 ML Frame Generation (Series X profile, 45 s active 3D world look-around benchmark):
    • 22.65 median / 22.50 mean native render FPS (44.48 ms/frame), ~44 display FPS with ML Frame Generation, 0 errors.
    • CPU wait for GPU (gpu_wait_ms) cut from 15.86 ms to 3.21 ms median; CPU idle wait (stood_ms) reduced from 14.88 ms to 0.95 ms/frame; in-flight command list stalls reduced from 12.3 ms to 0.0 ms/frame; main render pool (Pool 15) VRAM residency nearly doubled from 880 MB to 1,625 MB (0 pages waiting).
  • Lower output resolutions (1080p / 1440p) or disabling Hardware RT (VICTORY_BVH_BUILDER=0) run at significantly higher native frame rates.

Quick Start

git clone https://github.com/Xayia/VIctory-xmem-cadyx.git
cd VIctory-xmem-cadyx
./setup.sh
./setup.sh fsr4   # optional: fetches PC FidelityFX DLLs for FSR 4 & ML Frame Gen
echo 'GAME=/path/to/your/dump' > run.conf
./run.sh shaders
./run.sh warm
./run.sh play

setup.sh fetches and builds patched Mesa/RADV, vkd3d-proton, a wineserver, the Windows SDK, and VIctory itself. Saves, caches, and logs stay in local/.

Running ./run.sh warm pre-builds all native pipelines on disk before playing (several minutes and ~6 GiB of cache; resumable if interrupted). Re-run ./run.sh warm whenever Mesa is rebuilt.

Settings

Settings can be placed in run.conf or passed on the command line after the mode (./run.sh play VAR=value ...):

Setting Effect
CONSOLE=series-s Series S profile (default: series-x)
PROTON=/path/to/proton Use a specific Proton directory instead of auto-detecting
USE_SYSTEM_WINE=1 Use system wine instead of Proton
VICTORY_OUTPUT=2560x1440 Output size: 1280x720, 1664x936, 1920x1080, 2560x1440, or 3840x2160 (2560x1440 default; 3840x2160 with FSR 4 unless set)
VICTORY_FULLSCREEN=1 Borderless full screen (VICTORY_FULLSCREEN_RES=WxH overrides size)
VICTORY_FSR_4K=quality FSR 4 upscaling (quality, balanced, performance) to VICTORY_OUTPUT after ./setup.sh fsr4
VICTORY_FIDELITYFX_FRAMEGEN=4 Native FidelityFX Frame Generation (4 = FSR 4.0.2 ML on RDNA 4, 3 = FSR 3.1.6, 1 = auto)
VICTORY_FRAMEGEN_HUDLESS=1 Keep HUD out of generated frames (VICTORY_FRAMEGEN_AHEAD=1, MLFG_UPGRADE=1 recommended with =4)
VICTORY_BVH_BUILDER=0 Disable ray tracing
VICTORY_BVH_HARDWARE=0 Ray tracing without the GPU's hardware BVH64 node test (default: enabled)
VICTORY_CARD_KEEP_MB=10240 Host VRAM reserve in MiB (4096..=16384, default 10240 -> ~6 GiB paged title VRAM on 16 GiB GPUs)
VICTORY_PAGE_PASS_MS=200 Unified-memory page residency pass interval in ms (200..=5000, default 200)
VICTORY_PAGE_MOVE_MB=64 Page migration budget per pass in MiB (1..=1024, default 64)
VICTORY_LATE_MOST=512 Max in-flight host command lists before settling (64..=2048, default 512)
VICTORY_SMART_BARRIERS=0 Disable WAR/stage-aware barrier filtering (default: enabled)
VICTORY_JOIN_BARRIERS=0 Disable adjacent barrier coalescing (default: enabled)
RADV_LAZY_L2_WRITEBACK=0 Disable patched RADV GFX1201 lazy L2 writeback fast-path (default: enabled)
VICTORY_QUAD_GUARD=1 Optional pixel quad guard (1 = DPP, 2 = DPP+Swizzle) for glass/lantern flashes
VICTORY_POOL_MOVE=1 Optional texture pool defragmentation (off by default; adds copy overhead during gameplay)
VICTORY_PAGES=0 Disable unified-memory page migration (title memory stays where allocated)
VICTORY_SKIP_BINK=1 Skip intro Bink movies (all also skips looping menu backgrounds)
MUTE=1 Mute audio

Patches

patches/ holds the changes applied to Mesa, vkd3d-proton, and Wine (<name>.<submodule>.patch for submodules). Edit inside deps/<name>, rebuild with ./setup.sh <name>, and regenerate patches with tools/patch.sh <name>.

Credits

Forked from VIctory-xmem by lobomfz. Built upon VIctory by Marvisak and contributors, including avatarmanz, fxceless, DexNom, Belobug, FQY55kai, myokex, triippywhale, trustno1-coder, PastiiJay, Geckomacabre, and cxy0072019-sketch.

License

GPL-3.0-or-later. See LICENSE.