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

Merged
Arvi23 merged 1 commit from upstream-pr/45 into main 2026-11-25 13:57:53 +00:00
Arvi23 commented 2026-11-25 12:47:24 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by Arvi23 on 2026-11-25T12:47:24Z.


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

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:issue:6604821873 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/45). Originally posted by [Arvi23](https://github.com/Arvi23) on 2026-11-25T12:47:24Z. --- 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)
Mbappinho commented 2026-11-25 13:13:21 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by Mbappinho on 2026-11-25T13:13:21Z.


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.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7163463982 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/45#issuecomment-7163463982). Originally posted by [Mbappinho](https://github.com/Mbappinho) on 2026-11-25T13:13:21Z. --- 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.
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Belobug/VIctory-Belobug-AMD!45
No description provided.