feat(d3d12_x): copy depth and stencil planes and render read-only depth-stencil passes #54
No reviewers
Labels
No labels
accessibility
bug
ci
docs
documentation
duplicate
enhancement
fixes issue
good first issue
help wanted
invalid
library request
libs
needs rebase
question
relinker
stale
tools
unblocks title
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Dark3581--AnyBox!54
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/54/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?
@Dark3581 on GitHub · 2026-11-22 23:13 UTC · original
Dark3581:feat/depth-stencil-planes→main· +239 −26 · 8 files · 1 commits · merged 2026-11-22 23:17 UTCWhat
Two gaps of the command recorder (#51, #52):
CopyTexturepicks the aspect per plane too and refuses copies between different planes.PlaneAspectholds the rule;R24G8_TYPELESSandR24_UNORM_X8_TYPELESSjoin the copy block table.AttachmentRefcarries the view'sD3D12_DSV_FLAG_READ_ONLY_*flags;BeginRenderingthen usesDEPTH_STENCIL_READ_ONLY_OPTIMALandSTORE_OP_NONE, matching the layout #48 givesDEPTH_READ(also combined with shader resource states). A pass read-only for only one plane of a depth-stencil texture is refused: it would need per-plane state tracking.The recorder's pending debt entry is updated in place.
Tested
Windows 10, RTX 3070 Ti (driver 621.14), Khronos validation layer.
pso_probe commands-selftest: plane aspects, a stencil plane with a 4-byte footprint refused, a second plane of a depth-only texture refused.pso_probe planes-gpu --validate: a D32S8 texture cleared to depth 0.5 and stencil 0x5A with a 0x33 stencil rectangle; the depth plane reads back as 0.5f and the stencil plane with the rectangle; the stencil plane copied into a second texture reads back the same; a mixed-plane copy, a 4-byte stencil footprint and a half read-only pass are refused; with the texture inDEPTH_READ | PIXEL_SHADER_RESOURCE, a read-only pass draws where the depth test0 <= 0.5passes and nothing withGREATER. 5 checks, 0 validation errors.commands-gpustill passes.ctest: 66 of 66. Thed3d12_xtargets also build with MSVC 2022.python tools/check_conventions.pyanddebt_fold.py --check: ok.Checklist
main; no other open PR implements the same functionspython tools/check_conventions.pypasses (no comments in code, one declaration per export, Conventional Commit subjects)AbxNotImplemented/AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragmentdocs/dev/debt/changes/<branch>.md(the pending recorder entry updated)