Repository navigation
D3D12.X: bind console_list view/sampler heaps before root signature and fix shared ClearUAV handle - #2518
D3D12.X: bind console_list view/sampler heaps before root signature and fix shared ClearUAV handle#2518Decodere wants to merge 1 commit into
Conversation
…nd fix shared ClearUAV handle Fix three descriptor-heap and ClearUnorderedAccessView bugs in console_list replay: - ensure_dispatch_heaps: unconditionally load or lazily initialize the shared CBV/SRV/UAV heap via console_heap::global_heap/shared_heap (keeping heap_on_device filtering intact), instead of gating on pso::heap_windows(), because translated ABI root signatures always set CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED. - bind_dispatch_root / close: resolve the compute root signature first so missing-RS errors return before mutating command-list state, then call ensure_dispatch_heaps (SetDescriptorHeaps) strictly before SetComputeRootSignature. - clear_uav_gpu_handle / CLEAR_UAV_MARKER: reject sampler slots and prefer c.pc_gpu_uav when both GPU and CPU slots live in the shared GLOBAL heap (c.shared_srv != 0 && g.shared_srv != 0 && c.pc_gpu_uav != 0), avoiding uninitialized g.pc_gpu_uav after inline descriptor copies. Add pure-CPU tests for clear_uav_gpu_handle and an isolated subprocess D3D12/WARP test verifying both call ordering (SetDescriptorHeaps before SetComputeRootSignature) and unconditional view+sampler heap binding with XCL_HEAP_WINDOWS=0. Part of xcl-dev#2461 Part of xcl-dev#1452 Part of xcl-dev#1833 Assisted-by: Google Antigravity (Gemini 4 Neon)
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
Test run on exact head Tested
Regression run (60 s, default settings) main: this PR: No crash or device removal; frames 105 % of Not tested
AI use
|
|
Tested: current PR head merged onto current
Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
|
Debug-layer run (listed under Not tested): with console lists on, the e2e title's D3D12 debug-layer messages are the same on this PR and on Tested:
Not this PR, but it caught me out: Not tested: a title that dispatches on console lists, AMD, a release build. AI use: Claude Code (Claude Opus 5.5) ran the suite and the debug-layer comparisons, and wrote this report. |
…pstream xcl-dev#2518) (cherry picked from commit 0042d928634e9d2f6dede21d2be77f80f268a481)
… slot's depth twin
…cl-dev#2518) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
merge-check claim |
|
merge-check |
|
No open standalone PR or main commit makes this change: main's AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
Fix three descriptor-heap and
ClearUnorderedAccessViewbugs inconsole_listcommand-stream replay: bind the shared CBV/SRV/UAV heap unconditionally (even withXCL_HEAP_WINDOWS=0), callSetDescriptorHeapsbeforeSetComputeRootSignature, and use the valid shared-heap UAV handle inCLEAR_UAV_MARKERwhile rejecting sampler slots. Part of #2461. Part of #1452. Part of #1833.What is in it
crates/xcl/src/hle/d3d12x/console_list.rs:ensure_dispatch_heaps: mirror the sampler-heap path to unconditionally fetch or lazily create the shared CBV/SRV/UAV heap viaconsole_heap::global_heap()/console_heap::shared_heap(d)(preservingheap_on_devicefiltering), instead of gating it onpso::heap_windows(), since translated ABI root signatures always setD3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED.bind_dispatch_root/close: resolve the compute root signature first (returning missing-RS errors before mutating command-list state), then invokeensure_dispatch_heaps(SetDescriptorHeaps) strictly beforelist.SetComputeRootSignature(root_sig).clear_uav_gpu_handle/CLEAR_UAV_MARKER: reject sampler slots (g.sampler || c.sampler) and selectc.pc_gpu_uavwhen both slots live in the sharedGLOBALheap (c.shared_srv != 0 && g.shared_srv != 0 && c.pc_gpu_uav != 0), falling back tog.pc_gpu_uavotherwise (rejecting0).clear_uav_gpu_handle_prefers_shared_cpu_slot_and_rejects_samplers: pure-CPU unit test covering sharedGLOBALinline-copy preference, shared fallback whenc.pc_gpu_uav == 0, non-shared and mixed-heap fallback, sampler rejection, and zero-handle rejection.bind_dispatch_root_sets_view_and_sampler_heaps_before_root_signature: isolated subprocess D3D12/WARP test (XCL_HEAP_WINDOWS=0, safe under--test-threads=4) using a recordingID3D12GraphicsCommandListspy vtable + real directly-indexed ABI root signature to verify["heaps", "rs"]call ordering and[CBV_SRV_UAV, SAMPLER]binding withoutXCL_HEAP_WINDOWS, plusClose().is_ok()on a real D3D12 command list.Tested
dxil.dll1.9.2609.5, release build.origin/main6d12f58a,XCL_ADAPTER=warp): both new tests failed (0 passed, 2 failed:clear_uav_gpu_handlereturnedSome(20496)instead ofSome(24608), andbind_dispatch_rootrecorded["rs", "heaps"]instead of["heaps", "rs"]without creating the shared view heap).cargo test --release -p xcl --lib -- hle::d3d12x::console_list::tests:: --nocapture:9 passed, 0 failed, 0 ignored(0.35 s,0skipped).XCL_ADAPTER=warp:9 passed, 0 failed, 0 ignored(0.32 s,0skipped).cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture(RTX 4060):1425 passed, 0 failed, 46 ignoredacross37test binaries (29pre-existingSKIPPEDGPU/environment checks:21no wave64,3per-lane wave32 refused,3no D3D12 debug layer,1no heap windows,1cannot disable driver cache;0skipped inhle::d3d12x::console_list::tests).Regression run
main:
PR:
Not tested
console_listreplay (d3d12SDKLayers.dllnot installed in this environment) and native wave64 GPU tests.XCL_CONSOLE_LISTS=1beyond unit/D3D12 command-list tests and the default 60 s title smoke test.AI use
console_list.rsheap-binding andCLEAR_UAV_MARKERfixes, wrote the unit and subprocess D3D12/WARP tests, ran the test and smoke suites, and drafted this PR description.