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
|
…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>
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 |
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.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
XCL_ADAPTER=5060XCL_ADAPTER=Radeonmain3ceb550with only the test added:cargo test -p xcl --test d3d12_resource_and_sync console_descriptor_heap_validation -- --test-threads=1panics withnull pointer dereference occurredatreal.rs:1093(let raw = *ppv) and the test binary aborts with0xc0000409.main889ef3e; heade5e5528. On that head:cargo test -p xcl --test d3d12_resource_and_sync -- --test-threads=1: 4 passed, 0 failed, 0 ignored on both GPUs.cargo test --workspace --no-fail-fast -- --test-threads=4, withmain889ef3erun the same way for comparison:SKIPPEDlines (main: 1413 passed, 0 failed, 46 ignored).SKIPPEDlines (main: 1412 passed, 1 failed, 46 ignored). The failure isgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 783), the same as onmain, DXIL fuzz tests: fuzz_validate_and_gpu_1 fails on AMD (seed 722 and others, RDNA2-4), so the default suite is red there #2115.SKIPPEDlines are wave64-only and per-lanegpu::tests, plusheap_window_out_of_memory_falls_back_to_the_switch_form,shaders::tests::pso_measurement_compiles_an_exact_synthetic_record, the twothe title under the debug layerruns anduploads_start_from_each_subresources_state(no debug layer or Developer Mode here), and on the iGPUpassthrough_mesh_stream_accepts_a_triangle_driver_blob(no mesh shaders).Regression run
scripts/smoke.ps1run onmainand on this head.Not tested
ppv, so this path only changes what happens on a validation call.AI use
ppvsites inhle/d3d12xare reachable, wrote the fix and the test, ran the tests above and wrote this description.🤖 Generated with Claude Code