Repository navigation
Conversation
A title may describe blending on a render target whose format holds integers (this title's slot 2 is R8_UINT). The console's blend hardware ignores it; D3D12 refuses the whole pipeline instead — CreatePipelineState fails with E_INVALIDARG, and with the debug layer on: The render target format at slot 2 is format (R8_UINT). This format does not support blending. The Pixel Shader output signature indicates this output could be written, and the Blend State indicates blending is enabled for this slot. so every draw of that pipeline was dropped. `GraphicsState::host_blend()` clears BlendEnable for exactly those slots before the graphics and mesh pipelines are made, and `describe()` uses the same state so that a pipeline library name and the description stored under it agree.
DenRakEiw
approved these changes
Nov 25, 2026
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:
- Clearing blend enable only on integer render targets cleanly prevents D3D12 PSO validation rejection while leaving float/normalized targets untouched.
cargo test -p victory-gpu pipeline::host::tests: 3/3 passed on RTX 5090, 3/3 passed on WARP (includingblending_is_cleared_only_on_integer_targets).cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.
AI-assisted (Gemini 4 Neon).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The debug layer names the cause exactly:
A console title may describe blending on a slot whose format holds integers; the console's blend hardware ignores it, but D3D12 refuses the whole pipeline (
E_INVALIDARG), so every draw of that pipeline was dropped — part of the world's mesh objects never ran.What the fix does
GraphicsState::host_blend()clearsBlendEnablefor exactly the render targets whose format is an integer one (_UINT/_SINT, DXGI 3..64 —R8_UINTis 30 in DXGI numbering,R16G16_UINT37), and both pipeline paths — the plain graphics stream and the mesh stream — are built from it.describe()(the pipeline library name and the early-start key) uses the same state, so a library entry's name and the description stored under it still agree.Verification
blending_is_cleared_only_on_integer_targets: UNORM, FLOAT and R10G10B10A2_UNORM keep blending;R8_UINT,R16G16_UINTandR16G16_SINTlose it; a slot pastNumRenderTargetsis left as the title had it;describe()starts with the blend state the pipeline is made from.cargo test -p victory-gpu --features diagnostics --lib: 145 passed, 2 ignored, plus the known placed-view failure on a runtime withoutID3D12Device10(GPU tests: placed R32_UINT -> R9G9B9E5 view does not share its host texture (Windows 10, RX 7800 XT) #1999). clippy-D warningsclean.host mesh pipeline refused … [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]once per run, and the debug layer's "does not support blending" message. After the change, same build otherwise:host mesh pipeline shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35], zero refusals, and no blend message.