Skip to content

D3D12.X: clear Flags in null heap GetDesc (bytes 40-43) - #2846

Open
guinpereira wants to merge 1 commit into
xcl-dev:mainfrom
guinpereira:fix/null-heap-getdesc-flags
Open

guinpereira wants to merge 1 commit into
xcl-dev:mainfrom
guinpereira:fix/null-heap-getdesc-flags

Conversation

@guinpereira

@guinpereira guinpereira commented Nov 26, 2026 •

Copy link
Copy Markdown

Fixes #2783.

Clears the full 48-byte D3D12_HEAP_DESC in the null backend's GetDesc instead of only the first 40 bytes, so Flags (bytes 40-43) is zeroed. Adds a regression test.

What is in it

  • crates/xcl/src/hle/d3d12x/null.rs: Hidden_ZeroDesc40 -> Hidden_ZeroDesc48, writing 48 bytes instead of 40; vtable slot updated.
  • Regression test null_heap_getdesc_clears_flags.

Tested

  • Windows 11, NVIDIA GeForce RTX 5060 Ti, Rust stable (x86_64-pc-windows-msvc), debug build.
  • cargo test -p xcl --lib -- --test-threads=4: 1315 passed, 4 failed (GPU OOM in dxil fuzz tests, environment), 27 ignored. New test passes.
  • cargo build -p xcl: clean.

Regression run

xcl-smoke v1
commit: 05adb5a9cfc718119c0c9c097365983e67982d05
gpu: NVIDIA GeForce RTX 5060 Ti
title: gta6
seconds: 60
exit: 0x0
frames shown: 1043 (PresentX 1043)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15536 MB

Reference run on the author's local main (05adb5a). A run on ivall/xcl main and on this PR's head commit (a4421e0) is still pending (cold shader cache crashes the title's startup precompile on this machine).

Not tested

  • Smoke on ivall/xcl main baseline and on this PR's head commit (pending, see above).
  • The fix is in the null (no-GPU) backend only.

AI use
OpenCode, Beam Free - drafted the change and the regression test; smoke run and review by the author.

@SlopTart

Copy link
Copy Markdown

Linux (Wine) dual-lane run at head a4421e06 (base verified as exactly current main 8b957bec) - your Flags fix is green on both Wine stacks.

  • Rig: Ryzen 9 9900X, 96 GB DDR5, RX 7900 XT (Mesa 26.2.5 RADV), Arch, wine-11.0 Proton build + vkd3d-proton
  • Boxb: i5-10600K, 16 GB DDR4, GTX 1070 (550.163.01), Debian 13, stock wine-10.0 + vkd3d-proton, xvfb

Suite: cargo test --release --locked -p xcl --lib --target x86_64-pc-windows-gnu -- --test-threads=2 --skip gpu::, compared against today's fresh main baseline on the same machines (rig 606/2, boxb 605/3).

  • null::tests::null_heap_getdesc_clears_flags (new here): ok on both lanes. This closes the bytes 40-43 gap our D3D12.X: null ID3D12Heap::GetDesc returns the full 48-byte heap desc #2802 row certified around - the 48-byte fill was right there, but Flags was never asserted until now.
  • rig: 606/3, boxb: 606/3. Boxb's reds are exactly the base three.
  • The rig's third red was sparse::tests::a_tile_decommitted_and_committed_again_keeps_its_video_memory - investigated, not yours: solo --exact runs are green 3/3 at your head and 3/3 at the main base, and your head is green in boxb's suite. One appearance under suite load on one machine = load-dependent flake in that sparse test, worth knowing about independently of this PR.

No other movement in either red set.

AI use: Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

D3D12.X: null ID3D12Heap::GetDesc leaves Flags untouched

2 participants