Linux: run under Proton, and fix the world GPU faults #994

Closed
github-bot wants to merge 15 commits from gh-pr/994/head into gh-pr/994/base
Owner

@⁠Slaktarn700 on GitHub · 2026-11-24 14:46 UTC · original
Slaktarn700:proton-fixes → main · +1055 −68 · 17 files · 15 commits · closed without merging

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 main ffe310e, 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

  • 4828716 Indirect clamp builds with Wine's compiler. It uses structured buffers instead of RWByteAddressBuffer methods, so Microsoft's d3dcompiler_47 is no longer needed.
  • e5a8c2f Empty pipeline library: ask with a null blob. vkd3d-proton refuses an empty, non-null one.
  • d469fe9 HLE: WSAConnectByList and GetAddrInfoExA fail cleanly where the host lacks them, instead of the title crashing.
  • 4782660 Shader tests: skip the DXIL hash-refusal check under Wine, which doesn't verify hashes.
  • 45aceea Shaders: one returning block per program. Programs with several ret blocks became SPIR-V that crashed RADV at pipeline creation.

World GPU faults (all vendors)

  • 6f732b6 Mirror heap slots the title writes into its own memory. Each submission re-syncs them, so the GPU no longer reads stale descriptors.
  • c69bd9a Bind 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, 27eefe4 Watch. Under Wine, GetWriteWatch and VirtualQuery contend 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% against main on an RX 6800 XT. Windows is unchanged.

Diagnostics

  • 9823139 VICTORY_SHOW_TARGET (diagnostics feature): presents an intermediate render target instead of the final frame. For example, 2560x1440-f28-3 shows the world's G-buffer.
  • 45e24f9 A debug pixel shader (emit::debug_ps) that colours surfaces by slope, from depth derivatives.
    • With VICTORY_DEBUG_PS=1, depth-tested geometry uses it, so you can walk the world while lighting isn't translated.
    • A geometry pipeline whose pixel shader doesn't translate gets it as a fallback, instead of its draws being dropped. VICTORY_PS_FALLBACK=0 turns that off.
  • 0496398 VICTORY_PIPELINE_WAIT_MS: sets the per-frame pipeline wait. The default stays at 500 ms.

Docs

  • b7cc788, 2115124 add docs/linux-proton.md: Proton Experimental and system-Wine recipes, the known issues, and the switches above. They also add a README note and scripts/proton-run.sh.

Testing

  • Platform: RX 9070 XT, RADV / Mesa 26.3.1, CachyOS kernel 7.3.5, Proton Experimental (vkd3d-proton 3.2).
  • Tests: the full workspace (344 tests) passes under Proton. The only exceptions are the two tests that start cargo/git from inside Wine. Clippy is clean at every commit.
  • In the game: boots to the first mission and plays. With VICTORY_DEBUG_PS=1, the world can be walked with geometry visible.

Known gaps (not in this PR)

  • The final image is still dark, as on Windows. Many lighting and post passes don't translate yet. The largest single gap is XboxBvhBuilder.dll's compute shaders ("address in an SGPR that is no root parameter").
  • Copied CBVs in directly indexed heap slots read zeros (raised by MichaelSmithAI in #844).
  • Frame rate is CPU-bound by shadow copies, as on Windows (#400).

AI-assisted (Claude Code).

🤖 Generated with Claude Code

**@⁠Slaktarn700** on GitHub · 2026-11-24 14:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/994) `Slaktarn700:proton-fixes` → `main` · +1055 −68 · 17 files · 15 commits · closed without merging ## 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 `main` `ffe310e`, 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 - `4828716` **Indirect clamp builds with Wine's compiler.** It uses structured buffers instead of `RWByteAddressBuffer` methods, so Microsoft's `d3dcompiler_47` is no longer needed. - `e5a8c2f` **Empty pipeline library:** ask with a null blob. vkd3d-proton refuses an empty, non-null one. - `d469fe9` **HLE:** `WSAConnectByList` and `GetAddrInfoExA` fail cleanly where the host lacks them, instead of the title crashing. - `4782660` **Shader tests:** skip the DXIL hash-refusal check under Wine, which doesn't verify hashes. - `45aceea` **Shaders: one returning block per program.** Programs with several `ret` blocks became SPIR-V that crashed RADV at pipeline creation. ### World GPU faults (all vendors) - `6f732b6` **Mirror heap slots the title writes into its own memory.** Each submission re-syncs them, so the GPU no longer reads stale descriptors. - `c69bd9a` **Bind 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`, `27eefe4` **Watch.** Under Wine, `GetWriteWatch` and `VirtualQuery` contend 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% against `main` on an RX 6800 XT. **Windows is unchanged.** ### Diagnostics - `9823139` **`VICTORY_SHOW_TARGET`** (diagnostics feature): presents an intermediate render target instead of the final frame. For example, `2560x1440-f28-3` shows the world's G-buffer. - `45e24f9` **A debug pixel shader** (`emit::debug_ps`) that colours surfaces by slope, from depth derivatives. - With `VICTORY_DEBUG_PS=1`, depth-tested geometry uses it, so you can walk the world while lighting isn't translated. - A geometry pipeline whose pixel shader doesn't translate gets it as a fallback, instead of its draws being dropped. `VICTORY_PS_FALLBACK=0` turns that off. - `0496398` **`VICTORY_PIPELINE_WAIT_MS`:** sets the per-frame pipeline wait. The default stays at 500 ms. ### Docs - `b7cc788`, `2115124` add `docs/linux-proton.md`: Proton Experimental and system-Wine recipes, the known issues, and the switches above. They also add a README note and `scripts/proton-run.sh`. ## Testing - **Platform:** RX 9070 XT, RADV / Mesa 26.3.1, CachyOS kernel 7.3.5, Proton Experimental (vkd3d-proton 3.2). - **Tests:** the full workspace (344 tests) passes under Proton. The only exceptions are the two tests that start `cargo`/`git` from inside Wine. Clippy is clean at every commit. - **In the game:** boots to the first mission and plays. With `VICTORY_DEBUG_PS=1`, the world can be walked with geometry visible. ## Known gaps (not in this PR) - The final image is still dark, as on Windows. Many lighting and post passes don't translate yet. The largest single gap is `XboxBvhBuilder.dll`'s compute shaders ("address in an SGPR that is no root parameter"). - Copied CBVs in directly indexed heap slots read zeros (raised by MichaelSmithAI in #844). - Frame rate is CPU-bound by shadow copies, as on Windows (#400). AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
From RDNA2/RDNA3/RDNA 3.5 reports on #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 <[email protected]>
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/VIctory#994.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:16:25 +00:00
github-bot closed this pull request 2026-11-26 04:16:25 +00:00
Author
Owner

@⁠MichaelSmithAI on GitHub · 2026-11-24 14:59 UTC · original

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 resync_title_writes() before taking the host submission mutex. A second queue caller can therefore refresh the heap while the first caller is still waiting for its GPU work. In our staging branch we moved the guest-only refresh inside that mutex, before list preparation. The same A → B → A check passes there. The ordering finding comes from source review; the fixture uses sequential submissions.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 14:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7135279659) 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 `resync_title_writes()` before taking the host submission mutex. A second queue caller can therefore refresh the heap while the first caller is still waiting for its GPU work. In our staging branch we moved the guest-only refresh inside that mutex, before list preparation. The same A → B → A check passes there. The ordering finding comes from source review; the fixture uses sequential submissions.
Author
Owner

