D3D12.X: depth+UAV buffers on the PC fallback paths start as depth writes #1353
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1353
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1353/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?
@emirduran707 on GitHub · 2026-11-24 15:08 UTC · original
emirduran707:d3d12x-depth-uav-initial-state→main· +74 −9 · 2 files · 1 commits · merged 2026-11-24 15:57 UTCpc_resource_descdropsALLOW_UNORDERED_ACCESSfrom console depth buffers, since the PC does not allow it together withALLOW_DEPTH_STENCIL. OnlyCreatePlacedResourceX(#44) also moved such a buffer's initial state offUNORDERED_ACCESS, toDEPTH_WRITE. Three other paths that use the same converted description only masked the state:CreateCommittedResource(#27 / #76 / #127), taken when the texture cannot be placed in unified memory;CreatePlacedResource(#29);own_memory_if_larger_on_the_pc.So a console texture created as depth + unordered access in the
UNORDERED_ACCESSstate was refused there withE_INVALIDARG(D3D12 allows that state only withALLOW_UNORDERED_ACCESS), or fell back to COMMON.A helper,
pc_initial_state, now does what #44 did (mask, thenUNORDERED_ACCESS→DEPTH_WRITEfor a depth buffer), and all four sites use it.What is in it
crates/xcl/src/hle/d3d12x/device_x.rs:pc_initial_state, used at #44 (same result as before);depth_buffers_created_for_unordered_access_start_as_depth;gpu_depth_buffer_created_for_unordered_access_is_placed. It places a 256x256 D16 depth + UAV texture: with the masked state the PC refuses it, and withpc_initial_state's state it is created.crates/xcl/src/hle/d3d12x/real.rs: the three other sites.Tested
cargo test --workspace -- --test-threads=4on5383506: 753 passed, 0 failed, 41 ignored; no SKIPPED GPU tests; the GPU test ran on this adapter and shows both the refusal and the fixleft: 8,right: 16; with the helper it passesRegression run
main:
this PR:
Not tested
DEPTH_WRITEnow but are not tracked by it.AI use
🤖 Generated with Claude Code
@futurepro62 on GitHub · 2026-11-24 15:15 UTC · original · edited 2026-11-24 15:20 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
5383506(on its base930e8b4).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 753 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.depth_buffers_created_for_unordered_access_start_as_depth,gpu_depth_buffer_created_for_unordered_access_is_placed.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 753 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
@Mischief8713 on GitHub · 2026-11-24 15:55 UTC · original
GPU run of
5383506on Windows (NVIDIA GTX 1660 Ti, Turing): 709 passed, 0 failed; the new test passesTested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64)mainat930e8b4on the same machine: lib 707 passed, 0 failed, 21 ignored;e2e3 passedmain.hle::d3d12x::device_x::tests::gpu_depth_buffer_created_for_unordered_access_is_placedran on the GPU and passed (it did not print SKIPPED).Not tested
scripts/smoke.ps1run, so no regression runAI use