GPU: wire OMSetDepthBounds (slot 0x220) to host command list #1150

Closed
github-bot wants to merge 1 commit from gh-pr/1150/head into gh-pr/1150/base
Owner

@⁠ashrafsdrop on GitHub · 2026-11-24 16:15 UTC · original
ashrafsdrop:gpu/depth-bounds → main · +19 −2 · 3 files · 1 commits · closed without merging

Summary

Implements depth bounds state handling for D3D12 command lists in victory-gpu.

  • Implements set_depth_bounds on State in crates/victory-gpu/src/draw.rs to invoke OMSetDepthBounds(min, max) via ID3D12GraphicsCommandList1.
  • Replaces ignored_state at slot 68 (0x220) in METHODS with state::depth_bounds.
  • Adds fallback stub for non-Windows platforms.
  • Adds test invocation in crates/victory-gpu/src/list.rs to verify dispatch through slot 0x220.
  • Updates README.md to 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).
**@⁠ashrafsdrop** on GitHub · 2026-11-24 16:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/1150) `ashrafsdrop:gpu/depth-bounds` → `main` · +19 −2 · 3 files · 1 commits · closed without merging ### Summary Implements depth bounds state handling for D3D12 command lists in `victory-gpu`. - Implements `set_depth_bounds` on `State` in `crates/victory-gpu/src/draw.rs` to invoke `OMSetDepthBounds(min, max)` via `ID3D12GraphicsCommandList1`. - Replaces `ignored_state` at slot 68 (`0x220`) in `METHODS` with `state::depth_bounds`. - Adds fallback stub for non-Windows platforms. - Adds test invocation in `crates/victory-gpu/src/list.rs` to verify dispatch through slot `0x220`. - Updates `README.md` to 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).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:21:15 +00:00
github-bot closed this pull request 2026-11-26 04:21:15 +00:00
Author
Owner

@⁠shortselow-byte on GitHub · 2026-11-24 17:23 UTC · original

Ran the CI's checks at head c1d851a (on main ffe310e), 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; the list.rs change calls slot 0x220 but checks nothing.

Two things for review:

  • OMSetDepthBounds only matters when the pipeline enables the test (DepthBoundsTestEnable in D3D12_DEPTH_STENCIL_DESC1), and nothing on main sets it, so with this PR alone the bounds have no effect. The README change ("depth bounds" moved to what works) is ahead of that.
  • This is the fourth open PR on depth bounds, after #158, #582 and #925. #582 wires both the command-list call and the pipeline stream side.
**@⁠shortselow-byte** on GitHub · 2026-11-24 17:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1150#issuecomment-7139125079) Ran the CI's checks at head `c1d851a` (on `main` `ffe310e`), 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; the `list.rs` change calls slot `0x220` but checks nothing. Two things for review: - `OMSetDepthBounds` only matters when the pipeline enables the test (`DepthBoundsTestEnable` in `D3D12_DEPTH_STENCIL_DESC1`), and nothing on `main` sets it, so with this PR alone the bounds have no effect. The README change ("depth bounds" moved to what works) is ahead of that. - This is the fourth open PR on depth bounds, after #158, #582 and #925. #582 wires both the command-list call and the pipeline stream side.
Author
Owner

@⁠ashrafsdrop on GitHub · 2026-11-24 17:33 UTC · original

Good catch @⁠shortselow-byte. Indeed, OMSetDepthBounds requires DepthBoundsTestEnable on D3D12_DEPTH_STENCIL_DESC1 via pipeline subobject streams to have any rasterizer effect.

Since @⁠plsndr33's #582 already addresses both the command list invocation and the D3D12_DEPTH_STENCIL_DESC1 stream conversion on the pipeline side, it makes sense to consolidate onto #582. Happy to close this in favor of #582.

**@⁠ashrafsdrop** on GitHub · 2026-11-24 17:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/1150#issuecomment-7139363497) Good catch [@⁠shortselow-byte](https://github.com/shortselow-byte). Indeed, `OMSetDepthBounds` requires `DepthBoundsTestEnable` on `D3D12_DEPTH_STENCIL_DESC1` via pipeline subobject streams to have any rasterizer effect. Since [@⁠plsndr33](https://github.com/plsndr33)'s [#582](https://git.gtahub.st/github/Marvisak--VIctory/pulls/582) already addresses both the command list invocation and the `D3D12_DEPTH_STENCIL_DESC1` stream conversion on the pipeline side, it makes sense to consolidate onto [#582](https://git.gtahub.st/github/Marvisak--VIctory/pulls/582). Happy to close this in favor of [#582](https://git.gtahub.st/github/Marvisak--VIctory/pulls/582).
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 18:01 UTC · original

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-gpu passes, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 18:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1150#issuecomment-7140040195) 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-gpu` passes, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1150
No description provided.