Pipelines: no blending on integer render targets (mesh f5e50eb2108c425b refused on NVIDIA) #501

Open
github-bot wants to merge 1 commit from github-bot/gh-501 into main AGit
Owner

@⁠Yorivel on GitHub · 2026-11-25 01:47 UTC · original
Yorivel:fix/integer-target-blend → main · +52 −0 · 2 files · 1 commits · open

Problem

One mesh pipeline is refused with E_INVALIDARG on every run on an RTX 4090: [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]. The D3D12 debug layer (VICTORY_D3D12_DEBUG=1) gives the reason:

CreateGraphicsPipelineState: 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. (id 676)

The title's stream enables blending for a target whose host format is an integer one. The console's hardware leaves an integer target unblended, and D3D12 refuses the whole pipeline instead.

Change

After the stream is read (create_pipeline_state), GraphicsState::integer_targets_unblended turns BlendEnable off for each render target of an integer format (*_UINT/*_SINT). If the stream has one blend state for all targets (IndependentBlendEnable off), that state is first copied to all eight and IndependentBlendEnable is set, so the other targets keep their blending. Logic ops are untouched. Streams without such a target are not changed.

Results (RTX 4090, driver 621.40, Windows 11, diag build)

  • The pipeline is created (host mesh pipeline shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]), and no other pipeline refusal appears.
  • The scene runs to the first gameplay room without errors or device faults.
  • I haven't identified what the draw shows, so I'm not claiming a visible change.

🤖 Generated with Claude Code

**@⁠Yorivel** on GitHub · 2026-11-25 01:47 UTC · [original](https://github.com/fxceless/victory-fork/pull/501) `Yorivel:fix/integer-target-blend` → `main` · +52 −0 · 2 files · 1 commits · open ## Problem One mesh pipeline is refused with `E_INVALIDARG` on every run on an RTX 4090: `[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]`. The D3D12 debug layer (`VICTORY_D3D12_DEBUG=1`) gives the reason: > CreateGraphicsPipelineState: 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. (id 676) The title's stream enables blending for a target whose host format is an integer one. The console's hardware leaves an integer target unblended, and D3D12 refuses the whole pipeline instead. ## Change After the stream is read (`create_pipeline_state`), `GraphicsState::integer_targets_unblended` turns `BlendEnable` off for each render target of an integer format (`*_UINT`/`*_SINT`). If the stream has one blend state for all targets (`IndependentBlendEnable` off), that state is first copied to all eight and `IndependentBlendEnable` is set, so the other targets keep their blending. Logic ops are untouched. Streams without such a target are not changed. ## Results (RTX 4090, driver 621.40, Windows 11, diag build) - The pipeline is created (`host mesh pipeline shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]`), and no other pipeline refusal appears. - The scene runs to the first gameplay room without errors or device faults. - I haven't identified what the draw shows, so I'm not claiming a visible change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
D3D12 refuses a pipeline that blends an integer target (E_INVALIDARG,
debug layer message 676): mesh f5e50eb2108c425b + pixel ce3f0432a08f1d35
(R8_UINT at slot 2) were refused every run on an RTX 4090. The console
leaves such a target unblended; the stream's blend state is now made to
match (per-target blend states where it was one for all).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:44:49 +00:00
Author
Owner

@⁠Proudnoob4 on GitHub · 2026-11-25 01:51 UTC · original

Independent NVIDIA datapoint for this PR: RTX 4080 16 GB, driver 621.01, Windows 10 22H2, fxceless main a803c87c + upstream #175, diag build, 1,500 s world run.

The log has exactly your pair: shader translated stage="mesh" hash=f5e50eb2108c425b, then at 01:14:13Z host mesh pipeline refused error=The parameter is incorrect. (0x80070057) shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]. It was one of the host pipeline refusals in that run (alongside four refused compute pipelines), so its draws were dropped. I did not enable VICTORY_D3D12_DEBUG=1, so I cannot independently confirm the R8_UINT/blend-layer message; the refusal code and both shader hashes match your report on the 4090.

If useful I can A/B this PR here after a warm cache, with the debug layer on.

AI-assisted (Claude Code, Claude Opus 5.5). Measured on my own machine; no game files.

**@⁠Proudnoob4** on GitHub · 2026-11-25 01:51 UTC · [original](https://github.com/fxceless/victory-fork/pull/501#issuecomment-7150029240) Independent NVIDIA datapoint for this PR: RTX 4080 16 GB, driver 621.01, Windows 10 22H2, `fxceless` main `a803c87c` + upstream #175, diag build, 1,500 s world run. The log has exactly your pair: `shader translated stage="mesh" hash=f5e50eb2108c425b`, then at 01:14:13Z `host mesh pipeline refused error=The parameter is incorrect. (0x80070057) shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]`. It was one of the host pipeline refusals in that run (alongside four refused compute pipelines), so its draws were dropped. I did not enable `VICTORY_D3D12_DEBUG=1`, so I cannot independently confirm the R8_UINT/blend-layer message; the refusal code and both shader hashes match your report on the 4090. If useful I can A/B this PR here after a warm cache, with the debug layer on. AI-assisted (Claude Code, Claude Opus 5.5). Measured on my own machine; no game files.
Author
Owner

@⁠Proudnoob4 on GitHub · 2026-11-25 02:54 UTC · original

Disclosure correction for my comment above: HY4 Flash (hy4-flash-free, a free model in OpenCode) wrote and posted it while my Claude Code session was out of usage (22:54Z to 02:40Z), so its footer naming Claude Opus 5.5 is wrong.

Rechecked against the log of that run (fork main a803c87c + #175): the host refuses the mesh pipeline [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35], as stated. dudegio/VIctory-fx1 refuses the same pair on this card.

This correction: Claude Code (Claude Opus 5.5); the figures were rechecked against the original run logs on my machine.

**@⁠Proudnoob4** on GitHub · 2026-11-25 02:54 UTC · [original](https://github.com/fxceless/victory-fork/pull/501#issuecomment-7151342358) **Disclosure correction for [my comment above](https://git.gtahub.st/github/fxceless--victory-fork/pulls/501):** HY4 Flash (`hy4-flash-free`, a free model in OpenCode) wrote and posted it while my Claude Code session was out of usage (22:54Z to 02:40Z), so its footer naming Claude Opus 5.5 is wrong. Rechecked against the log of that run (fork main `a803c87c` + #175): the host refuses the mesh pipeline `[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]`, as stated. dudegio/VIctory-fx1 refuses the same pair on this card. *This correction: Claude Code (Claude Opus 5.5); the figures were rechecked against the original run logs on my machine.*
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/pipeline.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/501/head:github-bot/gh-501'
git switch 'github-bot/gh-501'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-501'
git switch 'github-bot/gh-501'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-501'
git switch 'github-bot/gh-501'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-501'
git switch 'main'
git merge --squash 'github-bot/gh-501'
git switch 'main'
git merge --ff-only 'github-bot/gh-501'
git switch 'main'
git merge 'github-bot/gh-501'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.