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

Closed
guinpereira wants to merge 1 commit from upstream-pr/2846 into main
guinpereira commented 2026-11-26 18:26:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by guinpereira on 2026-11-26T18:26:25Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:5515258072 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2846). Originally posted by [guinpereira](https://github.com/guinpereira) on 2026-11-26T18:26:25Z. --- 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 commented 2026-11-26 21:09:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-26T21:09:54Z.


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 #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.

<!-- greyfinch-sync:ivall/xcl:comment:7203453817 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2846#issuecomment-7203453817). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-26T21:09:54Z. --- **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 #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.
raylitebull commented 2026-11-28 21:13:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-28T21:13:45Z.


Closing as a duplicate of #2802 (confirmed by 2+ contributors in #1607, group D143). Thanks for the contribution — feel free to comment if this covers something #2802 does not.

<!-- greyfinch-sync:ivall/xcl:comment:7245865256 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2846#issuecomment-7245865256). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-28T21:13:45Z. --- Closing as a duplicate of #2802 (confirmed by 2+ contributors in #1607, group D143). Thanks for the contribution — feel free to comment if this covers something #2802 does not.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2846
No description provided.