Repository navigation
D3D12.X: a null ppv validation call does not crash console #14 (#2401) - #2444
GustavoEllwanger wants to merge 1 commit into
Conversation
Tested
Not tested
AI use
|
55a476e to
e5e5528
Compare
|
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge. — Devin |
|
Thanks @DavidM1911 for running it! That failure is not from this PR. The current head If you rerun on |
…#2127, xcl-dev#2476, xcl-dev#2479, xcl-dev#2467, xcl-dev#2444, xcl-dev#2447, xcl-dev#2448 Integrates compositor RT tracking fix (xcl-dev#2480), split shader cache budget (xcl-dev#2475), foreign-thread deferred release (xcl-dev#2474), Wine 4-thread DXC cap (xcl-dev#2127), DXIL feature/reload fixes (xcl-dev#2476, xcl-dev#2479), DXC loader cleanup (xcl-dev#2467), console xcl-dev#14 null ppv guard (xcl-dev#2444), root-sig flag stripping (xcl-dev#2447), and two-pass stream canonicalization (xcl-dev#2448). Assisted-by: Antigravity (Gemini 4 Neon)
bmjask
left a comment
There was a problem hiding this comment.
No code-level blocker found. The null-output guard matches the existing creator pattern, preserves S_FALSE, and the new tests cover both affected console heap types; Windows CI is green. Merge readiness is administrative: this runtime change still needs the required paired retail smoke evidence. Optional additional coverage: explicitly assert normal non-null creation still registers successfully.
|
RX 6800M verification on exact PR head
Not tested: a full current-head workspace suite, a completed longer title run, a physical Bluetooth controller, or other GPUs on this exact head. No game data was uploaded. AI use: OpenAI Codex (GPT-6; exact variant unavailable) ran the guarded exact-head test/builds and smoke comparisons, checked the logs and source delta, and drafted this report. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
…xcl-dev#2401) CreateDescriptorHeap with a null out pointer is D3D12's validation call: no heap is made and it returns S_FALSE. dev_create_descriptor_heap_x read *ppv on any success code, so the call crashed for CBV_SRV_UAV and SAMPLER heaps. It now registers the heap only when ppv and *ppv are not null, as dev_create_descriptor_heap already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e5e5528 to
5681f9f
Compare
|
Thanks @bmjask for the review and @luckyteagirl for the RX 6800M check! Rebased onto current \main\ (\�49be183, new head \5681f9fa) and added explicit non-null console #14 creation assertions in \console_descriptor_heap_validation_call_with_null_out_pointer_returns_s_false\ verifying \S_OK, \console_heap::start(...)\ registration (when UMA is active), and clean unregistration on drop for both \CBV_SRV_UAV\ and \SAMPLER\ heaps (shader-visible and non-shader-visible). Re-verified on NVIDIA RTX 5060 and AMD Radeon RDNA2 (4/4 \d3d12_resource_and_sync, 3/3 \d3d12_descriptor_heap_and_fence, 1436 passed, 0 failed, 47 ignored full workspace on RTX 5060). If anyone with a retail title can run a paired 60 s \scripts/smoke.ps1\ on \�49be183\ and \5681f9fa, it would be greatly appreciated! |
CreateDescriptorHeapwith a null out pointer is D3D12's validation call: no heap is made and it returnsS_FALSE. The console #14 hook (dev_create_descriptor_heap_x) read*ppvon any success code, so that call crashed for CBV_SRV_UAV and SAMPLER heaps, the two types it sends through its own path. Fixes #2401.What is in it
crates/xcl/src/hle/d3d12x/real.rs:dev_create_descriptor_heap_xregisters the heap only whenppvand*ppvare not null, asdev_create_descriptor_heapalready does; the validation call returns the driver'sS_FALSE.crates/xcl/tests/d3d12_resource_and_sync.rs:console_descriptor_heap_validation_call_with_null_out_pointer_returns_s_falsecalls console Olympus: emulate geometry wave64 on wave32 #14 with a null out pointer for both heap types, shader-visible and not, and expectsS_FALSE; then verifies that normal non-null creation for the same combinations still returnsS_OK, registers inconsole_heap, and unregisters on drop.I also checked the other
hr >= 0then*ppvspots inhle/d3d12x:create_devicereturns early on a nullppv,finish_two_passreturnsE_INVALIDARGfor it (so the mesh and GSdred::labelcalls after it are not reached), andcompute_containeris covered by #2297.Tested
32.0.16.1088),XCL_ADAPTER=506032.0.21042.62),XCL_ADAPTER=Radeonmain3ceb550with only the test added:cargo test -p xcl --test d3d12_resource_and_sync console_descriptor_heap_validation -- --test-threads=1panicked withnull pointer dereference occurredatreal.rs:1093(let raw = *ppv) and aborted with0xc0000409.mainb49be183; head5681f9fa:cargo test -p xcl --test d3d12_resource_and_sync --test d3d12_descriptor_heap_and_fence -- --test-threads=1:d3d12_resource_and_sync4 passed,d3d12_descriptor_heap_and_fence3 passed (0 failed, 0 ignored, 0 skipped) on both RTX 5060 and AMD Radeon RDNA2.XCL_ADAPTER=5060 cargo test --workspace -- --test-threads=4(NVIDIA RTX 5060): 1436 passed, 0 failed, 47 ignored (29 pre-existing runtimeSKIPPEDlines on wave32 NVIDIA / without D3D12 debug layer / Developer Mode / heap windows).Regression run
scripts/smoke.ps1blocks onmain(b49be183) and on this head (5681f9fa).Not tested
ppv, so this path only changes what happens on a validation call.AI use
b49be183, added the non-null registration/unregistration assertions per @bmjask's review, and ran the dual-GPU and workspace test suites.