GPU: wire OMSetDepthBounds (slot 0x220) to host command list #1150
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1150"
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?
Imported from Marvisak/VIctory. Originally posted by ashrafsdrop on 2026-11-24T16:15:56Z.
Summary
Implements depth bounds state handling for D3D12 command lists in
victory-gpu.set_depth_boundsonStateincrates/victory-gpu/src/draw.rsto invokeOMSetDepthBounds(min, max)viaID3D12GraphicsCommandList1.ignored_stateat slot 68 (0x220) inMETHODSwithstate::depth_bounds.crates/victory-gpu/src/list.rsto verify dispatch through slot0x220.README.mdto reflect depth bounds support in the world GPU pipeline.Verification
cargo test -p victory-gpu: all 51 tests passing.cargo test --workspace: all workspace crates passing cleanly.cargo run -p xtask -- policy: asset policy passes (154 files ok).Imported from Marvisak/VIctory. Originally posted by shortselow-byte on 2026-11-24T17:23:36Z.
Ran the CI's checks at head
c1d851a(onmainffe310e), Windows 11, Rust 1.98.1 MSVC, AMD Radeon RX 6900 XT: workspace 342 passed, 0 failed; both clippy runs clean; policy ok. The PR adds no test of its own; thelist.rschange calls slot0x220but checks nothing.Two things for review:
OMSetDepthBoundsonly matters when the pipeline enables the test (DepthBoundsTestEnableinD3D12_DEPTH_STENCIL_DESC1), and nothing onmainsets it, so with this PR alone the bounds have no effect. The README change ("depth bounds" moved to what works) is ahead of that.Imported from Marvisak/VIctory. Originally posted by ashrafsdrop on 2026-11-24T17:33:06Z.
Good catch @shortselow-byte. Indeed,
OMSetDepthBoundsrequiresDepthBoundsTestEnableonD3D12_DEPTH_STENCIL_DESC1via pipeline subobject streams to have any rasterizer effect.Since @plsndr33's #582 already addresses both the command list invocation and the
D3D12_DEPTH_STENCIL_DESC1stream conversion on the pipeline side, it makes sense to consolidate onto #582. Happy to close this in favor of #582.Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:14Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
c1d851a:cargo test -p victory-gpupasses, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T18:45:50Z.
Review: COMMENTED
Tested
c1d851a4on Windows 11, RTX 5070, MSVC:cargo test -p victory-gpupasses on the head (50 passed, 1 ignored), and clippy with all features is clean.The forwarding is fine, but on its own it does nothing yet:
OMSetDepthBoundsonly has an effect when the bound pipeline was created withDepthBoundsTestEnablein aD3D12_DEPTH_STENCIL_DESC1.git grep DepthBoundsTestEnablefinds nothing), so every pipeline still runs with the test off, and the bounds are ignored.To finish this:
DepthStencil1subobject orD3D12_DEPTH_STENCIL_DESC1.D3D12_FEATURE_DATA_D3D12_OPTIONS2::DepthBoundsTestSupportedbefore enabling it.Smaller point:
list.list.cast::<ID3D12GraphicsCommandList1>()runs a QueryInterface on every call. Since every host list is created as at leastID3D12GraphicsCommandList, the cast could be done once, when the list is created.AI-assisted (Claude Code).
Pull request closed