GPU: handle typed D16/D32 and multisample depth twins #2171
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2173"
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?
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T06:59:46Z.
Problem
ALLOW_UNORDERED_ACCESS. D3D12 rejects that (a multisample resource needs the render target or depth stencil flag), and the debug layer reports it as an error.D16_UNORM/D32_FLOAT). Its copyable footprint format then did not match the twin plane's typeless format (R16_TYPELESS/R32_TYPELESS), so the twin was refused as needing a conversion and the unordered writes were dropped.Changes
twin::makereturns early for multisample depth textures, logging it once, before creating anything.D16_UNORM,D32_FLOAT) are renamed to their typeless plane format, so the same bytes are copied straight through. Formats with stencil keep their per-plane footprints.Verification
cargo test -p victory-gpu --lockedon hardware: the 2 failures already on main are unrelated. WithVICTORY_D3D12_WARP=1: all pass. The new test also passes withVICTORY_D3D12_DEBUG=1, and fails without either fix.-D warnings(default anddiagnostics), rustfmt on the changed hunks, andcargo xtask policyall pass.Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T07:03:11Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC):cargo test -p victory-gpu --lib a_typed_depth_texture_shares_its_bytes_with_its_twin— passed on RTX 5090cargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— ok (183 files ok)Clean handling of typed D16/D32 and multisample depth twins with end-to-end GPU test coverage. Looks good.
AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T07:17:35Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Typed D16/D32 + multisample depth twins handled — depth-format coverage; pairs with #2125's D16 integer loads and #2173's twins.
Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-25T07:58:03Z.
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present, so the hardware-only shader checks run. I merged this PR's head
cdd11bd2intomain940d32fin a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warnings: clean; the same with--all-features: clean.cargo test --workspace --locked: 702 passed, 0 failed, 10 ignored, two runs (mainalone on the same machine: 701 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T12:37:41Z.
Automated triage for the maintainers.
Merge candidate (a recommendation to look, not an approval). The new head is a single commit on current
mainwith the same change as before. Incrates/victory-gpu/src/twin.rs,makerefuses multisample depth textures with a one-time log before creating anything. For depth textures the host keeps typed, it renames theD16_UNORM/D32_FLOATcopy footprints to the plane's typeless format, so the bytes copy through without a conversion. Formats with stencil keep their per-plane footprints. The GPU testa_typed_depth_texture_shares_its_bytes_with_its_twin(draw.rs) checks both formats in both directions and checks that a multisample texture gets no twin and raises no debug-layer error.The branch merges cleanly. CI:
checkpassing.Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.