Repository navigation
GPU: no blending on integer render targets in host pipelines (port of upstream #806) - #51
FrancescoGelosoEterea wants to merge 1 commit into
Conversation
|
Independent test run on commit
AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report. |
|
Confirmed on the card in #26: the mesh pipeline this PR is about is created here, and its draws are no longer dropped. Setup: RTX 4060 Ti 8 GB, driver 32.0.16.1656, Windows 11, Ryzen 9 5900X;
The refused pair was No game data; counts only. |
|
Tested on an RX 9070 XT (Adrenalin 32.0.32029.2010), native Windows D3D12. This port fixes a world mesh pipeline that
|
|
Confirmed on an 8 GB NVIDIA card in Series S mode: with this PR the refused mesh pipeline builds and the first gameplay room has its walls. Setup
Before / after (two runs each)
The wall check is a screenshot of the window at the same moments of each run, plus the mean brightness of a strip at the left and right edges (about 100 on the left without the PR, 7 to 50 with it). The debug layer names the reason on this card too: One caveat: the walls are not missing in every run without the PR. In four other baseline runs tonight they were there once, so there is a second, intermittent cause (the stale pages discussed in #62). Two runs with the PR and walls both times is consistent with this PR fixing the pipeline's part; it does not show the intermittent one is gone. Not tested: Series X with this PR; more than two runs; anything past the first room. No game data. AI-assisted: Claude Code (Claude Fable 5.2) applied the commit, made the runs, read the logs and wrote this comment. |
Port the narrowly scoped graphics and mesh pipeline fix and its two regression tests from fxceless/victory-fork#51 (eb5061c), adapted to this fork's pipeline construction. That PR credits pablogonz12 for Marvisak#806 (169efcb), and FrancescoGelosoEterea for the secondary port and native NVIDIA verification. Windows MSVC workspace test compilation passed for this adaptation; no local native Windows execution.
The console ignores blending on UINT/SINT targets and titles leave it on, but D3D12 refuses such a pipeline with E_INVALIDARG and its draws are lost. Desc and stream pipelines now turn BlendEnable off on integer targets, splitting a shared description into one per target so the others keep theirs; logged first 4 then powers of two. TUXBOX_INTEGER_TARGET_BLEND=1 keeps the title's blend state. Ported from VIctory-zhai 3716dd5 (from fxceless/victory-fork#51 and Marvisak/VIctory#806; GPL-3.0), credit to pablogonz12, FrancescoGelosoEterea and their authors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested on AMD RDNA4 (RX 9070 XT, Windows 10): the same mesh pipeline is refused there without this PR and created with it. Setup: RX 9070 XT, driver 32.0.32029.2010, Windows 10 IoT Enterprise LTSC 21H2 (19044) with the Agility SDK runtime (#420), release build, Series X profile, no
AI use: Claude Code (Claude Opus 5.5) read the logs and wrote this; the runs are on my machine. |
|
The "first room's walls are still missing in some launches" known issue in It has now been confirmed independently on five cards:
Since |
The console ignores blending on integer render targets and the title leaves it on (the world has a mesh pipeline blending into an R8_UINT target). D3D12 does not allow it: vkd3d-proton refuses such a pipeline with E_INVALIDARG and its draws are lost. The host pipeline now turns blending off on integer targets; with one description for all targets, each target gets its own copy so the others keep theirs.
eb5061c to
d82acef
Compare
|
Independent RTX 5080 title check. Windows 11 Pro 26200, driver 617.14, Ryzen 9 5900X, 32 GB RAM, DRED and Series X profile. I applied PR 51 ( The earlier executable logged The five-minute controlled prison route averaged 4.565 presented FPS, 435.139 ms P99, and 711.421 ms worst. The previous staging-on run measured 4.579 FPS and 393.971 ms P99. The title responded to camera and movement input and ended deliberately, without a DRED device-removal report. Method and comparison. AI-assisted with OpenAI Codex. |
A refused XMemVirtualAlloc or XMemAllocDefault handed the title a null in silence, and the title then writes at null plus an offset, which reads like a title bug. In fxceless#289 the faulting write is at 0x217800, the request's length 0x2173a0 rounded up to 2 KiB, so the base it built on was most likely such a null. At the commit limit, XMemVirtualAlloc now writes the same crashes.log report the physical-page commit writes since fxceless#51 (the shared part is `commit_refused`); other refusals, and a host heap out of memory, are warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 65062e1)
A refused XMemVirtualAlloc or XMemAllocDefault handed the title a null in silence, and the title then writes at null plus an offset, which reads like a title bug. In fxceless#289 the faulting write is at 0x217800, the request's length 0x2173a0 rounded up to 2 KiB, so the base it built on was most likely such a null. At the commit limit, XMemVirtualAlloc now writes the same crashes.log report the physical-page commit writes since fxceless#51 (the shared part is `commit_refused`); other refusals, and a host heap out of memory, are warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 65062e1) (cherry picked from commit 52bb2e9)
The console ignores blending on integer render targets and the title leaves it on (the world has a mesh pipeline blending into an R8_UINT target). D3D12 does not allow it: such a pipeline is refused with E_INVALIDARG and its draws are lost. The host pipeline now turns blending off on integer targets; with one description for all targets, each target gets its own copy so the others keep theirs. Ported by hand from fxceless/victory-fork#51 (d82acef) to this tree's host.rs (one graphics and one mesh call site). On an RX 9070 XT this tree refused [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35], the first room's walls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The console ignores blending on integer render targets, and the title leaves it on: the world has a mesh pipeline that blends into an `R8_UINT` target. D3D12 does not allow that, so the host refuses the pipeline with `E_INVALIDARG` and every draw of it is lost — the first gameplay room's walls among them (the sky seen through them). `host_blend` takes the title's blend state as the host takes it: blending off on integer targets only. The console blending there is ignored, so the result is what the console drew. With one description for all targets, each target gets its own copy, so the others keep theirs. The state is left byte for byte as the title wrote it when no integer target blends, so no other pipeline's description changes. Used at both places a blend state goes into a host pipeline: the descriptor path and the stream path. Ported from Belobug/VIctory-Belobug-AMD#45, which is itself a port of `fxceless/victory-fork`fxceless#51 (pgm1207's commit): the same pipeline was seen failing on five cards, NVIDIA and AMD. Two tests taken with it. Verified without a compiler: `git diff --check` and a tree-sitter parse. Every `DXGI_FORMAT_*` name it asks about is already named in this tree, from the same `windows` 0.62 crate, so the constants resolve.
The console ignores blending on integer render targets and the title leaves it on (the world has a mesh pipeline blending into an R8_UINT target). D3D12 does not allow it: such a pipeline is refused with E_INVALIDARG and its draws are lost. The host pipeline now turns blending off on integer targets; with one description for all targets, each target gets its own copy so the others keep theirs. Ported by hand from fxceless/victory-fork#51 (d82acef) to this tree's host.rs (one graphics and one mesh call site). On an RX 9070 XT this tree refused [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35], the first room's walls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A refused XMemVirtualAlloc or XMemAllocDefault handed the title a null in silence, and the title then writes at null plus an offset, which reads like a title bug. In fxceless#289 the faulting write is at 0x217800, the request's length 0x2173a0 rounded up to 2 KiB, so the base it built on was most likely such a null. At the commit limit, XMemVirtualAlloc now writes the same crashes.log report the physical-page commit writes since fxceless#51 (the shared part is `commit_refused`); other refusals, and a host heap out of memory, are warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 65062e1)
… mesh pipeline) The console ignores blending on integer render targets and the title leaves it on (a mesh pipeline blending into an R8_UINT target); D3D12 refuses such a pipeline with E_INVALIDARG and its draws are lost. On the 780M every run logged "host mesh pipeline refused" for [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35], the first room's walls (10 of 10 stability runs). With this change: 0 refusals (run ambient-blend). From fxceless/victory-fork#51 (d82acef), as ported by pgm1207 in Belobug/VIctory-Belobug-AMD 8629211 (GPL-3.0-or-later); applied to both mesh stream paths of this tree, tests included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The console ignores blending on integer render targets and the title leaves it on (the world has a mesh pipeline blending into an R8_UINT target). D3D12 does not allow it: such a pipeline is refused with E_INVALIDARG and its draws are lost. The host pipeline now turns blending off on integer targets; with one description for all targets, each target gets its own copy so the others keep theirs. Ported by hand from fxceless/victory-fork#51 (d82acef) to this tree's host.rs (one graphics and one mesh call site). On an RX 9070 XT this tree refused [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35], the first room's walls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Confirmed on RDNA2: AMD Radeon RX 6600 (8 GB) with a Ryzen 7 9700X, Windows 11, release build, Series X profile, no
One thing this does not change on this card: the player's face in the world (black skin, eyes and earrings drawn) stays black with the PR, so that is a separate problem (see #264). |
…reads through quad reads Two fixes ported from Belobug/VIctory-Belobug-AMD (GPL-3.0-or-later): 1. `host_blend` in the host pipeline path (`8629211`, pull request Marvisak#45 by pgm1207, itself from fxceless/victory-fork#51): the console ignores blending on integer render targets and the title leaves it on (the world sets it on an R8_UINT target), but D3D12 refuses such a pipeline with E_INVALIDARG and its draws are lost. Blending is now off on those targets only, each target with its own copy of the description. Measured here: the mesh pipeline the log had refused at every launch (`mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35`, the first room's walls) is made now: `host mesh pipeline refused: 0` over a launch. 2. `helpers_read` in the pixel shader lowering (`03629f3`): a read of another lane of this lane's quad goes through quad reads in pixel shaders, helper lanes included. At a triangle's edge the quad's other pixels are helpers, and a wave read gives 0 from them, so a derivative taken by hand came out as the whole value, the texture read that used it took its smallest level, and edges showed as lines on car paint, glass and skin.
The console ignores blending on integer render targets and the title leaves it on (the world has a mesh pipeline blending into an R8_UINT target). D3D12 does not allow it: such a pipeline is refused with E_INVALIDARG and its draws are lost. The host pipeline now turns blending off on integer targets; with one description for all targets, each target gets its own copy so the others keep theirs. Ported by hand from fxceless/victory-fork#51 (d82acef) to this tree's host.rs (one graphics and one mesh call site). On an RX 9070 XT this tree refused [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35], the first room's walls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 8629211)
PR: fxceless#715 Head: 1bc4884 Chosen over fxceless#501 and fxceless#51 (the same fix): it also keys the pipeline's name in the library on the host's blend. Note: it also turns LogicOpEnable off on integer slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…MD GPUVM fix, mwaitx WaitOnAddress, bounded texture queue, int-target blend)
A refused XMemVirtualAlloc or XMemAllocDefault handed the title a null in silence, and the title then writes at null plus an offset, which reads like a title bug. In fxceless#289 the faulting write is at 0x217800, the request's length 0x2173a0 rounded up to 2 KiB, so the base it built on was most likely such a null. At the commit limit, XMemVirtualAlloc now writes the same crashes.log report the physical-page commit writes since fxceless#51 (the shared part is `commit_refused`); other refusals, and a host heap out of memory, are warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 65062e1)
Adapt the behavior demonstrated by pgm1207 and Arvi23 in Belobug/VIctory-Belobug-AMD@86292110 and fxceless/victory-fork#51. Reuse the existing format classifier and key both host pipeline paths on their effective blend state.
A refused XMemVirtualAlloc or XMemAllocDefault handed the title a null in silence, and the title then writes at null plus an offset, which reads like a title bug. In fxceless#289 the faulting write is at 0x217800, the request's length 0x2173a0 rounded up to 2 KiB, so the base it built on was most likely such a null. At the commit limit, XMemVirtualAlloc now writes the same crashes.log report the physical-page commit writes since fxceless#51 (the shared part is `commit_refused`); other refusals, and a host heap out of memory, are warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 65062e1)
Why
The title leaves blending enabled on an integer render target (
R8_UINT) in one world mesh pipeline. The console ignores blending there; D3D12 does not allow it, soCreatePipelineStatereturnsE_INVALIDARGand every draw of that pipeline is dropped:This is the refused mesh pipeline reported in #26 (RTX 4060 Ti). It is refused on native Windows/NVIDIA as well, not only on vkd3d-proton.
What
This is pablogonz12's fix from Marvisak/VIctory#806 (commit
169efcb, authorship kept), ported onto this fork.host_blendinpipeline/host.rsbuilds the blend description the host pipeline gets, on both the graphics and the mesh path. It turns blending off on every render target in use whose format is*_UINTor*_SINT. WhenIndependentBlendEnableis off, each target first gets a copy of target 0's state, so the other targets keep blending as before. A blend state without integer blending is passed through unchanged.The only conflict was in
pipeline/host.rs, around this fork's rectangle-list geometry shader and its mesh-library test. Both are kept.Tested
RTX 5070 Ti, driver 621.24, Windows 11. Own 1.0.2.1 copy, Series X profile, diagnostics build on top of
90228a7(rebased onto4e17478afterwards; that commit changes only comments, and the tests pass there).cargo test -p victory-gpu --lib -- pipeline::host: 3 passed (the two new blend tests anda_mesh_pipeline_loads_from_the_library).host mesh pipeline shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]is created, with norefused [mesh f5e50…]drop lines. There is no device removal, and fps is unchanged (~4.1–4.2 withVICTORY_LATE_WAIT=1 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024).02384a60…,2da4beb3…,2cc4c197…,369cbe90…,6b82bc7d…) are the 64-lane ones from RTX 5060 Ti (Windows, native D3D12): d279e69 stable for 15 min, ~12.7 min in the world, up to 2.6 fps; 3 compute pipelines refused #7 and Shaders: restore parked lane-mask pairs a few instructions apart; relative VGPR reads keep parked lanes #11; this change does not touch them.Credit: the diagnosis and the fix are pablogonz12's (Marvisak/VIctory#806); I ported and tested them.