GPU: no blending on integer render targets in host pipelines #2040
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2042"
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 Marvisak/VIctory. Originally posted by Deilach on 2026-11-25T04:01:37Z.
What
Host pipelines no longer enable blending on integer render targets (
_UINT/_SINT). Without independent blending, target 0's blend state is first copied to each target so that only the integer targets change. Pipelines without such a target are passed through unchanged.Why
One of the world's mesh pipelines enables blending on an
R8_UINTrender target. D3D12 leaves blending on integer formats undefined. The Windows driver accepts it, but vkd3d-proton (D3D12 on Vulkan, used by Wine/Proton on Linux) follows the rule and refuses the whole pipeline:So on Linux every draw using it was dropped, leaving world geometry missing in the distance. The console's colour blocks bypass blending for integer formats anyway, so turning it off on the host matches the console's behaviour.
Testing
On Linux (RX 9070 XT, RADV, Wine 11.22 + vkd3d-proton master):
translate --cache --pipelines: 1 pipeline refused before, 0 after.pipeline::host::tests::integer_targets_do_not_blend.cargo clippy --workspace --all-targets [--all-features] -- -D warningsis clean.victory-gpuandvictory-shadertests under Wine: same results asmainplus the new test. The 75 tests that need WARP ordxil.dllfail in Wine onmaintoo.I haven't tested this on Windows. It only changes pipelines that blend into integer targets, where the Windows result was already undefined.
🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-25T04:06:10Z.
Triage verdict — Confirmed duplicate of #1152 (
605e1af)Evidence
Checks and limits
Next step
This verification was AI-assisted.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T04:06:51Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC):cargo test -p victory-gpu --lib pipeline::— 16 passed, 0 failed on both RTX 5090 hardware andVICTORY_D3D12_WARP=1(includinginteger_targets_do_not_blend)cargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— ok (183 files ok)Clean
host_blend()disabling blending on integer render targets per D3D12 requirements, with targeted unit test coverage. Looks good.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T04:17:27Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
No blending on integer render targets in host pipelines — D3D12-correct (integer formats don't blend); good conformance fix.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T04:41:43Z.
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
605e1af.victory-gpu: 142 passed, 2 failed, 2 ignored; the newinteger_targets_do_not_blendpasses. The 2 failures are #1744's heap-cap failures onmain. Same asmainon this hardware.Overlap, from reading: #1152 (open, MERGEABLE, triaged as a merge candidate) makes the same change in
pipeline/host.rs. It turns blending off on_UINT/_SINTtargets, and whenIndependentBlendEnableis off it first copies target 0's state to each target. The difference: this PR reusestwin::integerfor the format check, while #1152 adds its own list of 25 formats. Only one of the two needs to merge.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T09:19:12Z.
Automated triage for the maintainers.
Proposed close. This duplicates #1152, an earlier open PR for #806 that merges cleanly into current
main. #1152 makes the same change incrates/victory-gpu/src/pipeline/host.rs: ahost_blendthat turns blending off on_UINT/_SINTrender targets and first copies target 0's state to every target whenIndependentBlendEnableis off. It applies it to both the graphics and mesh pipeline paths, and its tests cover more cases (blend states that need no change are kept as they are).The independent Linux evidence here confirms the problem and the fix, thank you. One idea worth carrying over to #1152 is reusing
twin::integer(madepub(crate)here) instead of a second format list.Smaller issue in this version:
host_blendwas inserted betweendescribe's doc comment anddescribe. That giveshost_blendboth doc comments and leavesdescribewith none.This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the label.
CI: not run on this head (no check runs reported).
Generated by Claude Code
upstream-sync referenced this pull request2026-11-25 16:09:36 +00:00
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.