GPU: host pipelines keep blending on integer render targets; vkd3d-proton refuses them (fix on a branch) #806
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#806
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@pablogonz12 on GitHub · 2026-11-24 11:19 UTC · original
Fix ready on a branch: pablogonz12:gpu-no-blend-on-integer-targets (one commit
169efcbonmainffe310e, +122/-2,pipeline/host.rsonly). GitHub doesn't let me open a PR on this repo, so here it is as an issue; happy to open the PR if that becomes possible.What
The title leaves blending enabled on integer render targets. The console ignores it there, but D3D12 does not allow it, and vkd3d-proton refuses the whole pipeline:
That is a world mesh pipeline, so its draws were dropped on Linux.
host_blendinpipeline/host.rsbuilds the blend description the host pipeline gets (both the graphics and the mesh path): blending off on every render target in use whose format is*_UINT/*_SINT. When the title's description hasIndependentBlendEnableoff, each target gets a copy of target 0's state first, so the other targets keep blending as before. Any state without integer blending is passed through unchanged.Tested
30b0eb9), diagnostics build, into the world:integer_targets_do_not_blendandblend_states_without_integer_blending_are_kept.cargo test -p victory-gpu --lib: 52 passed, 0 failed (run under Wine).cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean.Not tested
@Jxyden34 on GitHub · 2026-11-24 11:28 UTC · original
Native Windows check of 169efcb on Windows 11 build 26300. On the unmodified branch,
cargo test --locked -p victory-gpu --libpassed 52 tests, 0 failed, 1 ignored, including both new blend-state tests.I also ran a synthetic graphics PSO through CreateGraphicsPipelineState with three targets (R8G8B8A8_UNORM, R16G16B16A16_FLOAT, R8_UINT), matching pixel shader output types, and a shared blend description with alpha blending enabled. In the same process on each adapter I submitted the original blend descriptor, then the descriptor returned by this commit's host_blend, keeping the shaders and all other pipeline fields identical.
This verifies native Windows graphics pipeline creation. The probe used Agility SDK 1.620.2. Debug-layer initialization returned DXGI_ERROR_SDK_COMPONENT_MISSING (0x887A002D), so the table records API results only. The mesh pipeline and in-game rendering remain untested here. AI-assisted testing.
@MichaelSmithAI on GitHub · 2026-11-24 11:31 UTC · original
We checked the pixels from a mixed-target draw on RTX 4090 under Wine/GE vkd3d-proton 3.2. With one shared guest blend description, the production
host_blendpath enabled the RGBA8 target to blend red over its blue clear and disabled blending on the R8_UINT target. All 16 RGBA8 pixels read back as[64, 0, 255, 255]; all 16 R8_UINT pixels read back as0x6dfrom the same draw.This was a source-built graphics pipeline on our integrated branch. It confirms that the normalized state produces both intended outputs in that case. Pablo’s title test establishes creation of the named mesh pipeline; its contribution to the presented world image remains unmeasured.
@Xvania7 on GitHub · 2026-11-24 12:36 UTC · original
Thanks to @Jxyden34 and @MichaelSmithAI for the prior Windows and pixel readback verifications.
To add to this, I also ran an independent verification locally on Windows (commit
169efcb):Build & Tests: All checks pass cleanly:
cargo test -p victory-gpu: 52 passed, 0 failed, 1 ignoredcargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warningscargo xtask policy: 154 files okVerdict: The implementation is clean, sound, and directly resolves the issue.
Key highlights of the review:
integer_formatcomprehensively covers all DXGI UINT/SINT render target formats.!IndependentBlendEnableis spot-on: duplicating RT0 across all active slots before zeroingBlendEnableon integer targets ensures non-integer targets retain their intended blend modes without side effects.integer_targets_do_not_blendandblend_states_without_integer_blending_are_kept) cover both independent and shared blend states as well as passthrough paths.LGTM, ready to merge. (Note: AI-assisted verification)
@CaravelaLabs on GitHub · 2026-11-24 13:05 UTC · original
@pablogonz12 this also reproduces on a Radeon 8060S, and the blend state from
host_blendis accepted here.Wine 11.22, vkd3d-proton 3.1, Mesa 25.2.8 RADV (GFX1151). No game files. A graphics pipeline with one shared alpha-blend description and three targets, the third
R8_UINT, was refused three times with0x80070057. Each time vkd3d-proton loggedEnabling blending on RT 2 with format DXGI_FORMAT_R8_UINT, but using integer format is not supported.The same shaders with blending off were created, and so was a pipeline blending into three UNORM targets, so this is that check. On169efcb(parent is current mainffe310e)host_blendturned independent blend on and left blending enabled only on the first two targets; that pipeline was created.cargo test -p victory-gpu --lib -- --skip warpis 49 passed / 2 failed on that commit and 47 passed / 2 failed on main. The two extra passes are the new blend-state tests. The two failures are the same as main on this machine (Wine cannot compile the argument-clamp shader; a rejected pipeline-library blob is not empty). Not from this change. The device was the Radeon 8060S, not a run that skipped for lack of a GPU.This is graphics pipeline creation only. I don't have a mesh shader compiler, so I didn't build the mesh pipeline from the log. @Jxyden34 already checked native Windows creation, and @MichaelSmithAI checked the pixels on an RTX 4090 with vkd3d-proton 3.2. Thanks for those.
AI-assisted verification, run on this machine.
@lucaseddd on GitHub · 2026-11-25 03:29 UTC · original
Confirmed the same mesh/pixel pipeline failure on native Windows 10, RTX 3060 Laptop 6 GB, using fxceless/victory-fork at
c96b4f2. Before the change the host rejected mesh f5e50eb2108c425b + pixel ce3f0432a08f1d35 with E_INVALIDARG (0x80070057). After adapting Xeltax/VIcky#9 to that same fork revision the host successfully created that exact pair. All three focused blend tests passed.One integration detail on
c96b4f2: mesh pipeline creation now has separate depth-stencil and depth-bounds streams. Both need the normalized blend description, as does ordinary graphics pipeline creation. This verifies pipeline creation; it does not establish a frame-rate gain or a fix for indirect lighting.@lucaseddd on GitHub · 2026-11-25 03:34 UTC · original
Visual follow-up from the same RTX 3060 Laptop run: the tester now sees improved rendering after the integer-target blend fix. In the opening scene, local captures show the sky, trees and building silhouettes, while much of the foreground and character remains black. The tester also reports black textures and missing-looking areas of the map. We have not verified every wall or matched the camera frame-for-frame.
Three later world samples measured 1.4 to 1.7 FPS at about 4,000 to 6,600 draws/frame, with 0 to 4 pipelines being built. The visible improvement and the successful creation of the formerly rejected mesh pipeline are reproducible observations from this run; large dark areas persist even with the compilation queue nearly empty.
@Marvisak on GitHub · 2026-11-25 03:54 UTC · original
Automated triage for the maintainers.
Confirmed on
main:crates/victory-gpu/src/pipeline/host.rspasses the title's blend description to the host unchanged (BlendState: g.blendfor graphics, the blend subobject for mesh streams). Blending on an integer render target is therefore passed on. vkd3d-proton refuses it, and the comments show native Windows drivers (Intel, NVIDIA, WARP) refusing a synthetic case withE_INVALIDARGtoo.The fix is open as PR #1152 by the reporter, with Windows, Wine and pixel-readback checks in the comments above. Review continues there.
Generated by Claude Code
0x80070057/ D3D12id=676):BlendOp=MAXenabled onDXGI_FORMAT_R8_UINTRT slot 2 ([mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]) #2775