GPU: host pipelines keep blending on integer render targets; vkd3d-proton refuses them (fix on a branch) #806

Closed
opened 2026-11-26 04:14:00 +00:00 by github-bot · 7 comments
Owner

@⁠pablogonz12 on GitHub · 2026-11-24 11:19 UTC · original

Fix ready on a branch: pablogonz12:gpu-no-blend-on-integer-targets (one commit 169efcb on main ffe310e, +122/-2, pipeline/host.rs only). 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:

err:vkd3d-proton:d3d12_pipeline_state_validate_blend_state: Enabling blending on RT 2 with format DXGI_FORMAT_R8_UINT, but using integer format is not supported.
WARN victory_gpu::pipeline::host: host mesh pipeline refused error=Invalid parameter. (0x80070057) shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]

That is a world mesh pipeline, so its draws were dropped on Linux.

host_blend in pipeline/host.rs builds 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 has IndependentBlendEnable off, 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

  • RX 9070 XT, RADV (Mesa 26.3.1), CachyOS, GE-Proton11-14 with vkd3d-proton master (30b0eb9), diagnostics build, into the world:
    • before: the pipeline above refused (1 refusal, the vkd3d-proton error above);
    • after: the same pipeline is created; no refusal and no integer-blend error in the run.
  • New tests integer_targets_do_not_blend and blend_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

  • Native Windows. Drivers there seem to accept the state; this only changes pipelines that blend into an integer target, where blending has no effect anyway.
