Pipelines: blending into an integer render target is switched off for the host (the title's pipeline was refused every run) #922
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!922
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-922"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@MamaLeVrai on GitHub · 2026-11-25 12:55 UTC · original
MamaLeVrai:integer-blend→main· +163 −3 · 1 files · 2 commits · openD3D12 refuses a graphics (or mesh) pipeline whose blend state enables blending on a render target of an integer format (
UINTorSINT). The title makes such a pipeline, and it is refused every run: it is the "integer render targets" job (#13) of theZSlayerHQ/victory-worldboard, which describes it as a small masked overlay, not room geometry (I do not know the pipeline myself: I do not look at the game).The change.
GraphicsState::host_blendreturns the blend state the host can make for the targets in use:BlendEnableis cleared for each integer target and kept for the others. Without independent blending, target 0's state stands for every target, so in that case it is copied to all eight and made independent first. With no integer target among those in use (NumRenderTargets), the state is returned as it is, so nothing changes for the pipelines that were made before. It replacesg.blendat the three places where the state goes into a pipeline description or stream (the graphics description and the two mesh streams); the library name still describes the title's own state. Dropping the blend means the overlay is written instead of blended into the target, a visible difference that I cannot judge without running the title.Tests.
blending_into_integer_targets_is_switched_off_and_kept_elsewhere(the state logic: three targets, independent or not, an integer format past the count).a_pipeline_blending_into_an_integer_target_is_made_without_the_blendingcreates a real pipeline on the host device with anR32_UINTtarget: the first assertion is that the host refuses it with the title's blend state (it does, on an RX 6950 XT), the second that it makes it withhost_blend(). It needs the PCdxc.exeand skips without it.Checks. The two tests pass here (Windows 11, RX 6950 XT, Rust 1.98.1). Clippy shows no new lint in
pipeline/host.rs; the base's own lints are still there (PR #841 fixes them). I did not run the whole suite again and I did not run the title.AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code
@eazyves on GitHub · 2026-11-25 13:01 UTC · original
One case where this makes a pipeline fail that the host accepts today: a logic op on an integer target.
host_blendsetsIndependentBlendEnablewhenever a target in use has an integer format, even if no target blends. D3D12 does not allow a logic op together with independent blending, so a title state withLogicOpEnableon anR32_UINTtarget (blending off, not independent) is valid before and refused after.Measured at
e5028d8on an RX 9070 XT (driver 32.0.32029.2010, Windows 11 26200), by adding this to the end ofa_pipeline_blending_into_an_integer_target_is_made_without_the_blending:Treating a target as affected only if it also blends fixes it; both calls then return
Ok, and the two tests of this PR still pass:I have not looked at whether the title has such a pipeline. AI-assisted (Claude Code); run on my machine, synthetic shaders only, no game data.
@MamaLeVrai on GitHub · 2026-11-25 13:41 UTC · original
Thank you, you are right. I added your case and took your fix (a target counts only if it is an integer format and its blend is on, with target 0's state standing for all when blending is not independent):
host_blendnow returns the state as it is when no integer target blends, so a logic op on an integer target stays valid. Pushed asa0e6f89.Checks on my RX 6950 XT (RDNA2),
cargo test --release -p victory-gpu --lib blend: the two tests pass. In the test with a host device I added your case at the end (blending off,LogicOpEnableon,D3D12_LOGIC_OP_XORonR32_UINT):make(g.blend)andmake(g.host_blend())both succeed. I also added a case without a host device to the other test (a logic op alone does not switch independent blending on). I did not check whether the title has such a pipeline.AI-assisted (Claude Code); no game data.
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.Merge
Merge the changes and update on Forgejo.