Repository navigation
Linux: run under Proton, and fix the world GPU faults - #994
Slaktarn700 wants to merge 15 commits into
Conversation
Under Wine, D3DCompile is vkd3d-shader's HLSL compiler, which has no
RWByteAddressBuffer methods ("Method 'Load' is not defined") and does not
embed a [RootSignature] in the blob. The clamp did not build, so every
indirect execution was dropped under Proton.
The clamp now uses structured buffers of words (a root UAV takes either)
and its root signature is built in code. Same behaviour on Windows. A new
GPU test checks the clamped values, also with descriptor heaps bound.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The windows crate passes a dangling non-null pointer for an empty slice; vkd3d-proton rejects that with E_INVALIDARG, so under Proton there was no host pipeline library and pipelines were never kept on disk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wine's ws2_32 exports neither; a title calling them panicked in the host! lookup and aborted. The overrides now fail the call (WSAEOPNOTSUPP, or the name is not found), and the export test skips them where they are missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vkd3d-proton does not check DXIL container hashes, so pipelines with a zero or wrong digest are accepted there; the rest of the test still runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every s_endpgm (and the loop-limit abort) now branches to one shared ret
block, as DXC's output always has. A loop left by both a break and a
return could not be structured by dxil-spirv (vkd3d-proton): it emitted
invalid SPIR-V ("exits the loop ... but not via a structured exit"),
on which RADV segfaulted in vkCreateGraphicsPipelines (exit code 3).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grand Theft Auto VI places its descriptor heaps in its own memory and
copies whole slots there itself; no create or copy call reports those
writes, so the host slot kept what it was mirrored from before. Slots a
shader reads directly by index (not through a table) are only made from
what was mirrored: in the world a mesh shader read a slot as a constant
buffer while the host slot still held a texture view, whose upper half
it took for a buffer at address 0 (a GPU page fault and a lost device;
likely the "world's low-address page faults" noted at null_view).
Before each submission, the 64 KiB blocks of every shader-visible heap
written since the last one (watch::writes) are mirrored again; mirror()
skips slots whose record did not change.
Found with umr wave dumps under Proton (RX 9070 XT): the faulting waves
held s[8:11] = {0, 0x00400000, 0x00248000, 0}, the second half of an image
descriptor, loaded from heap slot ~1,061,522. Before, the world lost the
device after 5-90 s; with this, 90 s, then a different fault (next commit).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A root SRV is a raw address the GPU reads without bounds. The console's reads past the title buffer land in other title memory; ours past its host copy land in unmapped memory: in the world a compute shader read 32 MB past a root SRV's copy (umr: TCP fault at s[10:11] + 0x1f0e000) and the device was lost. Root SRVs (ByteAddressBuffer t<slot> in ROOT_CBV_SPACE) are now a table of one raw view sized to the rest of the host copy, in a dynamic slot of the bound view heap, reused within a list for the same address. Reads past the copy return zeros. The shaders' bindings do not change. With this and the previous commit, the world runs without a device loss for as long as tested (8 minutes, twice, under Proton). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wine emulates write watching page by page under one lock (about 1 ms an asking), and the world's copies ask about the same big buffers dozens of times per submission: 3,500 askings and 17 GB checked per frame, 3 s of a frame. Under Wine, a range the kernel already answered for in this submission is now answered from the journal; a write in between keeps its dirty bit and shows in the next submission. Windows is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VIctory builds on Linux with cargo-xwin and runs under Proton Experimental, getting as far as on Windows (tested: CachyOS, RX 9070 XT, Mesa 26.3.1). docs/linux-proton.md covers building, running, tests and the known differences; scripts/proton-run.sh runs victory.exe (and serves as cargo's test runner) with Proton's Wine, vkd3d-proton and DXVK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ission Under Wine each GetWriteWatch takes about 1 ms in the world (contention on Wine's virtual-memory lock with the title's write faults), not the size of the range: 70 us for 256 MB in isolation, 180 us per asking in the world, 190,000 askings in 3 minutes. VirtualQuery takes the same lock. Under Wine now: - the first asking in a submission asks about the whole title allocation (up to 4 GiB), so the other buffers in it are answered from the journal; - allocations are found from a cache by address, VirtualQuery only on a miss (a long region walk is capped and remembered as far as it went); - views of physical pages go straight to their guards (no failed GetWriteWatch first, no second VirtualQuery in guard()). Profiled on an RX 9070 XT: kernel time in watch::writes went from 34 s to about 8 s over the same 4-minute run. Windows is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VICTORY_SHOW_TARGET=<w>x<h>-f<format>[-<n>] presents, each frame, the n-th texture of that size and format the frame renders to or writes (first-use order, names as in VICTORY_DUMP_TARGETS files) instead of the title's frame. While the world's final image is still dark, its G-buffer shows the geometry: 2560x1440-f28-3 on a Series X profile showed the first mission's street (poles, wires, bollards, roofs) and let a player walk it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
victory_shader::emit::debug_ps(n) is a DXIL pixel shader of our own: it reads SV_Position only, colours each pixel by its surface's slope (from the screen-space derivatives of depth) and writes n colour targets. It needs nothing of the title's, so a draw's geometry shows whether or not its pixel shader translates. - VICTORY_DEBUG_PS=1 (diagnostics view): pipelines that draw depth-tested geometry use it instead of the title's pixel shader; flat layers (interface, full-screen passes) keep theirs, so menus stay usable. - Fallback: a geometry pipeline whose pixel shader does not translate, or that the host refuses, is made with the debug shader instead of having its draws dropped; in the debug view, one the host refuses with ours is made with the title's. VICTORY_PS_FALLBACK=0 turns the fallback off. With the debug view on, the world drew 3,600-4,100 draws per frame instead of about 1,700. A test makes a pipeline from the debug shader and a stand-in vertex shader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The title's threads wait up to 500 ms per frame for pipelines being made before draws are dropped. VICTORY_PIPELINE_WAIT_MS changes that budget (0: never wait; pipelines then appear a few frames later and one-off passes may be lost). The default is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From RDNA2/RDNA3/RDNA 3.5 reports on Marvisak#844: what a system Wine needs instead of Proton (vkd3d-proton 3.2+, DXVK's dxgi.dll, no Microsoft d3dcompiler_47 any more), and VICTORY_SHOW_TARGET, VICTORY_DEBUG_PS, VICTORY_PS_FALLBACK and VICTORY_PIPELINE_WAIT_MS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
We checked the heap-mirroring change separately on an RTX 4090 under Wine/vkd3d-proton 3.2. After a direct CPU copy of an SRV record into a title-owned heap, the next guest queue submission changed the mirrored slot from texture A to B. Another copy and submission on the same watched page changed it back to A. Without the sweep the first submission after the copy kept A. This fixture checks resource identity at submission. It does not sample pixels or exercise a copied CBV. One ordering detail in 6f732b6: the guest queue calls |
The guest queue started a new watch submission and refreshed heap slots the title wrote before `Host::execute` took the submission mutex. A second queue caller could then rewrite a host heap while the first caller's GPU work, already submitted and being waited on, still read it. `Host::execute_title` now takes the lock first, then starts the watch submission and refreshes the heaps, then prepares and runs the lists. Internal submissions (indirect clamp, captures, copy-backs) keep using `execute`, which doesn't refresh. Reported by MichaelSmithAI in Marvisak#994. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@MichaelSmithAI thanks for the A → B → A check on the 4090, and for the ordering catch. You're right: Fixed in 993dff8. The guest queue now calls Clippy is clean, with and without AI-assisted (Claude Code). |
…target A G-buffer is several targets of one size and format, so the last one bound is rarely the one worth seeing. An optional -<n> suffix selects the n-th distinct match of the frame in first-use order; upstream needed 2560x1440-f28-3 to see the first mission's street while the lit image was dark. Idea from upstream PR Marvisak#994 (9823139). Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
… compute work Adapt XCL's first-use compute scheduling to VIctory's native workers and frame budget. Track root-selected buffer views through branches and sample the title's indirect arguments. Include the opt-in slope diagnostic from Slaktarn700's VIctory PR Marvisak#994.
|
Independent Windows check at I also tested the title in an offline Windows guest with vGPU disabled (WARP 10.0.26100.9818). These runs used local logging and capture instrumentation. In one Series X run the display selector found RTX 5090 D v2, Windows 11, driver 617.42. I ran the Series X profile in an offline vGPU guest on this PR head, with the 262,144-slot reserve from #747 and local capture instrumentation. At world offsets +1, +2 and +8 the debug view showed geometry. At +8 I could make out overhead lines, building fronts and the street while the title's original surface still showed the opening location card. At offsets +0, +1, +2 and +8 the captured presentation source matched the independent intermediate readback pixel-for-pixel (921,600 RGB pixels per pair after capture downsampling; +0 was black). At +16 the selector had no match and fell back to the original, nearly black frame. I stopped there by design; character input and long-run stability were not tested. An earlier instrumented run returned On the same machine I also traced 507,328 consecutive out-of-range warnings at startup to the write-watch re-sync scanning beyond the mirrored part of the title heap. Clipping just that scan to the mirrored capacity reduced this warning count to zero. Time to the second saved frame went from 156.28 s to 8.73 s with a fresh profile each time and diagnostic logs written through a mapped folder. Five descriptor tests passed. Small patch against this PR head and regression test. Codex assisted with the fixture, the local runs and this report. |
|
Verified on Windows 10 + NVIDIA (the platform pair this PR's fixes had not been tested on): the world runs and its geometry renders through the debug views; the final image is dark as documented, and a device removal still comes after ~3 minutes. Setup: Windows 10 21H2 19044.7846, RTX 3080 10 GB, driver 621.24 (32.0.16.2124), Ryzen 9 7900X, 32 GB. Build:
Also measured on this build: 135 compute pipelines refused (wave64 on the 32-lane host – #233 not stacked), 480 shaders untranslated, and with the #747 constant zero "no dynamic slots" drops but 507k "title slot past the host heap" writes (details on #747). The two world-fault fixes ( Logs kept locally ( AI use: Qwen Code (underlying model name not disclosed by the tool) built the stack, ran the title, extracted the counts and drafted this comment at the user's request; the user confirmed the visible geometry and character control by hand. |
Adapt the VICTORY_SHOW_TARGET experiment by slaktarn from Marvisak#994 (9823139) to the multi-plane Windows presenter. Keep submission order, overlays and normal presentation when the selected buffer is absent.
Adapt the debug pixel shader by slaktarn from Marvisak#994 (45e24f9). Preserve vertex, mesh and geometry stages, cache debug shaders by render-target count, and use the regular pipeline if the diagnostic pipeline cannot be made.
|
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 993dff8: Tested with AI assistance (Claude). |
Adapt slaktarn commits 6f732b6 and 993dff8 from Marvisak#994. Scan changed title heap pages inside the existing host submission lock and write-watch sweep, and exercise a raw descriptor copy and clear through real submissions. Co-authored-by: slaktarn <S700@bananamix.se>
|
THANKS! |
|
Automated triage for the maintainers. Closing because it is outside the project's scope (VIctory targets Windows hosts; ports, launchers and tooling for other platforms are not being taken). A Linux/Proton port in one PR: 14 commits over 17 files in gpu, hle and shader crates, a 118-line doc and a run script. Out of scope as it stands and built on code main replaced; its net.rs change does not loosen the guard. The small Wine fixes exist as single PRs (#347, clean #178, #217, #1279). If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
A section above upstream's README, which stays below it unchanged: the fork runs the title on Linux under Proton and vkd3d-proton (upstream closed the Linux PR Marvisak#994 as out of scope), its status on the one test machine, which branch holds what, every commit on linux/fx-next beyond fxceless/victory-fork main sorted by origin (upstream PRs, other forks, written here), how to build and run, and credits. Tested: branch names checked against origin; the 39 commits on origin/linux/fx-next beyond fxceless/main classified from their authors and -x lines; upstream and fxceless PR numbers, authors and the Marvisak#994 closing comment checked with gh; linked files exist on the branches named in their URLs; upstream's README text below is byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A section above upstream's README, which stays below it unchanged: the fork runs the title on Linux under Proton and vkd3d-proton (upstream closed the Linux PR Marvisak#994 as out of scope), its status on the one test machine, which branch holds what, every commit on linux/fx-next beyond fxceless/victory-fork main sorted by origin (upstream PRs, other forks, written here), how to build and run, and credits. Tested: branch names checked against origin; the 39 commits on origin/linux/fx-next beyond fxceless/main classified from their authors and -x lines; upstream and fxceless PR numbers, authors and the Marvisak#994 closing comment checked with gh; linked files exist on the branches named in their URLs; upstream's README text below is byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (fxceless Marvisak#994, 11b29e9) Its traced passes (shadows, occlusion, the irradiance cache) walked whatever bytes lay where the structures would be: dark tiles on hair and faces, lit squares in shadow, another picture at each launch. A node test now answers no hit, without reading, until the structure builder runs whole. VICTORY_BVH_NO_HIT=0: as before. By PiloteCode. This tree's numbers for the host's words are kept. Its tests pass here (WARP and the RTX 5080). Not run with the title. AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ructure builder behind VICTORY_BVH_BUILDER) into fork-main
…grams and ray-tracing builder (Marvisak#854, Marvisak#993, Marvisak#994), with Marvisak#911, Marvisak#213 and Marvisak#464
…=1, off by default); VICTORY_WAVE_WIDE=last (fork PR Marvisak#1141) The structure builder does not run unless asked for, and the title's ray-traced passes run all the same: every node test then reads whatever bytes lie where a structure would be, in a walk bounded at 65,535 steps a wave. With VICTORY_BVH_NO_HIT=1 (and not VICTORY_BVH_BUILDER=1) a box node enters no child and any other node is missed: every ray leaves at its first test, the answer is the same in every run, and the program asks the host for neither the directory of title memory nor the list of missing pages (unit test). The idea is fork PR Marvisak#994's, done here at translation instead of by a host word. Also fork PR Marvisak#1141 as it is (VICTORY_WAVE_WIDE=last: the barrier form only for programs every other form leaves at 64 lanes; opt-in), and the comment on the wide loads corrected (not the same result on the card: run 277). A TRANSLATOR EDIT: an exe from here on has a new shader fingerprint; wipe the DXIL cache and the pipeline library before its first launch. Not run in a game. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…=1, off by default); VICTORY_WAVE_WIDE=last (fork PR Marvisak#1141) The structure builder does not run unless asked for, and the title's ray-traced passes run all the same: every node test then reads whatever bytes lie where a structure would be, in a walk bounded at 65,535 steps a wave. With VICTORY_BVH_NO_HIT=1 (and not VICTORY_BVH_BUILDER=1) a box node enters no child and any other node is missed: every ray leaves at its first test, the answer is the same in every run, and the program asks the host for neither the directory of title memory nor the list of missing pages (unit test). The idea is fork PR Marvisak#994's, done here at translation instead of by a host word. Also fork PR Marvisak#1141 as it is (VICTORY_WAVE_WIDE=last: the barrier form only for programs every other form leaves at 64 lanes; opt-in), and the comment on the wide loads corrected (not the same result on the card: run 277). A TRANSLATOR EDIT: an exe from here on has a new shader fingerprint; wipe the DXIL cache and the pipeline library before its first launch. Not run in a game. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit 96ff135)
DispatchX(x, y, z, flags) with bit 5 of the console's dispatch initiator (USE_THREAD_DIMENSIONS, 0x20; 0x8020 for 32-lane programs) gives thread counts, not group counts. The flags were dropped and the counts run as groups: the ray-tracing structure builder, which dispatches this way, ran up to 64 times over and its box stages wrote empty nodes past their structures into the title's own objects (2.2 GiB in one frame of a failed run). That is the likely cause of the fault seconds after the first 3D frame with VICTORY_BVH_BUILDER=1. The host now runs ceil(threads / numthreads) groups per axis, from the console program's group size (Translated::threads). A partial last group runs whole: cutting its extra threads needs the thread count in the translated program, which victory-shader has no place for yet. The first such dispatch and every partial one are logged, and the frame line counts them. Sources: fxceless/victory-fork PR Marvisak#646 (mynzjerko; the conversion and its test) and PR Marvisak#994 (PiloteCode), DexNom/VIctory bc3cd4b and PR Marvisak#35, uiliannn/VItoriaBr 633ba6e, all GPL-3.0 forks of VIctory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… it by address The structure builder writes the records its stages read into list upload memory (the newer lists' method at 0x4a0) and hands the stages their addresses; its header stage reads its 40-byte records by address. Our upload memory was blocks of the process heap, which lie wherever the heap puts them: at 1.5 to 1.8 TiB in the source's runs, beyond the console's 40 bits and the directory of title memory by address (below 128 GiB). The records then read as zeros, the stage stored its headers at address 0 (dropped), and no structure got a header. With VICTORY_BVH_BUILDER=1 (or VICTORY_UPLOAD_CHUNKS=1; =0 never) upload memory is carved from 4 MiB chunks of one 512 MiB write-watched reservation between 4 GiB and 128 GiB: each chunk is one window of memory outside buffers, refreshed by write watching like the title's memory, and none of it is on the process heap. A chunk goes back to the free ones when the list that holds it is reset or its submission has run; requests over 4 MiB, or when every chunk is held, still come from the heap. Source: ka1qux/BRVIctory-ka1qux 6d877612a (after fxceless/victory-fork PR Marvisak#994, PiloteCode), the upload-memory part with its test. Its other parts (naming addresses inside upload blocks, refreshing only named copies, the builder's sizes copied on the card) are not taken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
NVIDIA data point for this branch: RTX 4070 Ti (Ada), Arch Linux, What NVIDIA needed on top of
Frames are about 2 to 3 s, and about half the draws still wait for pipelines on early runs. I also hit the empty-pipeline-library E_INVALIDARG independently before finding AI-assisted. No game data attached. |
…sses The title builds and refits its dynamic ray-tracing structures, and the top of the tree above the static world's pre-built ones, with its own builder programs every frame. victory-gpu runs those only with VICTORY_BVH_BUILDER=1; without it the structures hold whatever their memory held before, and a walk through them read garbage: dark tiles on hair and faces, bright squares in shadow, a different picture each start, and walks that ran to the trace loop limit (1,024 a lane). The translated node test now follows the same switch: without the builder, a box node returns no child and a triangle node a miss, and the node is not read (no title memory is asked for). It is decided when the program is translated (the switch is in the shader cache's key); a run with the switch whose builder the host turns off later keeps the full test. A card test runs both forms of the instruction without the builder. Sources (forks of VIctory): GromX0/victory-fork 429e3e5a93 and df9ac61a9d (cell lit by its lamps, magenta blocks gone, RX 9070), the PiloteCode line 11b29e9 (brunofgmag; fxceless/victory-fork Marvisak#994, VICTORY_BVH_NO_HIT), NitricAcidDev bc9bfcd, Xeltax/VIcky 3fb7f96, Cosatal 9b5dda9ac (VICTORY_RT_MISS); realblastex/flamingo saw the cutscene's faces lit on an RTX 4070. Here it is no second switch: it follows the builder's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e count DispatchX with USE_THREAD_DIMENSIONS counts threads; the console then starts only the threads up to the count in the last group, its other lanes off in EXEC from the start. Since 3c92819 the host ran the groups that hold the threads, but the last one whole: its threads past the count ran too (the "shortcut" in State::dispatch). Every program of the structure builder (a spilled user-data table, the programs that dispatch this way) now gets two instructions in front of its code: v_cmp_gt_u32 vcc, ttmp15, v0 and s_and exec, exec, vcc. The trap temporary is a new compute input, the threads left from the group's first on: the dispatch's thread count (user data of the new kind USER_DISPATCH_THREADS, which the host sets per dispatch, u32::MAX for one of whole groups) less the group id times the group's width, none past the count. The title's code runs unchanged behind it, so its lane counts, saved EXECs and scans that turn every lane on see the lanes the console's would, in every form the translator has; in the paired form (wave64 programs on 32-lane hosts, VICTORY_WAVE_PAIRS) the upper lanes take their own console thread ids. No thread leaves early, so every barrier is reached as before. A card test runs a 64-lane program in the paired form and a 32-lane one over two groups for 13 counts: each lane adds its wave's s_bcnt1 of EXEC, and only the launched lanes add, counting only launched lanes. The frame line now says how many partial groups were cut and how many still run whole (a program without the entry code, or a group partial in y or z, whose rows the builder does not have). Only the builder's programs change (all 52 still emit, validate and get pipelines with VICTORY_HOST_WAVE=32); they run only with VICTORY_BVH_BUILDER=1. The shader cache must be warmed again. After DexNom/VIctory PR Marvisak#35 (pr0vId3nce: EXEC masked by instructions ahead of the program), with the count through a trap temporary instead of a load of the spilled table; the host word as fxceless/victory-fork PR Marvisak#994 (PiloteCode) and uiliannn/VItoriaBr 633ba6e pass it. All GPL-3.0 forks of VIctory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ew heap comes from a table by slot Four of the five shadow-mask trace programs the translator refused with "a descriptor read only as data" (CS_TraceShadowRays_Full, _Half, _Quarter, _Eighth) pick a buffer descriptor from the view heap at an index they compute and use only its address, as a pointer to the ray-tracing structure they walk. The address of a descriptor at a fixed place in a table was a host word already (USER_VIEW_ADDRESS); one picked by a computed index had no source. Such a load now reads the view's title address from a table the host keeps per view heap (SLOT_VIEW_ADDRESSES, root SRV 252 in space 1: two dwords a slot, the low dword and the bits from 32 up; 0 for a slot without a buffer or structure view), at the slot the load reads, clamped to the table. The host writes a slot's address wherever it notes a view written there (the stride table's places), and binds the table like the stride table. The table (16 MiB of upload memory per view heap) is made only with VICTORY_BVH_BUILDER=1; without it a dispatch of such a program is dropped, as the program was before, so a default run is unchanged (the four now get pipelines, which a warm-up makes). The fifth, CS_TraceShadowRays_FullAdaptive, now stops later, at 0xae80: "a lane mask holding lanes elsewhere read as data" (a mask compared and joined with numbers before a vccnz branch); not taken here. shortcut: the table holds what the layer has mirrored of the heap: a slot no draw or pass has looked at since the title wrote it reads the address it had (or 0). After ka1qux/BRVIctory-ka1qux 699236769 (from fxceless/victory-fork PR Marvisak#994, PiloteCode), there slot 251; DexNom/VIctory 5f4c3df solves the same with a guest-address table. All GPL-3.0 forks of VIctory. Checked with victory translate --validate --pipelines (VICTORY_HOST_WAVE=32) on the nine shadow-mask trace programs: 8 of 9 emit, validate and get pipelines (4 of them before). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
This makes VIctory run on Linux under Proton (vkd3d-proton + DXVK's
dxgi), and fixes the two world GPU faults that hit every vendor. Tracking issue: #844.It's 14 commits on
mainffe310e, with 17 files changed (+1041 / −67). Each commit stands on its own and has its own reasoning in its message. If you'd rather review it as smaller PRs, I'm happy to split it.Proton/Wine compatibility
4828716Indirect clamp builds with Wine's compiler. It uses structured buffers instead ofRWByteAddressBuffermethods, so Microsoft'sd3dcompiler_47is no longer needed.e5a8c2fEmpty pipeline library: ask with a null blob. vkd3d-proton refuses an empty, non-null one.d469fe9HLE:WSAConnectByListandGetAddrInfoExAfail cleanly where the host lacks them, instead of the title crashing.4782660Shader tests: skip the DXIL hash-refusal check under Wine, which doesn't verify hashes.45aceeaShaders: one returning block per program. Programs with severalretblocks became SPIR-V that crashed RADV at pipeline creation.World GPU faults (all vendors)
6f732b6Mirror heap slots the title writes into its own memory. Each submission re-syncs them, so the GPU no longer reads stale descriptors.c69bd9aBind root SRVs as bounded one-view tables. Raw root SRVs let shaders read past the end of the buffer.Testers in #844 confirmed both fixes on RDNA2 (RX 6800 XT), RDNA3 (RX 7900 XT), RDNA 3.5 (Radeon 8060S) and an RTX 4090.
Wine performance
4f9aa10,27eefe4Watch. Under Wine,GetWriteWatchandVirtualQuerycontend on the virtual-memory lock with the title's write faults: about 180 µs per call in the world, against about 70 µs in isolation. Under Wine the watch now asks once per allocation per submission, with allocations cached. Over the same 4-minute world run, kernel time fell from 34 s to about 8 s. crashbashash measured copies −29% againstmainon an RX 6800 XT. Windows is unchanged.Diagnostics
9823139VICTORY_SHOW_TARGET(diagnostics feature): presents an intermediate render target instead of the final frame. For example,2560x1440-f28-3shows the world's G-buffer.45e24f9A debug pixel shader (emit::debug_ps) that colours surfaces by slope, from depth derivatives.VICTORY_DEBUG_PS=1, depth-tested geometry uses it, so you can walk the world while lighting isn't translated.VICTORY_PS_FALLBACK=0turns that off.0496398VICTORY_PIPELINE_WAIT_MS: sets the per-frame pipeline wait. The default stays at 500 ms.Docs
b7cc788,2115124adddocs/linux-proton.md: Proton Experimental and system-Wine recipes, the known issues, and the switches above. They also add a README note andscripts/proton-run.sh.Testing
cargo/gitfrom inside Wine. Clippy is clean at every commit.VICTORY_DEBUG_PS=1, the world can be walked with geometry visible.Known gaps (not in this PR)
XboxBvhBuilder.dll's compute shaders ("address in an SGPR that is no root parameter").AI-assisted (Claude Code).
🤖 Generated with Claude Code