GPU: select the readable format and plane for depth/stencil shader views #651
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!651
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-651"
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?
@Raxstreams on GitHub · 2026-11-24 06:13 UTC · original
Raxstreams:codex/depth-stencil-srv-plane→main· +119 −6 · 1 files · 1 commits · openVIctory creates typeless host textures so a title can use the same surface for depth testing and shader reads. The descriptor path on main copies the title's plane index and accepts a depth-stencil view format as long as it belongs to the resource's DXGI family. That can pass a DSV-only format to CreateShaderResourceView, or request stencil with plane zero on a two-plane host texture.
Select the readable depth or stencil format when building the host SRV. Texture2D and Texture2DArray use plane zero for depth and plane one for stencil. The test includes the console stencil format that maps to X24_TYPELESS_G8_UINT and checks that the mip and array ranges survive the conversion.
I isolated this change while tracing a black world frame. In a separate integration run with the diagnostic lighting pass disabled, the HDR scene and bloom inputs were already black when the title's composite sampled them. The effect of this change alone on the game image is unverified. Related work in #485 covers resource states for simultaneous shader and depth reads.
Verification
cargo test --locked --offline -p victory-gpu --features diagnostics -- --test-threads=1passed 46 tests with one ignored. The new test inspects the generated host descriptors.cargo xtask policy --stagedpassed for the single source file.AI-assisted contribution using Codex.
@erLCoder on GitHub · 2026-11-24 13:10 UTC · original
Depth/stencil descriptor fixture on Windows 10 22H2 build 19045.6466, GTX 1660 Ti, NVIDIA 581.42, Ryzen 5 3600, Rust 1.98.1 MSVC and Agility SDK 1.620.2. Parent
d2a4bae, PRd615ee0.cargo test --offline --locked -p victory-gpu --features diagnostics --lib depth_srv_uses_the_requested_aspect -- --nocapture --test-threads=1— 1 passed, 0 failed, 0 ignored, 46 filtered out. This is a CPU test of selected DXGI format and plane for 2D and array descriptors. GPU depth sampling, resource transitions and image effect remain untested. Applying this revision to my separate Turing runtime stack requires conflict resolution in descriptor/host.rs.Codex prepared the worktree, ran the test and drafted this report.
@konradbeck on GitHub · 2026-11-24 13:54 UTC · original
Independent GPU readback on an NVIDIA RTX A4500 (driver
32.0.16.2124, Windows 11 build26300.9974).maintested atffe310eb2098e52169f4c44db5ffdabf43a72622d615ee0fe0f90750320575e2501726486a0454caI cleared synthetic 2×2 depth/stencil patterns, sampled both aspects in a compute shader, and copied the results back to the CPU. The PR matched native D3D12 exactly for both corrected view requests.
Texture2D0.125,0.375,0.625,0.875)5,17,42,213)Texture2DArray, mip 1, slice 10.12500001,0.37500003,0.625,0.875)5,17,42,213)On
main, the native and valid VIctory controls also matched. For the inputs this PR fixes, the test guard recorded a DSV-only format on depth plane 1 and a stencil SRV on plane 0, then blocked those descriptors before dispatch. The D3D12 debug layer was unavailable for these runs. The PR’s existingdepth_srv_uses_the_requested_aspecttest also passed.AI-assisted test fixture and write-up.
@molodayamama on GitHub · 2026-11-24 14:04 UTC · original
Independent Windows check of
d615ee0fe0f90750320575e2501726486a0454ca(Windows 10 22H2 19045, Rust 1.98.1, MSVC x64).cargo test -p victory-gpu --locked --lib depth_srv_uses_the_requested_aspect -- --test-threads=1 --nocapture: 1 passed.The synthetic descriptor fixture checks that SRV descriptions preserve the requested readable aspect on depth/stencil textures. This was a descriptor-construction check without GPU sampling.
Only source-built synthetic fixtures were used. AI-assisted verification.
@Marvisak on GitHub · 2026-11-25 00:32 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:crates/victory-gpu/src/descriptor/host.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.