@⁠Slaktarn700 on GitHub · 2026-11-24 15:06 UTC · original

@⁠MichaelSmithAI thanks for the A → B → A check on the 4090, and for the ordering catch. You're right: resync_title_writes() ran before Host::execute took the submission mutex, so a second queue caller could refresh a heap while the first one's GPU work still read it.

Fixed in 993dff8. The guest queue now calls Host::execute_title, which takes the lock first, then starts the watch submission (watch::new_submission, which had the same issue) and refreshes the heaps, and only then prepares the lists. Internal submissions (the indirect clamp, captures, copy-backs) keep plain execute and don't refresh. Lock order stays submission mutex → SHADER_HEAPS. Nothing takes them the other way round.

Clippy is clean, with and without --all-features, and the victory-gpu tests pass under Proton Experimental.

AI-assisted (Claude Code).

**@⁠Slaktarn700** on GitHub · 2026-11-24 15:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7135467361) @⁠MichaelSmithAI thanks for the A → B → A check on the 4090, and for the ordering catch. You're right: `resync_title_writes()` ran before `Host::execute` took the submission mutex, so a second queue caller could refresh a heap while the first one's GPU work still read it. Fixed in 993dff8. The guest queue now calls `Host::execute_title`, which takes the lock first, then starts the watch submission (`watch::new_submission`, which had the same issue) and refreshes the heaps, and only then prepares the lists. Internal submissions (the indirect clamp, captures, copy-backs) keep plain `execute` and don't refresh. Lock order stays submission mutex → `SHADER_HEAPS`. Nothing takes them the other way round. Clippy is clean, with and without `--all-features`, and the `victory-gpu` tests pass under Proton Experimental. AI-assisted (Claude Code).
Author
Owner

@⁠justlovett0 on GitHub · 2026-11-24 16:06 UTC · original

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: main ffe310e + #175 (Agility SDK 1.620.2 – required to launch on this Win10 box) + this PR (15 commits, merged cleanly) + a local #747 constant (capped-heap dynamic pool 2^18). Release build; VICTORY_DEBUG_PS=1 and VICTORY_SHOW_TARGET=2560x1440-f28-3 for the world runs. Retail GTA VI 1.0.2.1 (b99f876b74d4a77f), Series X.

main + #175 + this PR
boot / menus / intro cutscenes fine fine
world entry TDR ~30 s into world loading (24-list submission, 0x887A0006) world simulation runs; the character is controllable
run length ~75–100 s total ~3.5 min total, ~2 min in-world, then device removal (29-list submission)
world picture black G-buffer geometry visible via VICTORY_SHOW_TARGET=2560x1440-f28-3: the street, basic polygons, moving assets in flat debug colours; the final present stays black (lighting/post untranslated, as documented)
frame rate – 0.9–1.6 fps, 270–400 MB copies/frame (the CPU-bound copy cost, #400)

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 (6f732b6 mirror re-sync, c69bd9a bounded root-SRV tables) clearly changed the failure mode on NVIDIA/Win10: from an immediate page-fault TDR to minutes of running world. The remaining ~3-min removal may be the helper-lane readfirstlane spin (#1039/#908) or #772 – happy to run DRED/Aftermath-style diagnostics here if useful.

Logs kept locally (pr994-run.log, pr994-747-run.log, showtarget-run.log); excerpts on request. No game files attached.

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.

**@⁠justlovett0** on GitHub · 2026-11-24 16:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7137142180) 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: `main` `ffe310e` + #175 (Agility SDK 1.620.2 – required to launch on this Win10 box) + this PR (15 commits, merged cleanly) + a local #747 constant (capped-heap dynamic pool 2^18). Release build; `VICTORY_DEBUG_PS=1` and `VICTORY_SHOW_TARGET=2560x1440-f28-3` for the world runs. Retail GTA VI 1.0.2.1 (`b99f876b74d4a77f`), Series X. | | main + #175 | + this PR | |---|---|---| | boot / menus / intro cutscenes | fine | fine | | world entry | TDR ~30 s into world loading (24-list submission, `0x887A0006`) | **world simulation runs; the character is controllable** | | run length | ~75–100 s total | ~3.5 min total, ~2 min in-world, then device removal (29-list submission) | | world picture | black | **G-buffer geometry visible** via `VICTORY_SHOW_TARGET=2560x1440-f28-3`: the street, basic polygons, moving assets in flat debug colours; the final present stays black (lighting/post untranslated, as documented) | | frame rate | – | 0.9–1.6 fps, 270–400 MB copies/frame (the CPU-bound copy cost, #400) | 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 (`6f732b6` mirror re-sync, `c69bd9a` bounded root-SRV tables) clearly changed the failure mode on NVIDIA/Win10: from an immediate page-fault TDR to minutes of running world. The remaining ~3-min removal may be the helper-lane `readfirstlane` spin (#1039/#908) or #772 – happy to run DRED/Aftermath-style diagnostics here if useful. Logs kept locally (`pr994-run.log`, `pr994-747-run.log`, `showtarget-run.log`); excerpts on request. No game files attached. 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.
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 16:30 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 993dff8: cargo test -p victory-gpu -p victory-hle -p victory-shader passes, 269 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 16:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7137775631) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 993dff8: `cargo test -p victory-gpu -p victory-hle -p victory-shader` passes, 269 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠timorjay on GitHub · 2026-11-24 16:03 UTC · original · edited 2026-11-24 16:36 UTC