**@⁠pablogonz12** on GitHub · 2026-11-24 11:19 UTC · [original](https://github.com/Marvisak/VIctory/issues/806) Fix ready on a branch: [pablogonz12:gpu-no-blend-on-integer-targets](https://github.com/Marvisak/VIctory/compare/main...pablogonz12:VIctory:gpu-no-blend-on-integer-targets) (one commit `169efcb` on `main` `ffe310e`, +122/-2, `pipeline/host.rs` only). 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: ``` err:vkd3d-proton:d3d12_pipeline_state_validate_blend_state: Enabling blending on RT 2 with format DXGI_FORMAT_R8_UINT, but using integer format is not supported. WARN victory_gpu::pipeline::host: host mesh pipeline refused error=Invalid parameter. (0x80070057) shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35] ``` That is a world mesh pipeline, so its draws were dropped on Linux. `host_blend` in `pipeline/host.rs` builds 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 has `IndependentBlendEnable` off, 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 - RX 9070 XT, RADV (Mesa 26.3.1), CachyOS, GE-Proton11-14 with vkd3d-proton master (`30b0eb9`), diagnostics build, into the world: - before: the pipeline above refused (1 refusal, the vkd3d-proton error above); - after: the same pipeline is created; no refusal and no integer-blend error in the run. - New tests `integer_targets_do_not_blend` and `blend_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 - Native Windows. Drivers there seem to accept the state; this only changes pipelines that blend into an integer target, where blending has no effect anyway.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:14:00 +00:00
Author
Owner

@⁠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 --lib passed 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.

Adapter Windows driver Original Patched
Intel UHD Graphics 32.0.101.7088 E_INVALIDARG S_OK
NVIDIA GeForce RTX 3050 Ti Laptop GPU 32.0.16.1074 E_INVALIDARG S_OK
Microsoft Basic Render Driver software E_INVALIDARG S_OK

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.

**@⁠Jxyden34** on GitHub · 2026-11-24 11:28 UTC · [original](https://github.com/Marvisak/VIctory/issues/806#issuecomment-7130138428) Native Windows check of 169efcb on Windows 11 build 26300. On the unmodified branch, `cargo test --locked -p victory-gpu --lib` passed 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. | Adapter | Windows driver | Original | Patched | |---|---|---|---| | Intel UHD Graphics | 32.0.101.7088 | E_INVALIDARG | S_OK | | NVIDIA GeForce RTX 3050 Ti Laptop GPU | 32.0.16.1074 | E_INVALIDARG | S_OK | | Microsoft Basic Render Driver | software | E_INVALIDARG | S_OK | 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.
Author
Owner

@⁠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_blend path 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 as 0x6d from 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.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 11:31 UTC · [original](https://github.com/Marvisak/VIctory/issues/806#issuecomment-7130210440) 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_blend` path 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 as `0x6d` from 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.
Author
Owner

@⁠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 ignored
    • cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warnings
    • cargo xtask policy: 154 files ok
  • Verdict: The implementation is clean, sound, and directly resolves the issue.

Key highlights of the review:

  1. integer_format comprehensively covers all DXGI UINT/SINT render target formats.
  2. Handling of !IndependentBlendEnable is spot-on: duplicating RT0 across all active slots before zeroing BlendEnable on integer targets ensures non-integer targets retain their intended blend modes without side effects.
  3. The translation is properly wired into both regular graphics pipelines and stream-based mesh pipelines.
  4. The added unit tests (integer_targets_do_not_blend and blend_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)

**@⁠Xvania7** on GitHub · 2026-11-24 12:36 UTC · [original](https://github.com/Marvisak/VIctory/issues/806#issuecomment-7131685059) 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 ignored - `cargo clippy -p victory-gpu --all-targets -- -D warnings`: 0 warnings - `cargo xtask policy`: 154 files ok - **Verdict:** The implementation is clean, sound, and directly resolves the issue. Key highlights of the review: 1. `integer_format` comprehensively covers all DXGI UINT/SINT render target formats. 2. Handling of `!IndependentBlendEnable` is spot-on: duplicating RT0 across all active slots before zeroing `BlendEnable` on integer targets ensures non-integer targets retain their intended blend modes without side effects. 3. The translation is properly wired into both regular graphics pipelines and stream-based mesh pipelines. 4. The added unit tests (`integer_targets_do_not_blend` and `blend_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)
Author
Owner

@⁠CaravelaLabs on GitHub · 2026-11-24 13:05 UTC · original

@⁠pablogonz12 this also reproduces on a Radeon 8060S, and the blend state from host_blend is 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 with 0x80070057. Each time vkd3d-proton logged Enabling 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. On 169efcb (parent is current main ffe310e) host_blend turned independent blend on and left blending enabled only on the first two targets; that pipeline was created.

cargo test -p victory-gpu --lib -- --skip warp is 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.

**@⁠CaravelaLabs** on GitHub · 2026-11-24 13:05 UTC · [original](https://github.com/Marvisak/VIctory/issues/806#issuecomment-7132331965) @⁠pablogonz12 this also reproduces on a Radeon 8060S, and the blend state from `host_blend` is 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 with `0x80070057`. Each time vkd3d-proton logged `Enabling 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. On `169efcb` (parent is current main `ffe310e`) `host_blend` turned independent blend on and left blending enabled only on the first two targets; that pipeline was created. `cargo test -p victory-gpu --lib -- --skip warp` is 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.
Author
Owner

@⁠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:29 UTC · [original](https://github.com/Marvisak/VIctory/issues/806#issuecomment-7151964218) 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.
Author
Owner

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

**@⁠lucaseddd** on GitHub · 2026-11-25 03:34 UTC · [original](https://github.com/Marvisak/VIctory/issues/806#issuecomment-7152044251) 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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:54 UTC · original

Automated triage for the maintainers.

Confirmed on main: crates/victory-gpu/src/pipeline/host.rs passes the title's blend description to the host unchanged (BlendState: g.blend for 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 with E_INVALIDARG too.

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

**@⁠Marvisak** on GitHub · 2026-11-25 03:54 UTC · [original](https://github.com/Marvisak/VIctory/issues/806#issuecomment-7152345178) <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-25T03:34:42Z at=2026-11-25T03:54:07Z --> Automated triage for the maintainers. Confirmed on `main`: `crates/victory-gpu/src/pipeline/host.rs` passes the title's blend description to the host unchanged (`BlendState: g.blend` for 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 with `E_INVALIDARG` too. 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](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#806
No description provided.