feat(gpu): wire up depth bounds testing on command lists and pipeline streams #582
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!582
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/582/head"
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?
@matheusfrta on GitHub · 2026-11-24 05:13 UTC · original
matheusfrta:patch-1795497175→main· +164 −32 · 5 files · 5 commits · closed without mergingi 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.@fromthemoonx on GitHub · 2026-11-24 07:39 UTC · original
Tested
7e78c81(onmaind2a4bae) on NVIDIA, including the new stream path.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
x86_64-pc-windows-msvc, debug.Tested
cargo test --locked -p victory-gpu --lib: 43 passed, 0 failed, 1 ignored.every_inline_command_falls_back_to_the_tablecalls the new slot, which here reachesOMSetDepthBoundson the hardware list. The 0x220/0x230 pair is right:newer_slotmoves slot 68 to 70.cargo test --locked --workspace: 264 passed, 0 failed, 4 ignoredcargo xtask policy: 151 files ok;git diff --check: clean; clippy: onlymain'shost.rs:267warningOPTIONS2):DepthBoundsTestSupportedis true on the RTX 3060 and on WARP, andhost().depth_bounds()returns true. So the description's "adapters without depth bounds support like WARP" doesn't hold here: WARP takes the same path as hardware. The fallback for unsupported adapters stays untested on both.graphics_pipelinestream (throwaway test with a trivialvs_6_0/ps_6_0pair from the SDK'sdxc,root_signature(&[], &[], false)andGraphicsState::default()plus one RGBA8 target): created on the RTX 3060 with depth bounds on and a D32 depth buffer, with depth bounds off, with D24S8, and with depth bounds on and no depth buffer. So the driver accepts the stream layout and theDEPTH_STENCIL1subobject.Notes
cargo fmt --checkadds new diffs overmainin the five changed files:draw.rs,host.rs,list.rsandpipeline.rslose their final newline (\ No newline at end of filein the diff), andpipeline/host.rshas five, including the longmesh_pipeline(...)call and stream lines. Runningcargo fmton those files would clear them.copy_memorychange (dst as *const u8→dst as *mut u8passed tocommitted, which takes*const u8) doesn't change behavior, so it could be left out.LoadPipelinerather thanLoadGraphicsPipeline). The name includesdepth_boundsthroughdescribe(), so the two shouldn't collide.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.
@Marvisak on GitHub · 2026-11-25 00:25 UTC · original
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.
Pull request closed