Repository navigation
D3D12.X: depth+UAV buffers on the PC fallback paths start as depth writes - #1353
Merged
theaustinayers merged 1 commit intoNov 24, 2026
Merged
Conversation
…ites `pc_resource_desc` takes ALLOW_UNORDERED_ACCESS from a depth buffer the console also lets shaders write (the PC refuses ALLOW_DEPTH_STENCIL with ALLOW_UNORDERED_ACCESS). Only CreatePlacedResourceX (xcl-dev#44) moved such a resource's initial state off UNORDERED_ACCESS as well (to DEPTH_WRITE). The other paths that create a resource of the converted description only masked the state with PC_RESOURCE_STATES: the committed fallback of CreateCommittedResource (xcl-dev#27 / xcl-dev#76 / xcl-dev#127, reached without unified memory or when its coherent window is full), the PC-way retry and the committed fallback of CreatePlacedResource (xcl-dev#29), and its memory-of-its- own path for textures larger on the PC. A console texture with flags DEPTH_STENCIL | UNORDERED_ACCESS created in UNORDERED_ACCESS was then asked for in a state D3D12 refuses for a resource without the UAV flag (E_INVALIDARG; the xcl-dev#29 own-memory path fell back to COMMON). `device_x::pc_initial_state` does both steps; xcl-dev#44 uses it with no change in behaviour, and the four other sites use it with the console flags (or the PC description's, which keep ALLOW_DEPTH_STENCIL). Tests: a unit test of the helper; a GPU test placing a 256x256 D16 depth+UAV texture in UNORDERED_ACCESS as XCL now does (not run here). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
gustavsi
added a commit
to gustavsi/xcl
that referenced
this pull request
Nov 24, 2026
…v#1305-xcl-dev#1379 Integrate 22 open upstream PRs targeting world rendering, shader correctness, DirectStorage terrain loads, and crash/memory stability: - xcl-dev#1321 (xcl-dev#1307): fall back to pc blocks when structured CFG HLSL grows oversized (eliminates the 148 MB HLSL / 1 GB/s commit explosion from b8b1f49 so XCL_PSO_PRELOAD=1 stays flat at ~5.4 GiB) - xcl-dev#549, xcl-dev#1312: DirectStorage late page-array queue hold (fixes 0x89240009 terrain read failures) and 0-byte memory-source requests - xcl-dev#1365 (xcl-dev#1361): GFX10.30 scratch SADDR 0x7F addresses the immediate offset alone instead of adding v0 - xcl-dev#1368: translated compute PSOs use NodeMask 0 - xcl-dev#1371 (xcl-dev#105): deduplicate packed ISG1 vertex input struct fields - xcl-dev#1375 (xcl-dev#1360): ES s_setpc_b64 ends block before gs_start - xcl-dev#1350, xcl-dev#1351, xcl-dev#1352, xcl-dev#1353, xcl-dev#1349: VS layer/viewport outputs, PS sample index/fixed-point position & SV_Coverage, depth+UAV initial states, console SetPredication - xcl-dev#1305, xcl-dev#1306, xcl-dev#1314, xcl-dev#1319, xcl-dev#1322, xcl-dev#1334, xcl-dev#1339, xcl-dev#1355, xcl-dev#1357, xcl-dev#1379: console_list UMA hold on Release, v_cmp_class_f32 bitwise abs/neg, late_release vram queue wait, root arg clamping, empty BVH / NaN rays, NULL IASetIndexBuffer clearing, MSAA MipLevels=1, VFS lazy-page commits, coherent VirtualFree validation, cpu_writes PAGE_GUARD & stale fence wakeups - README.md: document the integrated PRs, XCL_PSO_PRELOAD=1, and 16 GiB cap Verified on RX 9060 XT / GE-Proton11-14: release build clean, targeted unit tests pass (75 passed, 0 failed), and 80 s run with XCL_PSO_PRELOAD=1 and XCL_MEM_LIMIT=12G stays flat at 5340-5413 MB with 512+ pipelines preloaded (1385 frames, exit 0x0). Assisted-by: Antigravity (Google DeepMind)
gustavsi
added a commit
to gustavsi/xcl
that referenced
this pull request
Nov 24, 2026
…v#1305-xcl-dev#1379 Integrate 22 open upstream PRs targeting world rendering, shader correctness, DirectStorage terrain loads, and crash/memory stability: - xcl-dev#1321 (xcl-dev#1307): fall back to pc blocks when structured CFG HLSL grows oversized (eliminates the 148 MB HLSL / 1 GB/s commit explosion from b8b1f49 so XCL_PSO_PRELOAD=1 stays flat at ~5.4 GiB) - xcl-dev#549, xcl-dev#1312: DirectStorage late page-array queue hold (fixes 0x89240009 terrain read failures) and 0-byte memory-source requests - xcl-dev#1365 (xcl-dev#1361): GFX10.30 scratch SADDR 0x7F addresses the immediate offset alone instead of adding v0 - xcl-dev#1368: translated compute PSOs use NodeMask 0 - xcl-dev#1371 (xcl-dev#105): deduplicate packed ISG1 vertex input struct fields - xcl-dev#1375 (xcl-dev#1360): ES s_setpc_b64 ends block before gs_start - xcl-dev#1350, xcl-dev#1351, xcl-dev#1352, xcl-dev#1353, xcl-dev#1349: VS layer/viewport outputs, PS sample index/fixed-point position & SV_Coverage, depth+UAV initial states, console SetPredication - xcl-dev#1305, xcl-dev#1306, xcl-dev#1314, xcl-dev#1319, xcl-dev#1322, xcl-dev#1334, xcl-dev#1339, xcl-dev#1355, xcl-dev#1357, xcl-dev#1379: console_list UMA hold on Release, v_cmp_class_f32 bitwise abs/neg, late_release vram queue wait, root arg clamping, empty BVH / NaN rays, NULL IASetIndexBuffer clearing, MSAA MipLevels=1, VFS lazy-page commits, coherent VirtualFree validation, cpu_writes PAGE_GUARD & stale fence wakeups - README.md: document the integrated PRs, XCL_PSO_PRELOAD=1, and 16 GiB cap Verified on RX 9060 XT / GE-Proton11-14: release build clean, targeted unit tests pass (75 passed, 0 failed), and 80 s run with XCL_PSO_PRELOAD=1 and XCL_MEM_LIMIT=12G stays flat at 5340-5413 MB with 512+ pipelines preloaded (1385 frames, exit 0x0). Assisted-by: Antigravity (Google DeepMind)
|
GPU run of Tested
Not tested
AI use
|
gustavsi
added a commit
to gustavsi/xcl
that referenced
this pull request
Nov 24, 2026
Brings in 20 newly merged upstream PRs (xcl-dev#959, xcl-dev#968, xcl-dev#1079, xcl-dev#1084, xcl-dev#1091, xcl-dev#1099, xcl-dev#1127, xcl-dev#1133, xcl-dev#1137, xcl-dev#1150, xcl-dev#1211, xcl-dev#1223, xcl-dev#1224, xcl-dev#1265, xcl-dev#1289, xcl-dev#1290, xcl-dev#1330, xcl-dev#1353, xcl-dev#1354), including in-memory shader cache session fallback (xcl-dev#1211), CPU-invisible resource Map filtering (xcl-dev#1099), DRED partially executed list priority (xcl-dev#1330), allocation info alignment padding (xcl-dev#1354), and DirectStorage status/error/cancel fixes (xcl-dev#1127, xcl-dev#1223, xcl-dev#1224).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pc_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(Manifest: scope the local storage quota to its section #27 / xnetworking: stop copying struct padding in default_security_info_bytes #76 / Runtime: CPU check at start, bounded reads in the exception logger, t… #127), taken when the texture cannot be placed in unified memory;CreatePlacedResource(Shader tools: keep DXC timings out of JSON output #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 Split wave32 geometry: refuse prefix counts over a mask #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=4on 5383506: 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