Repository navigation
feat(gpu): wire up depth bounds testing on command lists and pipeline streams - #582
matheusfrta wants to merge 5 commits into
Conversation
|
Tested Environment: Windows 11 Pro build 26300, AMD Ryzen 7 5700X, 16 GB, NVIDIA GeForce RTX 3060 12 GB (driver 610.88), Rust 1.98.1 Tested
Notes
Not tested: that pixels outside the bounds are actually discarded (no render-and-read-back test); title pipelines (no game data). AI-assisted (Claude Code) ran the checks and drafted this comment. |
DenRakEiw
left a comment
There was a problem hiding this comment.
Tested head 7e78c81 merged cleanly onto main (ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC) with NVIDIA GeForce RTX 5090 (Blackwell) and WARP (VICTORY_D3D12_WARP=1):
cargo test -p victory-gpu(RTX 5090): 50 passed, 0 failed, 1 ignored (includespipeline::tests::streams_yield_their_shaderswithDepthBoundsTestEnableandlist::tests::every_inline_command_falls_back_to_the_tablewithOMSetDepthBounds)VICTORY_D3D12_WARP=1 cargo test -p victory-gpu(WARP): 50 passed, 0 failed, 1 ignoredcargo clippy -p victory-gpu --all-targets: 0 warningscargo xtask policy: ok
Code review looks solid — GraphicsState::depth_bounds is preserved from D3D12_DEPTH_STENCIL_DESC1 (subobject 21), reset on D3D12_DEPTH_STENCIL_DESC (subobject 11), hashed into describe(), and gated on D3D12_FEATURE_DATA_D3D12_OPTIONS2::DepthBoundsTestSupported for both graphics_pipeline / mesh_pipeline streams and OMSetDepthBounds.
Two minor non-blocking nits:
Host::depth_bounds(&self)caches the result in a function-localstatic OnceLock<bool>rather than a field onHost; storing it onHostavoids tying a&selfmethod to process-global state if multiple adapters are ever instantiated in one process.crates/victory-gpu/src/list.rs:768(dst as *const u8→dst as *mut u8) is an unrelated change (and a few touched files lost their trailing newline).
Approving.
AI-assisted (Gemini 4 Neon).
|
Automated triage for the maintainers. Closing because another open pull request covers the same change. See #158. Same depth-bounds wiring as #158 (list slot, DEPTH_STENCIL1 flag, OPTIONS2 check) without tests. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
GPU: Reduce repeated write-watch queries on mapped buffers
i wired up
OMSetDepthBoundson the command list tables and keptDepthBoundsTestEnablefromD3D12_DEPTH_STENCIL_DESC1in pipeline state streams for both mesh and graphics pipelines. it checksD3D12_FEATURE_D3D12_OPTIONS2first so adapters without depth bounds support like WARP fall back cleanly without rejecting pipelines or command lists.