Independent Windows check at 993dff8. On Microsoft WARP, the unmodified depth-colour pixel shader produced the expected colours for 3,072/3,072 pixels across three synthetic 32×32 surfaces. With constant depth the centre RGB was (0.5, 0.5, 1). Increasing depth to the right gave (0.146447, 0.5, 0.853553); decreasing depth downward gave (0.5, 0.853553, 0.853553). The Microsoft DXIL validator accepted all eight output-count variants. The pixel checks used one RGBA32F target. Runnable fixture and exact results.

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 2560x1440-f28-3 at the first observed use of a world-visibility shader, after graphics allocations had already returned E_OUTOFMEMORY. The presentation command list failed to close and no world frame was captured. With the Series S profile and a 1280x720-f28-3 selector, the run reached the world-visibility marker with no logged graphics allocation failures. The software device was removed before the next presentation. These software runs verified the shader output but did not display the street or test player control.

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 E_INVALIDARG while closing the presentation command list. In the successful run I recorded the two surface readbacks separately and skipped transitions when the selected surface was already in COPY_SOURCE. All four matched samples were in that state, with one mip and one array layer. A separate 2×2 texture check on Microsoft WARP isolated the API error without submitting any work. Starting from COPY_SOURCE, the original transitions made Close() return 0x80070057. Skipping those transitions returned S_OK. Starting from RENDER_TARGET, both variants returned S_OK. All 56 non-benchmark GPU crate tests passed with WARP on the isolated patch. This accounts for an early presentation error. The later device-removal issue remains open. Minimal presentation fix · Standalone check.

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.

