GPU: no blending on integer render targets in host pipelines (the first room's walls) #45

Manually merged
github merged 1 commit from gh-pr/45/head into gh-pr/45/base 2026-11-26 03:34:28 +00:00
Owner

@⁠Arvi23 on GitHub · 2026-11-25 12:47 UTC · original
Arvi23:pr/integer-target-blend → main · +122 −2 · 1 files · 1 commits · merged 2026-11-25 13:57 UTC

The console ignores blending on integer render targets, and the title leaves it on: the world has a mesh pipeline that blends into an R8_UINT target. D3D12 doesn't allow that, so the driver refuses the pipeline with E_INVALIDARG and its draws are lost. On this tree that pipeline is [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35], and its draws are the first gameplay room's walls.

What

One commit, authored by pgm1207, ported by hand from fxceless/victory-fork#51 (itself a port of Marvisak/VIctory#806 by pablogonz12):

  • host_blend turns blending off on integer render targets only. With one blend description for all targets, each target gets its own copy, so the others keep the title's blending.
  • It is used at the two places here where a blend state goes into a host pipeline: the graphics pipeline and the mesh pipeline stream.
  • The PR's two unit tests are taken over: integer_targets_do_not_blend and blend_states_without_integer_blending_are_kept.

Tested

RX 9070 XT, driver 32.0.32029.2010, Windows 10 LTSC 21H2 (with the Agility SDK runtime from the other PR), diagnostics build, run as your README describes.

run tree refused pipelines first room
1 4cbe9d7 (+ Agility SDK) 1: host mesh pipeline refused error=0x80070057 shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35] walls missing (sky seen through them)
2 run 1 + this commit 0 (apart from 39f0e9aeb156a61c, the compile that never ends) walls drawn
6 71652a2 + this commit + the Windows 10 PR the same: only 39f0e9aeb156a61c; host mesh pipeline shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35] created whole room drawn, 2.7–3.0 fps, no crash
  • Others have confirmed the same pipeline is the walls on five cards, NVIDIA and AMD (see fxceless/victory-fork#51).
  • cargo test -p victory-gpu --lib on 71652a2 + this commit: the two new tests pass. 110 passed, 1 failed (depth_bounds_control_a_title_draw, which fails the same on 71652a2 alone).

Not tested: NVIDIA on this tree.

AI use: Claude Code (Claude Opus 5.5) ported the commit, ran the checks and wrote this. The runs are on my machine.

🤖 Generated with Claude Code

**@⁠Arvi23** on GitHub · 2026-11-25 12:47 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/45) `Arvi23:pr/integer-target-blend` → `main` · +122 −2 · 1 files · 1 commits · merged 2026-11-25 13:57 UTC The console ignores blending on integer render targets, and the title leaves it on: the world has a mesh pipeline that blends into an `R8_UINT` target. D3D12 doesn't allow that, so the driver refuses the pipeline with `E_INVALIDARG` and its draws are lost. On this tree that pipeline is `[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]`, and its draws are the first gameplay room's walls. ## What One commit, authored by pgm1207, ported by hand from fxceless/victory-fork#51 (itself a port of Marvisak/VIctory#806 by pablogonz12): - `host_blend` turns blending off on integer render targets only. With one blend description for all targets, each target gets its own copy, so the others keep the title's blending. - It is used at the two places here where a blend state goes into a host pipeline: the graphics pipeline and the mesh pipeline stream. - The PR's two unit tests are taken over: `integer_targets_do_not_blend` and `blend_states_without_integer_blending_are_kept`. ## Tested RX 9070 XT, driver 32.0.32029.2010, Windows 10 LTSC 21H2 (with the Agility SDK runtime from the other PR), diagnostics build, run as your README describes. | run | tree | refused pipelines | first room | |---|---|---|---| | 1 | `4cbe9d7` (+ Agility SDK) | 1: `host mesh pipeline refused error=0x80070057 shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]` | walls missing (sky seen through them) | | 2 | run 1 + this commit | 0 (apart from `39f0e9aeb156a61c`, the compile that never ends) | walls drawn | | 6 | `71652a2` + this commit + the Windows 10 PR | the same: only `39f0e9aeb156a61c`; `host mesh pipeline shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]` created | whole room drawn, 2.7–3.0 fps, no crash | - Others have confirmed the same pipeline is the walls on five cards, NVIDIA and AMD (see fxceless/victory-fork#51). - `cargo test -p victory-gpu --lib` on `71652a2` + this commit: the two new tests pass. 110 passed, 1 failed (`depth_bounds_control_a_title_draw`, which fails the same on `71652a2` alone). Not tested: NVIDIA on this tree. AI use: Claude Code (Claude Opus 5.5) ported the commit, ran the checks and wrote this. The runs are on my machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The console ignores blending on integer render targets and the title
leaves it on (the world has a mesh pipeline blending into an R8_UINT
target). D3D12 does not allow it: such a pipeline is refused with
E_INVALIDARG and its draws are lost. The host pipeline now turns
blending off on integer targets; with one description for all targets,
each target gets its own copy so the others keep theirs.

