Tommie Hansen 3b73abe8be radv: reuse identical hidden GPU-only alias records
On the pinned Mesa keep path, an exact repeat of a hidden GPU-only alias leaves the CPU mapping and shown/dirty GPU trees untouched. Reuse its existing record only when address, extent, BO and offset match and no CPU or visible alias is involved. Keep the existing path for every other request.

MiniVI #328 motivated checking for redundant maps, but its shared Windows section mechanism is not used. Verified the pinned patch and the extracted exact-identity predicate. Driver build and hardware timing were unavailable.
2026-12-03 13:20:46 +01:00
2026-11-27 23:41:58 -03:00
2026-11-27 23:41:58 -03:00
2026-11-29 18:36:35 -03:00
2026-11-27 23:41:58 -03:00
2026-11-27 23:41:58 -03:00
2026-11-27 23:41:58 -03:00
2026-11-27 23:41:58 -03:00
2026-11-27 23:41:58 -03:00
2026-11-27 23:41:58 -03:00
2026-12-02 00:16:17 +03:00
2026-11-27 23:41:58 -03:00
2026-11-27 23:41:58 -03:00
2026-11-27 23:41:58 -03:00
2026-11-27 23:41:58 -03:00

VIctory xmem

VIctory on Linux with an AMD card. A patched RADV maps the title's memory straight into the GPU, the way the console shares it, so nothing is copied back and forth every frame.

This repository contains source code only. Use only a lawfully obtained copy of the game; the project does not help obtain it and does not support unlawfully obtained copies.

Status: VIctory xmem is maintained. A rewrite is being developed in a separate private repository.

Quick start

./setup.sh
./run.sh shaders
./run.sh play
  • The first run asks for your game folder and writes run.conf. You can instead set GAME=/path/to/your/dump in it.
  • The first play prepares every pipeline before the game opens: several minutes and roughly 6 GiB of cache (empirical). If interrupted, run play again to resume.
  • With VICTORY_WARM=0, the game opens at once and builds pipelines at first use: missing geometry and stutter at first, improving as the cache fills.

Requirements

Linux and an AMD GPU. setup.sh names missing tools and Mesas dependencies. The full tool and pkg-config lists are in docs/BUILD.md.

wine is required when Proton is not used. Proton is auto-detected unless USE_SYSTEM_WINE=1; PROTON= overrides the detection.

Build and update

setup.sh fetches and builds Mesa, vkd3d-proton, a patched Wine server (unless Proton is used), the Windows SDK and VIctory itself. ./setup.sh fsr4 is the optional FSR 4 step. build.sh builds the Windows target; update.sh merges the latest origin/main and rebuilds.

See docs/BUILD.md for versions, required packages and the single-step rebuild commands.

Running

Command Effect
./run.sh shaders Translates every shader in shaders.rpf into the shader cache
./run.sh warm Prepares pipelines
./run.sh play Runs the game, preparing pipelines first unless VICTORY_WARM=0

The launcher warns when GPU-accessible memory (GTT) is below 10240 MiB. KEEP_FREE leaves 8192 MiB of RAM to the system by default, or 2048 MiB on hosts with 18 GiB or less. Below 12288 MiB available for the game, it may swap and stutter. A systemd-inhibit sleep:idle lock is held while the game runs.

Configuration

Put settings in run.conf, or after the mode:

./run.sh play VICTORY_PRESET=medium

VICTORY_* variables set before ./run.sh are cleared. Put them after the mode instead.

Precedence, from lowest to highest:

  1. Preset files
  2. run.conf
  3. NAME=value arguments after the mode

F1 opens the in-game menu. It is on by default; VICTORY_MENU=0 disables it. The menu edits run.conf directly, keeps comments and unknown lines, and saves at once. Changes apply at the next start, except VICTORY_PANEL, which applies immediately. Choosing a preset writes its name and clears explicit overrides for the settings it owns; preset values are not copied into the file. An existing local/menu.conf is migrated once, with a backup at local/run.conf.before-menu.

Settings without an explicit choices list only cycle 0|1 in the menu, including numeric ones. Edit run.conf for other values.

Common settings

