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
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.
|
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>
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.