Ported by hand from fxceless/victory-fork#51 (d82acef) to this tree's
host.rs (one graphics and one mesh call site). On an RX 9070 XT this
tree refused [mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35], the
first room's walls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:34:27 +00:00
github manually merged commit 86292110ff into gh-pr/45/base 2026-11-26 03:34:28 +00:00
Author
Owner

@⁠Mbappinho on GitHub · 2026-11-25 13:13 UTC · original · edited 2026-11-25 13:15 UTC

Independent confirmation on Windows 11, same card.

Machine: RX 9070 XT 16 GB, driver 32.0.32029.2010, Ryzen 7 9800X3D, 32 GB RAM, Windows 11. Diagnostics build, run as the README describes (Series X).

run tree refused pipelines first room
A 71652a2 host mesh pipeline refused error=0x80070057 shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35] characters' face skin missing: teeth, tongue and eyelids float in the air (hair, clothes drawn)
B 71652a2 + this PR (8629211) only compute 39f0e9aeb156a61c (0x80004005); host mesh pipeline shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35] created the player character's face drawn: skin, eyes, brows and mouth in place; 5.2 fps

So besides the walls, the draws of this pipeline include the face skin of the player character. With an equivalent local patch (same logic: shared blend state spread over the targets, integer targets cleared) tested just before, the other inmates' faces came back too.

cargo test -p victory-gpu --lib on 8629211: 111 passed, 0 failed, 4 ignored. depth_bounds_control_a_title_draw passes here, so the failure in your table may be specific to Windows 10 LTSC / that runtime.

Frame rate in the room: 4.4–5.2 fps in both runs (no measurable change); memory is the limit on 32 GB (commit 33–40 GB, about 11 GB of video memory spilled to system memory).
pr45-after
before-71652a2

AI use: Hermes (Claude) ran the checks and drafted this; the runs are on my machine.

**@⁠Mbappinho** on GitHub · 2026-11-25 13:13 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/45#issuecomment-7163463982) · edited 2026-11-25 13:15 UTC Independent confirmation on Windows 11, same card. **Machine:** RX 9070 XT 16 GB, driver 32.0.32029.2010, Ryzen 7 9800X3D, **32 GB RAM**, Windows 11. Diagnostics build, run as the README describes (Series X). | run | tree | refused pipelines | first room | |---|---|---|---| | A | `71652a2` | `host mesh pipeline refused error=0x80070057 shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]` | characters' face skin missing: teeth, tongue and eyelids float in the air (hair, clothes drawn) | | B | `71652a2` + this PR (`8629211`) | only `compute 39f0e9aeb156a61c` (`0x80004005`); `host mesh pipeline shaders=[mesh f5e50eb2108c425b, pixel ce3f0432a08f1d35]` created | the player character's face drawn: skin, eyes, brows and mouth in place; 5.2 fps | So besides the walls, the draws of this pipeline include the **face skin** of the player character. With an equivalent local patch (same logic: shared blend state spread over the targets, integer targets cleared) tested just before, the other inmates' faces came back too. `cargo test -p victory-gpu --lib` on `8629211`: 111 passed, 0 failed, 4 ignored. `depth_bounds_control_a_title_draw` passes here, so the failure in your table may be specific to Windows 10 LTSC / that runtime. Frame rate in the room: 4.4–5.2 fps in both runs (no measurable change); memory is the limit on 32 GB (commit 33–40 GB, about 11 GB of video memory spilled to system memory). <img width="2474" height="1392" alt="pr45-after" src="https://github.com/user-attachments/assets/e1d69bde-5765-4f12-bcc3-bd04997d5e2e" /> <img width="1447" height="1070" alt="before-71652a2" src="https://github.com/user-attachments/assets/c9e26b4d-2be1-4c84-85de-26e31d5dbabb" /> AI use: Hermes (Claude) ran the checks and drafted this; the runs are on my machine.
This discussion has been locked. Commenting is limited to contributors.
No description provided.