Setting Default Effect
CONSOLE series-x series-x or series-s
VICTORY_PRESET unset potato, low, medium, high, ultra
VICTORY_OUTPUT 2560x1440 Output size; with FSR 4, 3840x2160 unless set
VICTORY_FULLSCREEN unset 1: borderless fullscreen
VICTORY_FRAME_INTERVAL_MS unset 16.667 is 60 fps, 33.333 is 30 fps, 0 is no wait
VICTORY_FSR_4K unset FSR 4 to the output size; requires CONSOLE=series-x and ./setup.sh fsr4
VICTORY_FIDELITYFX_FRAMEGEN unset AMD frame generation over FSR 4
VICTORY_BVH_BUILDER 1 0: no ray tracing
VICTORY_CARD_PULL unset 0: CPU reads GPU memory; 1: GPU copies; unset auto
VICTORY_PANEL full full, compact, fps, off; F3 hides, Shift+F3 steps
VICTORY_LOG info info, warn, error, off
VICTORY_KBM_PC unset 1: PC-style keyboard and mouse
VICTORY_DUALSENSE unset 1: DualSense light bar, triggers and haptics
VICTORY_DUALSHOCK unset 1: DualShock 4 light bar only
VICTORY_WARM unset 0: no pipeline preparation
KEEP_FREE 8192 MiB of RAM left to the system; 2048 on hosts with 18 GiB or less

The full reference, including ranges, defaults and diagnostics-only switches, is in docs/SETTINGS.md. run.conf.default is the source for the menu and descriptions.

Presets

Preset files are in presets/. Select one with VICTORY_PRESET or in the F1 menu. Individual settings override it. Presets do not set the output resolution.

Preset Intended hardware Ray tracing FSR 4
potato 8 GB cards, slow CPUs off performance
low 8-12 GB cards off performance
medium 12-16 GB cards off balanced
high 16 GB cards off quality
ultra 16 GB+ cards on quality

Every preset sets VICTORY_FSR_4K, which requires CONSOLE=series-x and ./setup.sh fsr4. Exact values are in the preset files.

Measured on a 16 GB AMD GPU, 8-core AMD CPU, 32 GB RAM at 1080p, runs of 3-5 minutes (empirical):

Preset Avg FPS Median Min 5 s
potato 45.0 45.0 15.7
low 39.5 40.9 23.2
medium 35.8 36.1 14.9
high 34.8 34.8 21.2
ultra 28.5 27.4 15.8

The route and sample count varied. "Min 5 s" is the worst 5-second window, not a per-frame 1% low.

Controls

A controller works, as does the keyboard while the window has focus.

Keys Controller
W/A/S/D, I/J/K/L Left stick, right stick
Arrows D-pad
Enter, Backspace, X, Y A, B, X, Y
Q/E, Z/C Shoulders, triggers
F/H Stick clicks
Esc, Tab Menu, View

VICTORY_KBM_PC=1 adds a PC-style keyboard and mouse layout. The full layout, mouse-lock keys, DualSense/DualShock details and controller settings are in docs/CONTROLS.md.

Benchmark

./run.sh play VICTORY_BENCH=rt
./run.sh play VICTORY_BENCH=nort

rt runs with ray tracing on, nort with it off. VICTORY_BENCH_MINUTES sets the length: 1 to 240, default 5. The run uses Series X, FSR 4 Quality to 3840x2160, no frame generation, intro skipped and the full panel.

Enter (and the first controller's A) is pressed once a second from 5 to 65 seconds. The game closes after the requested time. For runs of 2 minutes or more, stats leave out the first 60 seconds.

screenshot.png, bench_stats.txt and bench_results.txt are saved under local/benchmark/<date>-rt|nort/. Reported figures are average, slowest and quickest whole second, 1% low, peak video memory and working set; no frame-time log is made. The game restarts with your settings; a crash also writes results and restarts. Uploading to the PortWatch form is manual.

Diagnostics and development

Build the diagnostics profile with PROFILE=diag ./build.sh. Page sampling, RT timestamps, capture/replay, shader optimization switches and the Xbox frame comparison are documented in docs/DIAGNOSTICS.md.

tools/session-fps.sh [log] [min-draws] summarizes in-world stats: frame samples.

Troubleshooting: Wine crashes and freezes

A crash in ntdll.dll (RtlWakeAddressSingle, a read near null) or a random freeze, minutes or hours in, points to a known Wine wait-on-address race. It is fixed by Wine commit 81e52628b (2026-10-14). tools/wake-race.sh tests whether your Wine or Proton has the fix.

Patches

Changes to Mesa, vkd3d-proton and Wine are in patches/. Edit under deps/<name>, rebuild with ./setup.sh <name>, and save with tools/patch.sh <name>.

Repacks and third-party distributions

This project does not collaborate with, endorse or support repacks that include proprietary code, assets, keys or cracks. Such a package is not this project, and problems it causes are out of scope. Do not ask for, link to or distribute them.

If you share a build, share this repository's source only and let each user supply their own copy. Do not put proprietary files in a release archive.

Credits

VIctory by Marvisak and contributors, through avatarmanz, fxceless, DexNom, Belobug, FQY55kai, myokex, triippywhale, trustno1-coder, PastiiJay, Geckomacabre, cxy0072019-sketch and gassy.

License

GPL-3.0-or-later. See LICENSE.

Description
No description provided
Readme GPL-3.0 47 MiB
Languages
Rust 99.3%
Shell 0.6%