THIN_BAKE ported to a Linux/Proton build (#440 base): results + notes #362
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/readmet3xt-lab--foxhound#362
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Fedalv on GitHub · 2026-12-01 18:30 UTC · original
VIctory on Linux (Proton, RADV, RX 7900 XTX): findings as of 2026-12-01
Notes from running VIctory under Proton on one Linux PC, for anyone working on the Linux or AMD side.
One machine, so treat single-run numbers as hints. "Light" and "heavy" are phase medians of a fixed scripted
path from one save (light ≈ 1.4k draws, heavy 3–6k draws); same-build spread is about ±4 ms.
Setup
diagprofileVICTORY_OUTPUT=2560x1440,VICTORY_RENDER_SCALE=1.0)1. Launching from VS Code (or anything Electron/Chromium-based) kills the game silently
Symptom: the game exits without any error after a random amount of time, in about half of the runs
started from a VS Code terminal (or a tool running inside it). Runs started from a normal terminal are fine.
Cause: VS Code (and Chromium-based browsers) set
RLIMIT_RTTIMEhard = 0 for their children. The kernel'sCPU-timer check (
check_thread_timers) applies the RTTIME limit without checking for a realtime task, so0 >= 0→ SIGKILL (code=SI_KERNEL) the first time any CPU-time timer fires on one of the game's threads.A child process cannot raise a hard limit.
Check:
grep 'realtime timeout' /proc/$(pgrep -x main)/limits:0means the game will die.Fix: start the game outside that process tree.
systemd-run --user --scopedoes not help (a scope keepsthe caller's limits). A
systemd-run --userservice starts from the user manager's limits:After the switch: 0 early exits in 12+ runs (was about 1 in 2).
2. PR #53 frame generation under Proton: real frames about 2x slower
PR #53 (host FidelityFX upscaler + FSR 3.1 frame generation) merged onto the build above with 3 small conflicts
(none in the FG code). FidelityFX SDK v2.4.0
Kits/FidelityFX/signedbinDLLs. Settings:VICTORY_UPSCALER=7 VICTORY_FFX_SCALE=1.0 VICTORY_FIDELITYFX_FRAMEGEN=1 VKD3D_DISABLE_EXTENSIONS=VK_EXT_present_timing(the last one avoids a white screen under Proton).
swap chain's Present waits for the previous frame's interpolation, and VIctory's submit path is serial, so
that wait lands on the critical path. Shown fps ≈ 2 × 16.5 ≈ the same as without FG, with more latency.
3. THIN bake-draw race (foxhound's
VICTORY_THIN_BAKE), ported to the build abovereadmet3xt-lab/foxhound found that with
VICTORY_THIN=1(scripts/play.ps1's default) lists are translatedlater and several at a time, so a list recorded after a decoration/ped bake draw can take a texture slot
before the bake's upload runs, and the bake samples a texture that was never uploaded ("blocks of coloured
noise baked into clothes for the whole scene"). Their fix translates lists that bind a bake pipeline at the
title's call (
VICTORY_THIN_BAKE=2), with a wider bake list (7 pixel shaders + 2 geometry stages089d6271be6650ef,d4111a6e6ea49d91) and a structural bake check (no depth, ≥ 4 square targets ≥ 512).Ported on top of #440 + PR #53 (keeps #53's
for_externalwake-up in the worker loop). Results so far:in a single frame for other lists to catch up (a hitch at scene loads).
this proves nothing yet; 5+ runs per arm needed.
VICTORY_THIN=0vs=1(one run each, without the port): light 35.8 vs 32.3, heavy 54.2 vs 59.2, both clean.4. Texture corruption: what is known
Seen in about half of all runs on every build before the launch fix, about 1 in 12 after: rainbow/flat
blocks, porcelain skin, wrong texture on a shirt, black bottle label, dark dot-mesh face. Always the same
assets (a face behind sunglasses ~frame 2400, a face ~4096, a floral shirt 4800–6000), so likely a
per-texture upload/order race.
ending batched runs at image stores.
so that one is a separate bug. foxhound fixed a wave32 transmission-prefilter drop (
2da4beb386509b77)that gave black squares on transmissive eye shaders; may be related.
5. Settings measured on this PC (RADV)
Helps (all kept):
VICTORY_PORT_CONSTANTS_ORDER_BATCH=1(#438)RADV_EXPERIMENTAL=transfer_queue(SDMA)VICTORY_CARD_STEPS=2=0costs +60 msVICTORY_LAND_THREADS=4,VICTORY_PORT_CBV=1,VICTORY_TEXTURE_MAX=0VICTORY_SINGLE_LATCH=0VICTORY_CARD_STEPS_LEARN=0Hurts here:
VKD3D_CONFIG=single_queue(5x slower),-LowMemoryset (PORT_ALL/INPLACE/WINDOW_KB/RESIDENCY,2.5x), placed heap in VRAM (252 ms) or write-combined (+7),
CARD_BUFFERS_MIN_MB=1(+5), renderer port 5 off (+8).Needed for a correct picture:
VICTORY_LAND_ECHOon (=0→ faces lose skin, so avoid-Safe), renderer port 2on (off → tree flicker),
VICTORY_FETCH_CHECK=1.6. Where the time goes (heavy scenes)
Serial chain ~44 ms/frame: title CPU ~16, landing/copy-back ~8, card copies 3.5 + 2.2, submit ~4, wake 1.7.
The submitting thread is saturated (~55 ms of work per frame); the GPU itself is ~6 ms busy. Heavy scenes add
15–30 ms of card waits from 2,500–3,000 lone in-place clamps per frame (see #438).
7. Proton gotchas
PROTON_VERB=runinprefix, which then needsWINEDLLOVERRIDES="d3d12,d3d12core,dxgi,d3dcompiler_47=n"(otherwise Wine's own dxgi drives the swap chainthrough Wine's vkd3d and the title dies in libvkd3d-1.dll at the first frame).
VKD3D_SHADER_CACHE_PATHis set.DXVK_FILTER_DEVICE_NAME=7900 VKD3D_FILTER_DEVICE_NAME=7900.desktop down and left the NTFS game drive dirty (
ntfsfix -dto mount it again). Checkjournalctl -k | grep -iE 'page fault|ring .* timeout|GPU reset'after runs.@kwaadrat on GitHub · 2026-12-01 23:43 UTC · original
Re: section 7 (
d3dcompiler_47 lacks cs_5_1): PRs #388, #409, and #411 convert the internalvictory-gpushaders (CARD_COMPARE/CARD_COMPARE_BATCH, Series SComposer, andindirectargument clamps) tosm_5_0with explicitD3D12SerializeVersionedRootSignaturein Rust, so they now compile out-of-the-box with Wine/Proton's built-ind3dcompiler_47without needing a Win11d3dcompiler_47DLL override.Also, #412 makes
pipeline::makeskip entries fromwarm-bad.txtso live compilation after skippingwarmdoesn't wedge worker threads on known-hanging pipelines.@Anzymanz on GitHub · 2026-12-02 09:11 UTC · original
Written with Claude Code.
Some data on sections 2 and 4 from another Linux machine (RX 9070 XT, Mesa 26.3.1 RADV, GE-Proton, xmem-line tree, 1440p render, ray tracing off), in case it saves you time.
FG wait. We see the same thing: with FSR 3.1 FG 2X the render thread waits 18-40 ms a frame in Present, for the previous frame's composition. What we measured:
Section 4, textures that keep old bytes. Two ports cut it for us: telling the textures on the block and on the page's other views when a write fault opens a guarded block (Raptorbk45's
fbe18edc,VICTORY_GUARD_TELLS): "changed after its upload with nothing to tell of it" lines went from 27.2/21.8 to about 9 a second and the worst lateness from about 1,950 to 16 frames, picture-neutral otherwise. borntofrag34's issue #66 lists the related ports (ALIAS_WRITES, PARTIAL_WRITTEN, upload-ahead races) with file:line pointers.White eyes / glowing spots for a few frames. Not proven to be yours, but one cause we found: a 0.5-grey stand-in shown while a new texture uploads lights emissive and glass masks white for 1-3 frames (about half of new texture slots on our route). A stand-in of the slot's kind (black for masks and emission, a flat normal for normal maps) removed those flashes for us.