Repository navigation
Conversation
kotekompotek
left a comment
There was a problem hiding this comment.
Correct on both semantics and mechanics: D3D12 rejects PSOs that blend into integer RTVs, while the console allows MIN/MAX there — degrading to unblended writes on only the integer slots is the right approximation. The non-independent case correctly promotes to IndependentBlendEnable (otherwise disabling RT2's blend would disable it everywhere), and twin::integer is the established format classifier. Both pipeline paths (classic + mesh stream subobject) use host_blend. Tests cover independent true/false and the no-integer passthrough. LGTM.
|
Reviewed and verified Code review (and comparison with
|
|
Independent WARP/CPU verification of head Environment: Windows 11 Pro 26200, WARP only (
Diff review:
Not tested: physical GPU, mesh pipeline path on a device, retail title. AI use: Claude Code (Claude Opus 5.5) |
Both points are addressed in 100605f:
Re-checked on Windows 11 / RX 7900 XT: Clippy clean with and without |
# Conflicts: # crates/victory-gpu/src/pipeline/host.rs
|
Automated triage for the maintainers. The fix this PR first carried is now in This is a recommendation for a maintainer to look, not an approval. Generated by Claude Code |
|
I checked the mesh dispatch from #2775 on head
Counts are per run. All three repetitions on each adapter agreed. Each column includes a 16×16 full draw and a scissored draw covering 72 pixels, with the other 184 retaining their clear values. The drawn RGBA8 target read For a sensitivity check I locally removed just the shared-state copy for the RGBA16F neighbor. The mesh PSO still created and dispatched on both adapters. All 256 drawn pixels on that neighbor then differed in the full draw and exactly 72 differed in the scissored draw. The other targets and the independent-state cases stayed correct. That gives the shared-state regression test a concrete rendering consequence. These are synthetic mesh draws. I did not run the title. |
fuzeofficlal
left a comment
There was a problem hiding this comment.
Reviewed and verified merged against main (63bcca43) on Windows 11 (RTX 5090 + WARP, VICTORY_D3D12_DEBUG=1) — clean and ready to merge:
- Note that the production
integer_format/host_blendchanges from the first commit are already present onmain(63bcca43), so merging this PR cleanly adds the two regression tests (a_shared_blend_description_is_copied_to_every_targetandthe_host_takes_a_pipeline_blending_into_an_integer_target), which directly validate live D3D12 PSO creation with blended integer render targets.
Local verification:
victory-gpu(pipeline::,draw::,VICTORY_D3D12_DEBUG=1): 45/45 passed on RTX 5090 (default) and 48/48 passed on WARP (--features diagnostics)cargo clippy --all-targets -- -D warnings(default &--features diagnostics) +cargo xtask policy(191 files ok): 0 warnings
Dukestar69
left a comment
There was a problem hiding this comment.
Tested merged onto origin/main (63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090):
cargo test -p victory-gpu --lib pipeline::host::tests: 6 passed, 0 failed (including newa_shared_blend_description_is_copied_to_every_targetandthe_host_takes_a_pipeline_blending_into_an_integer_target).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Fixes #2775.
Problem
The console blends (MIN/MAX) into integer render targets; desktop D3D12 refuses a
pipeline that enables blending on a
_UINT/_SINTtarget. The title's blend state waspassed to the host unchanged, so pipelines like the mesh pipeline in #2775 (blending on
slot 2,
R8_UINT) were refused withE_INVALIDARGand all their draws were dropped.Change
GraphicsState::host_blend(inpipeline/host.rs) is now the blend state both host paths use(the graphics description and the mesh pipeline stream):
BlendEnable = FALSE; the others keep the title's blending.IndependentBlendEnablewas off, target 0's description is first copied to everytarget and independent blending turned on, so only the integer target changes.
It reuses
twin::integer(nowpub(crate)) for the format check.Trade-off
The integer target now overwrites instead of MIN/MAX-blending, as the issue suggests.
That can differ from the console's output for that target, but the pass is drawn instead
of dropped.
Tests
integer_targets_write_unblended: the blend state for both the independent and theshared description cases, and the unchanged case.
the_host_takes_a_pipeline_blending_into_an_integer_target: creates the pipeline on thehost device (skipped without one). Before the change it failed locally with
HRESULT(0x80070057), the error in the issue; it now passes.cargo clippy --workspace --all-targets [--all-features] --locked -- -D warningsis clean, andcargo test --workspace --lockedpasses (782 passed, 0 failed) on Windows 11.Not tested in game: I have no game data. The mesh path uses the same
host_blendbutonly the graphics path is covered by the device test.
Written with the help of Claude Code.