**@⁠timorjay** on GitHub · 2026-11-24 16:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7137044612) · edited 2026-11-24 16:36 UTC Independent Windows check at `993dff8`. On Microsoft WARP, the unmodified depth-colour pixel shader produced the expected colours for **3,072/3,072 pixels** across three synthetic 32×32 surfaces. With constant depth the centre RGB was (0.5, 0.5, 1). Increasing depth to the right gave (0.146447, 0.5, 0.853553); decreasing depth downward gave (0.5, 0.853553, 0.853553). The Microsoft DXIL validator accepted all eight output-count variants. The pixel checks used one RGBA32F target. [Runnable fixture and exact results](https://gist.github.com/timorjay/64ff59b3ef6e544f75dd0ae041a4b4c9). 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 `2560x1440-f28-3` at the first observed use of a world-visibility shader, after graphics allocations had already returned `E_OUTOFMEMORY`. The presentation command list failed to close and no world frame was captured. With the Series S profile and a `1280x720-f28-3` selector, the run reached the world-visibility marker with no logged graphics allocation failures. The software device was removed before the next presentation. These software runs verified the shader output but did not display the street or test player control. **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 `E_INVALIDARG` while closing the presentation command list. In the successful run I recorded the two surface readbacks separately and skipped transitions when the selected surface was already in `COPY_SOURCE`. All four matched samples were in that state, with one mip and one array layer. A separate 2×2 texture check on Microsoft WARP isolated the API error without submitting any work. Starting from `COPY_SOURCE`, the original transitions made `Close()` return `0x80070057`. Skipping those transitions returned `S_OK`. Starting from `RENDER_TARGET`, both variants returned `S_OK`. All 56 non-benchmark GPU crate tests passed with WARP on the isolated patch. This accounts for an early presentation error. The later device-removal issue remains open. [Minimal presentation fix](https://github.com/timorjay/VIctory/commit/d23448f0c9e9a563e7a9e3d457c7245205874a84) · [Standalone check](https://gist.github.com/timorjay/64ff59b3ef6e544f75dd0ae041a4b4c9#file-present-state-check-cpp). 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](https://github.com/timorjay/VIctory/commit/64d797489e34bdfc6bb98789610d2d43c7884fc8). Codex assisted with the fixture, the local runs and this report.
Author
Owner

@⁠pablogonz12 on GitHub · 2026-11-24 17:10 UTC · original

Tested on Linux (RX 9070 XT, RADV/Mesa 26.3.1, GE-Proton11-14, vkd3d-proton master), diagnostics build, 7-minute runs, world load only.

  • Your head fitted into our tree, one run: 0.45 fps (mean of the last 65 frame-rate lines), 503 draws per frame, copies 663 ms/frame, write-watch 91 ms/frame. No device removed, no panic, 15 black-frame warnings of 15 (still in the intro's black credits at 7 minutes, so the world is not reached).
  • Same fit re-run without your commit: 0.38 fps, 419 draws, copies 330 ms/frame. The 2x copies cost and the extra draws come with it in this tree, so I am not claiming they are yours; the fps difference is within one run's noise.

Nothing crashed. Not tested: getting past the credits; native Windows.

**@⁠pablogonz12** on GitHub · 2026-11-24 17:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7138792325) Tested on Linux (RX 9070 XT, RADV/Mesa 26.3.1, GE-Proton11-14, vkd3d-proton master), diagnostics build, 7-minute runs, world load only. - Your head fitted into our tree, one run: **0.45 fps** (mean of the last 65 frame-rate lines), 503 draws per frame, copies 663 ms/frame, write-watch 91 ms/frame. No device removed, no panic, 15 black-frame warnings of 15 (still in the intro's black credits at 7 minutes, so the world is not reached). - Same fit re-run without your commit: **0.38 fps**, 419 draws, copies 330 ms/frame. The 2x copies cost and the extra draws come with it in this tree, so I am not claiming they are yours; the fps difference is within one run's noise. Nothing crashed. Not tested: getting past the credits; native Windows.
Author
Owner

@⁠justlovett0 on GitHub · 2026-11-24 17:32 UTC · original

Extended Win10/RTX 3080 verification (follow-up to my earlier comment): with the copy-storm fixes (#986/#1260/#1267) and #1067 stacked on top of this PR, the world now runs continuously at ~20 fps with no device removal (previously ~1 fps and a removal every ~2–3 min). The two world-fault fixes here remain load-bearing; the copy fixes removed the timed removal that survived them.

Build: main ffe310e + #175 + this PR + #302 + #193 + #704 + #309 + #1067 + #953 + #986 + #1260 + #1267 + #1254. Win10 21H2 19044.7846, RTX 3080, driver 621.24. VICTORY_DEBUG_PS=1 VICTORY_SHOW_TARGET=2560x1440-f28-3.

State of the picture: the G-buffer shows substantially more geometry (characters, scene parts) — in-game untranslated shaders fell 444 → 100 with #1067. The final lit image is still black: the lighting/composite passes don't translate yet. #1254's frame-end black-frame trace is the right tool to name them; the largest known lighting gap is still XboxBvhBuilder's computes ("an address in an SGPR that is no root parameter"), which #302's spill detection does not catch (see #302 comment).

So: world simulation + geometry solid and fast; lighting is the next frontier. Happy to share the black-frame trace output or run further diagnostics here.

AI use: Qwen Code (underlying model name not disclosed by the tool); user confirmed visuals by hand.

**@⁠justlovett0** on GitHub · 2026-11-24 17:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7139345943) Extended Win10/RTX 3080 verification (follow-up to my earlier comment): with the copy-storm fixes (#986/#1260/#1267) and #1067 stacked on top of this PR, the world now runs **continuously at ~20 fps with no device removal** (previously ~1 fps and a removal every ~2–3 min). The two world-fault fixes here remain load-bearing; the copy fixes removed the timed removal that survived them. Build: main `ffe310e` + #175 + this PR + #302 + #193 + #704 + #309 + #1067 + #953 + #986 + #1260 + #1267 + #1254. Win10 21H2 19044.7846, RTX 3080, driver 621.24. `VICTORY_DEBUG_PS=1 VICTORY_SHOW_TARGET=2560x1440-f28-3`. State of the picture: the G-buffer shows substantially more geometry (characters, scene parts) — in-game untranslated shaders fell 444 → 100 with #1067. The **final lit image is still black**: the lighting/composite passes don't translate yet. #1254's frame-end black-frame trace is the right tool to name them; the largest known lighting gap is still XboxBvhBuilder's computes ("an address in an SGPR that is no root parameter"), which #302's spill detection does not catch (see #302 comment). So: world simulation + geometry solid and fast; lighting is the next frontier. Happy to share the black-frame trace output or run further diagnostics here. AI use: Qwen Code (underlying model name not disclosed by the tool); user confirmed visuals by hand.
Author
Owner

@⁠YaBulochka on GitHub · 2026-11-24 17:40 UTC · original

Tested this on Linux/RADV — the watch change is a real win, but the world still dies at a compute pipeline.

Setup: Linux, Wine 11.22 with a Proton 11.0 prefix (vkd3d-proton + DXVK dxgi), RX 7600 XT (RADV NAVI33). Tested against two drivers: Mesa 26.3.1 built locally, and mesa-git 27.0.0-devel.

What this PR changed for me

  • In-world frame rate went from 0.3 fps to 6.4 fps (the GetWriteWatch change: kernel time was the whole frame).
  • 45aceea does exactly what it says: the mesh pipeline that used to kill RADV now creates. Two mesh pipelines come up and every dumped module passes spirv-val.
  • VKD3D_SHADER_DUMP_PATH over the run: all modules valid, so the "several ret blocks" class is gone on this content.

What still stops the run

The pipeline for compute 4e296b1885c37b29 (8532-byte container, user_data=1, samplers=1). Sequence on Mesa 26.3.1:

first bind pipeline=… frame=1169 stage="compute" size=8532 hash=4e296b1885c37b29
shader translated stage="compute" hash=4e296b1885c37b29 user_data=1 samplers=1
<process gone ~0.4 s later, no crashes.log>

On mesa-git the same shader gives the Wine-side message instead:

err:vulkan:vkCreateComputePipelines Exception 0xc0000005 in Unix call.
faulting address 0x7f…9ba60 = libvulkan_radeon.so+0x19ba60

VICTORY_PIPELINE_WAIT_MS=120000 does not change it (it dies while the pipeline is created, not while waiting for it), and #955 on top of this PR makes no difference either.

One more data point for the heap PRs (#550, #955)

The title's view heap asks for 1,245,184 descriptors; the host caps CreateDescriptorHeap at 1,000,000 (0x80070057), HostHeap::new mirrors 934,464 and leaves the rest out, so exactly 310,720 slots are dropped — one warning each, index=934464…1245183. That matches the checkerboard/stripe artifacts I see while the loading screen is up.

Happy to test patches, and I can post the run log (hashes and counters only, no game data).

**@⁠YaBulochka** on GitHub · 2026-11-24 17:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7139536083) **Tested this on Linux/RADV — the watch change is a real win, but the world still dies at a compute pipeline.** Setup: Linux, Wine 11.22 with a Proton 11.0 prefix (vkd3d-proton + DXVK `dxgi`), RX 7600 XT (RADV NAVI33). Tested against two drivers: Mesa 26.3.1 built locally, and `mesa-git` 27.0.0-devel. **What this PR changed for me** - In-world frame rate went from 0.3 fps to 6.4 fps (the `GetWriteWatch` change: kernel time was the whole frame). - `45aceea` does exactly what it says: the mesh pipeline that used to kill RADV now creates. Two mesh pipelines come up and every dumped module passes `spirv-val`. - `VKD3D_SHADER_DUMP_PATH` over the run: all modules valid, so the "several ret blocks" class is gone on this content. **What still stops the run** The pipeline for compute `4e296b1885c37b29` (8532-byte container, `user_data=1`, `samplers=1`). Sequence on Mesa 26.3.1: ``` first bind pipeline=… frame=1169 stage="compute" size=8532 hash=4e296b1885c37b29 shader translated stage="compute" hash=4e296b1885c37b29 user_data=1 samplers=1 <process gone ~0.4 s later, no crashes.log> ``` On `mesa-git` the same shader gives the Wine-side message instead: ``` err:vulkan:vkCreateComputePipelines Exception 0xc0000005 in Unix call. faulting address 0x7f…9ba60 = libvulkan_radeon.so+0x19ba60 ``` `VICTORY_PIPELINE_WAIT_MS=120000` does not change it (it dies while the pipeline is created, not while waiting for it), and #955 on top of this PR makes no difference either. **One more data point for the heap PRs (#550, #955)** The title's view heap asks for 1,245,184 descriptors; the host caps `CreateDescriptorHeap` at 1,000,000 (`0x80070057`), `HostHeap::new` mirrors 934,464 and leaves the rest out, so exactly 310,720 slots are dropped — one warning each, `index=934464…1245183`. That matches the checkerboard/stripe artifacts I see while the loading screen is up. Happy to test patches, and I can post the run log (hashes and counters only, no game data).
Author
Owner

@⁠pablogonz12 on GitHub · 2026-11-24 17:40 UTC · original

Follow-up on the same machine (RX 9070 XT, RADV/Mesa 26.3.1, CachyOS, GE-Proton11-14, vkd3d-proton master), head 993dff8 as-is with VICTORY_DEBUG_PS=1 and VICTORY_NO_WATCHDOG=1, Enter every 5 s, 25-minute run started 17:31 UTC:

  • It got past the intro and into gameplay: the HUD (phone/contact panel) and the minimap with map geometry are drawn, under debug flat shading.
  • ~0.6 fps, ~550 draws per frame, no device removed in the run so far.

So the earlier 7-minute run was simply too short: at that point it was still in the intro's black credits, which says nothing about the world path.

Not tested: lit picture (needs the real pixel shaders), controls.

**@⁠pablogonz12** on GitHub · 2026-11-24 17:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7139548579) Follow-up on the same machine (RX 9070 XT, RADV/Mesa 26.3.1, CachyOS, GE-Proton11-14, vkd3d-proton master), head `993dff8` as-is with `VICTORY_DEBUG_PS=1` and `VICTORY_NO_WATCHDOG=1`, Enter every 5 s, 25-minute run started 17:31 UTC: - It got past the intro and into gameplay: the HUD (phone/contact panel) and the minimap with map geometry are drawn, under debug flat shading. - ~0.6 fps, ~550 draws per frame, no device removed in the run so far. So the earlier 7-minute run was simply too short: at that point it was still in the intro's black credits, which says nothing about the world path. Not tested: lit picture (needs the real pixel shaders), controls.
Author
Owner

@⁠deadkid14 on GitHub · 2026-11-24 18:01 UTC · original

Tested on Linux with NVIDIA: RTX 5070 Ti (driver 620.73.04), CachyOS, GE-Proton11-14's Wine and vkd3d-proton 3.2 with VK_NV_raw_access_chains disabled. Diag build of ffe310e + this PR + #189, #89, #206, #469, #454, #177, #579 and #591.

  • Clamp: builds with Wine's own d3dcompiler_47. No "no argument clamp" warning, and indirect executions run. Before, this needed #178 plus Microsoft's dxcompiler.dll.
  • Tests under Wine: argument_clamp_builds and a_rejected_blob_gives_an_empty_library now pass (both failed on d2a4bae here). victory-shader 146/146 and victory-loader 22/22 pass. victory-gpu is 58/60, and the two failures (structured_views_off_an_element_read_and_write_their_bytes, unordered_writes_reach_a_depth_target) are CreateRootSignature refusals from the test fixtures under vkd3d-proton. They fail the same way without this PR. Run with --test-threads=1: with parallel threads the victory-gpu run hung here, as in #433.
  • World: reached in about 1.5 min from launch, with no Xid, no device removal and no exception. 7–8 fps in the early world, against 1–3 fps the day before on d2a4bae with a similar stack minus this PR. main also moved in between, so not all of that is this PR. Some heavier views drop to about 1.3 fps.
  • Diagnostics: VICTORY_DEBUG_PS=1 VICTORY_SHOW_TARGET=2560x1440-f28-3 shows the world's geometry as documented: an interior, a courtyard with laundry lines, gates and doors, and a character at a counter. Walking with the keyboard pad works. Without them the final image is dark blue-grey with a few lights.

One run.

AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request.

**@⁠deadkid14** on GitHub · 2026-11-24 18:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7140052557) Tested on Linux with NVIDIA: RTX 5070 Ti (driver 620.73.04), CachyOS, GE-Proton11-14's Wine and vkd3d-proton 3.2 with `VK_NV_raw_access_chains` disabled. Diag build of `ffe310e` + this PR + #189, #89, #206, #469, #454, #177, #579 and #591. - **Clamp:** builds with Wine's own `d3dcompiler_47`. No "no argument clamp" warning, and indirect executions run. Before, this needed #178 plus Microsoft's `dxcompiler.dll`. - **Tests under Wine:** `argument_clamp_builds` and `a_rejected_blob_gives_an_empty_library` now pass (both failed on `d2a4bae` here). `victory-shader` 146/146 and `victory-loader` 22/22 pass. `victory-gpu` is 58/60, and the two failures (`structured_views_off_an_element_read_and_write_their_bytes`, `unordered_writes_reach_a_depth_target`) are `CreateRootSignature` refusals from the test fixtures under vkd3d-proton. They fail the same way without this PR. Run with `--test-threads=1`: with parallel threads the `victory-gpu` run hung here, as in #433. - **World:** reached in about 1.5 min from launch, with no Xid, no device removal and no exception. 7–8 fps in the early world, against 1–3 fps the day before on `d2a4bae` with a similar stack minus this PR. `main` also moved in between, so not all of that is this PR. Some heavier views drop to about 1.3 fps. - **Diagnostics:** `VICTORY_DEBUG_PS=1 VICTORY_SHOW_TARGET=2560x1440-f28-3` shows the world's geometry as documented: an interior, a courtyard with laundry lines, gates and doors, and a character at a counter. Walking with the keyboard pad works. Without them the final image is dark blue-grey with a few lights. One run. *AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request.*
Author
Owner

@⁠BitWuehler on GitHub · 2026-11-24 19:22 UTC · original

Verified on Linux + NVIDIA RTX 5080 (Blackwell) via umu-run / GE-Proton11-14: #994's Wine indirect-argument clamp, debug geometry view, and world GPU fault fixes hold for 9m 40s (580 s) with 0 device removals, 0 DRED faults, and 0 kernel Xids once paired with #177 and VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains.

Setup

  • Hardware / OS: Ryzen 7 9800X3D, 60 GB RAM, NVIDIA GeForce RTX 5080 16 GB (driver 620.73.04), CachyOS (Linux 7.3.6-1-cachyos).
  • Runtime: GE-Proton11-14 via umu-run (ntsync, Wine 11.0 Staging + bundled vkd3d-proton, Wine builtin d3dcompiler_47).
  • Title / Build: retail 1.0.2.1, --console series-x, diag build (--features diagnostics, cross-compiled with clang-cl + lld-link + xwin), VICTORY_D3D12_DRED=1, VICTORY_DEBUG_PS=1, VICTORY_SHOW_TARGET=2560x1440-f28-3.

Before vs. after on the same machine

Build / flags Result
proton-fixes (993dff8) alone (3 runs: 1× Proton Experimental, 2× GE-Proton11-14) Entered world (frame 1394–1521, 0 clamp errors), then stopped at 84–86.5 s right after translating compute 5d113aa6830760b6 (0 crashes.log entries — same #177 / #852 driver crash)
main (ffe310e) + #994 (993dff8) + #177 (b7300eb) + #454 (85c04d1) + #206 (05981dd) + VICTORY_NO_WATCHDOG=1 + VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains Clean merge; passed 5d113aa6830760b6 (frame 1381) and 72f552f4553fb5f9 (frame 1385). Ran 580.2 s continuous (~8+ min in-world, to frame 1564) with 0 device removals (0x887A0006), 0 DRED faults, and 0 NVIDIA Xids in journalctl -k

World metrics (69 world stat intervals)

  • Frame rate / time: median 0.3 fps / 2,867 ms/frame (range 0.1–2.5 fps, 395–10,700 ms/frame).
  • Draws / drops: median 1,068 draws/frame (peak 4,639), median 937 dropped without host pipeline, median 1,173 indirect drops.
  • NVIDIA-specific notes: 140 refused compute pipelines (0x80070057), 1M host view heap cap (#747: 16 no dynamic slots warnings, 310,720 title slot past the host heap warnings), 1 buffer view not on an element warning (offset=10561216 element=12).
  • Visuals & audio (observed directly): colored debug-shaded world geometry is clearly visible — streets, overhead cables/wires, characters, plus opening credit overlays. Music played smoothly at first, then stuttered increasingly as frame times climbed later in the run and eventually cut out before the end; visible geometry also became sparser and choppier toward the end.
  • How the run ended: title breakpoint 0x80000003 at +0x63966f on 3 worker threads simultaneously at 9m 36s / frame 1564 (BUILDING 20731/22500, OBJECT 16891/27500, INSTANCE_LIST 44980/45000), reproducing #698 rather than a GPU fault or watchdog exit.

AI-assisted log analysis and write-up; built, run, and visually verified locally on my own retail copy. No game files, captures, or raw logs attached.

**@⁠BitWuehler** on GitHub · 2026-11-24 19:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7142005333) Verified on **Linux + NVIDIA RTX 5080 (Blackwell)** via `umu-run` / `GE-Proton11-14`: #994's Wine indirect-argument clamp, debug geometry view, and world GPU fault fixes hold for **9m 40s (580 s)** with **0 device removals, 0 DRED faults, and 0 kernel Xids** once paired with #177 and `VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains`. **Setup** - **Hardware / OS:** Ryzen 7 9800X3D, 60 GB RAM, NVIDIA GeForce RTX 5080 16 GB (driver `620.73.04`), CachyOS (`Linux 7.3.6-1-cachyos`). - **Runtime:** `GE-Proton11-14` via `umu-run` (`ntsync`, Wine 11.0 Staging + bundled `vkd3d-proton`, Wine builtin `d3dcompiler_47`). - **Title / Build:** retail `1.0.2.1`, `--console series-x`, `diag` build (`--features diagnostics`, cross-compiled with `clang-cl` + `lld-link` + `xwin`), `VICTORY_D3D12_DRED=1`, `VICTORY_DEBUG_PS=1`, `VICTORY_SHOW_TARGET=2560x1440-f28-3`. **Before vs. after on the same machine** | Build / flags | Result | |---|---| | `proton-fixes` (`993dff8`) alone (3 runs: 1× Proton Experimental, 2× GE-Proton11-14) | Entered world (`frame 1394–1521`, 0 clamp errors), then stopped at **84–86.5 s** right after translating `compute 5d113aa6830760b6` (0 `crashes.log` entries — same #177 / #852 driver crash) | | `main` (`ffe310e`) + #994 (`993dff8`) + #177 (`b7300eb`) + #454 (`85c04d1`) + #206 (`05981dd`) + `VICTORY_NO_WATCHDOG=1` + `VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains` | Clean merge; passed `5d113aa6830760b6` (frame 1381) and `72f552f4553fb5f9` (frame 1385). Ran **580.2 s** continuous (~8+ min in-world, to frame `1564`) with **0 device removals (`0x887A0006`)**, **0 DRED faults**, and **0 NVIDIA Xids** in `journalctl -k` | **World metrics (69 world stat intervals)** - **Frame rate / time:** median **0.3 fps** / **2,867 ms/frame** (range `0.1–2.5 fps`, `395–10,700 ms/frame`). - **Draws / drops:** median **1,068 draws/frame** (peak **4,639**), median 937 dropped without host pipeline, median 1,173 indirect drops. - **NVIDIA-specific notes:** 140 refused compute pipelines (`0x80070057`), 1M host view heap cap (#747: 16 `no dynamic slots` warnings, 310,720 `title slot past the host heap` warnings), 1 `buffer view not on an element` warning (`offset=10561216 element=12`). - **Visuals & audio (observed directly):** colored debug-shaded world geometry is clearly visible — streets, overhead cables/wires, characters, plus opening credit overlays. Music played smoothly at first, then stuttered increasingly as frame times climbed later in the run and eventually cut out before the end; visible geometry also became sparser and choppier toward the end. - **How the run ended:** title breakpoint `0x80000003` at `+0x63966f` on 3 worker threads simultaneously at `9m 36s` / frame `1564` (`BUILDING 20731/22500`, `OBJECT 16891/27500`, `INSTANCE_LIST 44980/45000`), reproducing #698 rather than a GPU fault or watchdog exit. *AI-assisted log analysis and write-up; built, run, and visually verified locally on my own retail copy. No game files, captures, or raw logs attached.*
Author
Owner

@⁠YaBulochka on GitHub · 2026-11-24 19:53 UTC · original

Linux/RADV update: the shader side is now clean, and the stop moved into vkd3d-proton.

Build: ffe310e + #994 + #491 + #1583 + #1319 + #1402 (also tried with #1548 on top, same result). Wine 11.22 in a Proton 11.0 prefix, vkd3d-proton from that Proton, RADV from Mesa 26.3.1, RX 7600 XT.

What improved:

  • with #1319 + #1402 the pixel translation errors are gone entirely in the intro and menus (was: lane-mask reads and a packed half);
  • the world's mesh program 63083c777948927a translates now, so its 4-5 draws/frame are no longer dropped;
  • run reaches 202-755 draws/frame in the prologue, 202 mesh pipelines built, VICTORY_PIPELINE_JOURNAL=1 refuses 9 pipelines as before.

What stops it now: 0xc0000005 in d3d12core.dll (vkd3d-proton), at +0x21953c (read 0x118: nothing mapped there) and +0x1c0e19 (read 0x8). It is repeatable: every run that gets past the menu dies there after building a few hundred pipelines, independent of #1548. The same tree without the shader bundles dies earlier in the same d3d12core addresses.

Questions:

  • Is this a known vkd3d-proton fault on RADV (something like a null descriptor set / mesh pipeline path), or should I bisect the last successful pipeline before the fault?
  • Would vkd3d-proton master (as pablogonz12 used) be expected to fix it, or is Proton 11.0's build the right baseline?

I can dump the pipeline hash/stage that is being created right before the fault if that helps.

**@⁠YaBulochka** on GitHub · 2026-11-24 19:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7142732411) Linux/RADV update: the shader side is now clean, and the stop moved into vkd3d-proton. Build: `ffe310e` + #994 + #491 + #1583 + #1319 + #1402 (also tried with #1548 on top, same result). Wine 11.22 in a Proton 11.0 prefix, vkd3d-proton from that Proton, RADV from Mesa 26.3.1, RX 7600 XT. What improved: - with #1319 + #1402 the **pixel translation errors are gone entirely** in the intro and menus (was: lane-mask reads and a packed half); - the world's mesh program `63083c777948927a` translates now, so its 4-5 draws/frame are no longer dropped; - run reaches 202-755 draws/frame in the prologue, 202 mesh pipelines built, `VICTORY_PIPELINE_JOURNAL=1` refuses 9 pipelines as before. What stops it now: `0xc0000005` in **`d3d12core.dll`** (vkd3d-proton), at `+0x21953c` (read `0x118: nothing mapped there`) and `+0x1c0e19` (read `0x8`). It is repeatable: every run that gets past the menu dies there after building a few hundred pipelines, independent of #1548. The same tree without the shader bundles dies earlier in the same `d3d12core` addresses. Questions: - Is this a known vkd3d-proton fault on RADV (something like a null descriptor set / mesh pipeline path), or should I bisect the last successful pipeline before the fault? - Would `vkd3d-proton` master (as pablogonz12 used) be expected to fix it, or is Proton 11.0's build the right baseline? I can dump the pipeline hash/stage that is being created right before the fault if that helps.
Author
Owner

@⁠adnanoos on GitHub · 2026-11-24 20:01 UTC · original

On NVIDIA, resync_title_writes holds the boot for about two minutes: it mirrors slots past the capped host heap. One-bound fix below.

Found while testing #1520 (which includes this PR) on an RTX 5060 Laptop GPU (driver 32.0.16.2124, Windows 11 Pro 26200, title 1.0.2.1).

What happens. NVIDIA caps a shader-visible view heap at 1,000,000 descriptors; the title asks 1,245,184, so HostHeap gets fewer title slots (count()). resync_title_writes walks every slot of each written 64 KiB block up to heap.desc.count, the title's size, and calls HostHeap::mirror on each. For every slot past the host heap, mirror logs title slot past the host heap as a new highest slot, since the walk goes in order. That is 376,256 lines at boot, about 0.3 ms each, before the first frame. On AMD (and under Proton) the heap is not capped, so this never shows.

Measured (#1520 at 2190efe, release --features diagnostics, same machine, launch to first frame):

build launch → first frame title slot past the host heap lines log lines
as is 2m03s 376,256 382,836
as is, that warning muted (VICTORY_LOG) 7 s 0 9,017
with the patch below, normal logging 7.4 s 0 4,314

During those two minutes the window shows "Not Responding". Main does not have this, because it has no resync_title_writes.

Patch (on this PR's head 993dff8; clippy clean, victory-gpu descriptor tests pass):

         let before = heap.synced.swap(now, Relaxed);
         let step = u64::from(step);
+        // Only slots the host heap has room for: past a capped host heap
+        // (NVIDIA's 1,000,000 views; Grand Theft Auto VI asks 1,245,184)
+        // there is nothing to make, and mirroring each such slot logged
+        // "title slot past the host heap" 376k times at boot.
+        let slots = u64::from(heap.desc.count.min(host.count()));
         for (p, asked) in written {
             if asked <= before {
                 continue;
             }
             let from = (p as u64 * page).max(start);
             let to = ((p as u64 + 1) * page).min(end);
-            for i in (from - start) / step..(to - start).div_ceil(step) {
-                let i = i as u32;
-                if i < heap.desc.count {
-                    host.mirror(i, start + u64::from(i) * step, false);
-                }
+            for i in (from - start) / step..(to - start).div_ceil(step).min(slots) {
+                host.mirror(i as u32, start + i * step, false);
             }
         }

Slots past count() have no host slot, so skipping them changes nothing for rendering; mirror returned None for them before. Happy to open this as a PR on top of this branch instead if you prefer.

**@⁠adnanoos** on GitHub · 2026-11-24 20:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7142930007) **On NVIDIA, `resync_title_writes` holds the boot for about two minutes: it mirrors slots past the capped host heap. One-bound fix below.** Found while testing #1520 (which includes this PR) on an RTX 5060 Laptop GPU (driver 32.0.16.2124, Windows 11 Pro 26200, title 1.0.2.1). **What happens.** NVIDIA caps a shader-visible view heap at 1,000,000 descriptors; the title asks 1,245,184, so `HostHeap` gets fewer title slots (`count()`). `resync_title_writes` walks every slot of each written 64 KiB block up to `heap.desc.count`, the *title's* size, and calls `HostHeap::mirror` on each. For every slot past the host heap, `mirror` logs `title slot past the host heap` as a new highest slot, since the walk goes in order. That is 376,256 lines at boot, about 0.3 ms each, before the first frame. On AMD (and under Proton) the heap is not capped, so this never shows. **Measured** (#1520 at `2190efe`, release `--features diagnostics`, same machine, launch to first frame): | build | launch → first frame | `title slot past the host heap` lines | log lines | |---|---:|---:|---:| | as is | **2m03s** | 376,256 | 382,836 | | as is, that warning muted (`VICTORY_LOG`) | 7 s | 0 | 9,017 | | **with the patch below**, normal logging | **7.4 s** | **0** | 4,314 | During those two minutes the window shows "Not Responding". Main does not have this, because it has no `resync_title_writes`. **Patch** (on this PR's head `993dff8`; clippy clean, `victory-gpu` descriptor tests pass): ```diff let before = heap.synced.swap(now, Relaxed); let step = u64::from(step); + // Only slots the host heap has room for: past a capped host heap + // (NVIDIA's 1,000,000 views; Grand Theft Auto VI asks 1,245,184) + // there is nothing to make, and mirroring each such slot logged + // "title slot past the host heap" 376k times at boot. + let slots = u64::from(heap.desc.count.min(host.count())); for (p, asked) in written { if asked <= before { continue; } let from = (p as u64 * page).max(start); let to = ((p as u64 + 1) * page).min(end); - for i in (from - start) / step..(to - start).div_ceil(step) { - let i = i as u32; - if i < heap.desc.count { - host.mirror(i, start + u64::from(i) * step, false); - } + for i in (from - start) / step..(to - start).div_ceil(step).min(slots) { + host.mirror(i as u32, start + i * step, false); } } ``` Slots past `count()` have no host slot, so skipping them changes nothing for rendering; `mirror` returned `None` for them before. Happy to open this as a PR on top of this branch instead if you prefer.
Author
Owner

@⁠theDVNVS on GitHub · 2026-11-25 00:07 UTC · original

THANKS!

**@⁠theDVNVS** on GitHub · 2026-11-25 00:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7148163675) THANKS!
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:29 UTC · original

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.

**@⁠Marvisak** on GitHub · 2026-11-25 00:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7148567096) 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.
Author
Owner

@⁠andyeox-systemd on GitHub · 2026-11-26 05:51 UTC · original

NVIDIA data point for this branch: RTX 4070 Ti (Ada), Arch Linux, nvidia-open-dkms 620.73.04, system Wine 11.22, DXVK dxgi. The world draws in full (roads, buildings, props, characters, seen with VICTORY_DEBUG_PS=1 and VICTORY_SHOW_TARGET=2560x1440-f28-3); the lit image is dark, as noted above.

What NVIDIA needed on top of 993dff8:

  • vkd3d-proton master (71cae091). Proton Experimental's build here reported 3.1.0, and with it the title crashes in vkCreateComputePipelines: spirv-val shows invalid control flow from dxil-spirv's old structurizer, while dxv accepts our DXIL.
  • #177 (heap handles keyed by element type). Without it, an atomic on a float-typed handle gives invalid AtomicOr/AtomicUMax SPIR-V and the same crash.
  • VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains. Without it, the world hung after about 4 minutes with Xid 13 ... MMU Fault in a compute pass; with it, no Xid in later runs.
  • #454 with VICTORY_NO_WATCHDOG=1, for the long frames of first runs.

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 e5a8c2f here, so that fix is confirmed on NVIDIA too.

AI-assisted. No game data attached.

**@⁠andyeox-systemd** on GitHub · 2026-11-26 05:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/994#issuecomment-7183865724) NVIDIA data point for this branch: RTX 4070 Ti (Ada), Arch Linux, `nvidia-open-dkms` 620.73.04, system Wine 11.22, DXVK `dxgi`. The world draws in full (roads, buildings, props, characters, seen with `VICTORY_DEBUG_PS=1` and `VICTORY_SHOW_TARGET=2560x1440-f28-3`); the lit image is dark, as noted above. What NVIDIA needed on top of `993dff8`: - **vkd3d-proton master** (`71cae091`). Proton Experimental's build here reported 3.1.0, and with it the title crashes in `vkCreateComputePipelines`: `spirv-val` shows invalid control flow from dxil-spirv's old structurizer, while `dxv` accepts our DXIL. - **#177** (heap handles keyed by element type). Without it, an atomic on a float-typed handle gives invalid `AtomicOr`/`AtomicUMax` SPIR-V and the same crash. - **`VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains`**. Without it, the world hung after about 4 minutes with `Xid 13 ... MMU Fault` in a compute pass; with it, no Xid in later runs. - **#454** with `VICTORY_NO_WATCHDOG=1`, for the long frames of first runs. 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 `e5a8c2f` here, so that fix is confirmed on NVIDIA too. AI-assisted. No game data attached.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!994
No description provided.