Repository navigation
Conversation
The null backend's heap GetDesc slot zeroed only bytes 0-39 of the 48-byte D3D12_HEAP_DESC, so Flags (offset 40) kept whatever the caller's buffer held. The null heap now keeps the desc it was created with (CreateHeap and CreateHeap1) and GetDesc writes all 48 bytes, in both calling orders; a heap created without a desc reads back zeroed. Fixes xcl-dev#2783 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Independent Windows A/B of the null device’s
Windows 11 build 26200, Ryzen 9 8945HX, Rust 1.97.1 MSVC debug. OpenAI Codex assisted with the test and verification. The exact model identifier was unavailable in this session. |
|
Linux (Wine) dual-lane run at head
Suite: Fresh Results at Conclusion from two vendors: the null-device Not tested: the real-device AI use: Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting. |
The null backend's
ID3D12Heap::GetDesczeroed only bytes 0-39 of the 48-byteD3D12_HEAP_DESC, soFlags(offset 40) kept whatever the caller's buffer held. The null heap now keeps the desc it was created with andGetDescwrites all 48 bytes.Fixes #2783
What is in it
crates/xcl/src/hle/d3d12x/null.rs:CreateHeap/CreateHeap1keep the desc (new_heap),Heap_GetDesc48writes all 48 bytes in both calling orders, and the now unusedHidden_ZeroDesc40is removed. The other nullGetDescslots (command queue 16 bytes, descriptor heap 16 bytes, resource 56 bytes) already match their structs. Testheap_get_desc_fills_all_48_bytes: sentinel-filled buffers, both orders, and a heap created without a desc reads back zeroed.Tested
cargo test -p xcl --lib -j 4 d3d12x::null: 7 passed, 0 failed, 0 ignored, 1330 filtered out00b0d9c4(clean detached checkout, RX 7800 XT driver 32.0.31035.1003, noXCL_ADAPTERset, debug):cargo build --workspace -j 4, thencargo test --workspace -j 4 --no-fail-fast -- --test-threads=4: 1435 passed, 1 failed, 47 ignored over 37 test binaries (lib: 1309 passed, 1 failed, 27 ignored). 7 SKIPPED messages: sixf16_programs_on_the_gpu/f32_programs_on_the_gpucases the lowering refuses (V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32) andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).heap_get_desc_fills_all_48_bytespassed.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1("seed 722: res[30] = 0x1, CPU 0x7fffffff", 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). It fails the same way, same seed, onmainate120925e, so it is not caused by this PR.cargo clippy: nothing new on the changed linesRegression run
Same title, 60 s each, same machine, one after the other (RX 7800 XT). Blocks pasted unedited from
scripts/smoke.ps1.main:
PR:
Not tested
AI use
mainwere made with Claude Code (Claude Sonnet 5.5), which also added them to this description.🤖 Generated with Claude Code