GPU: no blending on integer render targets in host pipelines (port of upstream #806) #51
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/51"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by FrancescoGelosoEterea on 2026-11-24T20:57:43Z.
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 #7 and #11; this change does not touch them.Credit: the diagnosis and the fix are pablogonz12's (Marvisak/VIctory#806); I ported and tested them.
Imported from fxceless/victory-fork. Originally posted by adriaespii on 2026-11-24T21:14:32Z.
Independent test run on commit
eb5061c(AMD RDNA4):x86_64-pc-windows-msvc)cargo clippy --workspace --all-targets -- -D warnings: 0 warningscargo test --workspace: 498 passed, 0 failed, 7 ignored (victory-gpu: 112 passed, 0 failed, 1 ignored;victory-shader: 210 passed, 0 failed, 2 ignored)AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report.
Imported from fxceless/victory-fork. Originally posted by rocobalt1 on 2026-11-24T22:44:24Z.
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;
4e17478+ #32 + #86 + #77 + #81 + #9 + #40 + #83 + #38 + this PR (e05ea2a), diag build,--console series-x,VICTORY_DISPLAY_MODE=1920x1080,VICTORY_SHADER_LOOP_LIMIT=256,VICTORY_NO_WATCHDOG=1, fresh data dir.TdrDelay=60.host pipeline refused ... shaders=[mesh ...]linesdoes not translate)The refused pair was
shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35], i.e. the same one the description names, so theR8_UINTblend diagnosis holds on the 8 GB part too.No game data; counts only.
Imported from fxceless/victory-fork. Originally posted by icecreammule277-dot on 2026-11-24T23:02:25Z.
Tested on an RX 9070 XT (Adrenalin 32.0.32029.2010), native Windows D3D12.
This port fixes a world mesh pipeline that
CreatePipelineStaterefused withE_INVALIDARG: the title leaves blending enabled on an integer render target, and the described [upstream #806] path turns it off there. The refused pipeline's draws were the missing walls — with the port the pipeline builds and the walls render.host_blendturning off only the integer slots (and, whenIndependentBlendEnableis off, first copyingRenderTarget[0]to every slot) is exactly right: it is a no-op for every non-integer target, since D3D12 already appliedRenderTarget[0]to them.Imported from fxceless/victory-fork. Originally posted by sagouindupm on 2026-11-25T00:29:20Z.
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
--console series-s, no other switch.mainat2119b0e+ #32 + #188 + #86 (not enabled in these runs), theneb5061cfrom this PR cherry-picked on top (no conflict).Before / after (two runs each)
host mesh pipeline refusedlines[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35],E_INVALIDARG)host pipeline refusedlines in allThe 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:
CreateGraphicsPipelineState: The render target format at slot 2 is format (R8_UINT). This format does not support blending ... the Blend State indicates blending is enabled for this slot(id 676).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.
Imported from fxceless/victory-fork. Originally posted by Arvi23 on 2026-11-25T01:10:36Z.
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
VICTORY_*switches.31714de+ #420's first commit + the #120 patch + #58):host mesh pipeline refused error=0x80070057 shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35], first bound at frame 1113 as gameplay starts. It was the only refused pipeline in the run.a803c87+ #420.AI use: Claude Code (Claude Opus 5.5) read the logs and wrote this; the runs are on my machine.
Imported from fxceless/victory-fork. Originally posted by FrancescoGelosoEterea on 2026-11-25T01:46:00Z.
The "first room's walls are still missing in some launches" known issue in
c96b4f2looks like the problem this PR fixes. The walls are the draws of the refused mesh pipeline[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35](blending left on anR8_UINTtarget).It has now been confirmed independently on five cards:
Since
c96b4f2(the depth bounds change) it conflicts inpipeline/host.rs. I'll rebase it onto currentmain.bare_command_costsays about the indirect clamp #696Imported from fxceless/victory-fork. Originally posted by iGoldenNinja on 2026-11-25T05:31:39Z.
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 (
d82acef) to diagnostic PR 688 (7e7bb18), keeping the archive reader, replay, relay and inline staging settings from the prior run. Both builds logged zero shader-cache hits during startup.The earlier executable logged
0x80070057formesh f5e50eb2108c425b / pixel ce3f0432a08f1d35. The patched executable logged successful host acceptance of that exact pair and no refusal for it. The matched post-retreat interior capture still showed large wall and ceiling gaps. This verifies the pipeline acceptance on this GPU, with the remaining room geometry issue still open.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.
Imported from fxceless/victory-fork. Originally posted by Andry018 on 2026-11-25T16:20:50Z.
Confirmed on RDNA2: AMD Radeon RX 6600 (8 GB) with a Ryzen 7 9700X, Windows 11, release build, Series X profile, no
VICTORY_*switches.d82acefcherry-picks cleanly onto currentmain(0b0074e). Onmainalone, the world mesh pipeline this PR is about was refused withE_INVALIDARGin every run today (12 of 12). With the PR, it is created in both runs (2 of 2) and nothing else is refused. Frame time is unchanged, about 280-290 ms/frame in the prologue cell, and there was no device loss.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).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.