D3D12.X: write MEM_NULL_LOAD/MEM_NULL_STORE raw UAVs after fill_nulls in shared_heap #3349

Open
Kalmarv wants to merge 1 commit from upstream-pr/3349 into main
Kalmarv commented 2026-11-29 09:57:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-29T09:57:08Z.


Write the shared view heap's out-of-layout null raw buffer UAVs (MEM_NULL_LOAD and MEM_NULL_STORE) after fill_nulls in console_heap::shared_heap (crates/xcl/src/hle/d3d12x/console_heap.rs), so fill_nulls no longer overwrites those two RWByteAddressBuffer null UAV slots with Texture2D null SRV/UAV descriptors.

What is in it

  • crates/xcl/src/hle/d3d12x/console_heap.rs:
    • Move null_window_views(dev, cpu, inc) after the fill_nulls(dev, cpu, inc, MEM_HEAP_BASE, cap, at) pass in shared_heap. Previously null_window_views ran first and fill_nulls immediately overwrote MEM_NULL_LOAD (even index 20) with a Texture2D null SRV and MEM_NULL_STORE (odd index 21) with a Texture2D null UAV, causing descriptor-type mismatches whenever XCL_HEAP_WINDOWS=1 shaders redirected out-of-layout memory loads/stores to those slots (set_window_views only writes MEM_HEAP_BASE..MEM_NULL_LOAD).
    • Add child-isolated WARP + D3D12 debug-layer + GPU-based validation (ID3D12Debug1::SetEnableGPUBasedValidation(true)) test hle::d3d12x::console_heap::tests::shared_heap_preserves_null_window_raw_uavs that initializes shared_heap, dispatches a Direct DXIL SM 6.6 compute shader accessing ResourceDescriptorHeap[MEM_NULL_LOAD] and ResourceDescriptorHeap[MEM_NULL_STORE] as RWByteAddressBuffer, verifies readback (0 ^ 0xA5A5_5A5A), and asserts 0 D3D12 debug/GBV errors.

Tested

  • Targeted console_heap tests (cargo test -p xcl --lib -j 4 -- hle::d3d12x::console_heap:: and cargo test -p xcl --test console_heap_contract -j 4):
    • Before the fix: shared_heap_preserves_null_window_raw_uavs failed on WARP+GBV with two D3D12 GPU-based validation errors ([id=939] Descriptor Heap Index: [20], Descriptor Type in Heap: D3D12_DESCRIPTOR_RANGE_TYPE_SRV, Register Type: D3D12_DESCRIPTOR_RANGE_TYPE_UAV and [id=941] UAV Dimension Expected: D3D12_UAV_DIMENSION_BUFFER, UAV Dimension In Descriptor: D3D12_UAV_DIMENSION_TEXTURE2D, Descriptor Heap Index: [21]).
    • After the fix: 26 passed; 0 failed (0.27s) in hle::d3d12x::console_heap:: (including shared_heap_preserves_null_window_raw_uavs with 0 GBV errors and 0xA5A5_5A5A readback) and 9 passed; 0 failed (0.01s) in console_heap_contract.
  • Full workspace test suite on Windows 11 Pro (rustc 1.99.0, RTX 5070 Ti driver 32.0.16.1074, DXC 1.9.2609.5):
    • Command: cargo test --workspace -j 2 -- --test-threads=4 --skip test_title_runs_and_game_folder_is_untouched --skip uma_driver::tests::
    • Result: 2610 passed; 0 failed; 49 ignored (128.2s).
    • SKIPPED: 26 runtime SKIPPED lines (21 wave64-only checks on this wave32 RTX 5070 Ti, 3 wave32 per-lane #1426 op refusals, 2 heap-windows opt-in checks).

Regression run
Baseline (main ancestor f0e8fdd5c3942ddd399d5ee11384c8595c5aacff) and this PR (5dc64ea70b240d48ee0da31b1deff64ae1260710), 150 s on RTX 5070 Ti:

xcl-smoke v1
commit: f0e8fdd5c3942ddd399d5ee11384c8595c5aacff
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 150
exit: 0x0
frames shown: 1695 (PresentX 1695)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 31546 MB
xcl-smoke v1
commit: 5dc64ea70b240d48ee0da31b1deff64ae1260710
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 150
exit: 0x0
frames shown: 4154 (PresentX 4154)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17074 MB

Not tested

  • AMD RDNA hardware, macOS/Linux hosts, and set_window_views slot expansion past windows.len().max(MAX_WINDOWS) (left untouched for #3096).

AI use

  • Drafted, verified, and tested with Antigravity (Claude Opus 5.5 for initial patch/GBV test; Gemini 4 Neon for verification and PR maintenance); all code, tests, and regression runs were validated locally.
<!-- greyfinch-sync:ivall/xcl:issue:5549613123 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3349). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-29T09:57:08Z. --- Write the shared view heap's out-of-layout null raw buffer UAVs (`MEM_NULL_LOAD` and `MEM_NULL_STORE`) after `fill_nulls` in `console_heap::shared_heap` (`crates/xcl/src/hle/d3d12x/console_heap.rs`), so `fill_nulls` no longer overwrites those two `RWByteAddressBuffer` null UAV slots with `Texture2D` null SRV/UAV descriptors. **What is in it** - `crates/xcl/src/hle/d3d12x/console_heap.rs`: - Move `null_window_views(dev, cpu, inc)` after the `fill_nulls(dev, cpu, inc, MEM_HEAP_BASE, cap, at)` pass in `shared_heap`. Previously `null_window_views` ran first and `fill_nulls` immediately overwrote `MEM_NULL_LOAD` (even index `20`) with a `Texture2D` null SRV and `MEM_NULL_STORE` (odd index `21`) with a `Texture2D` null UAV, causing descriptor-type mismatches whenever `XCL_HEAP_WINDOWS=1` shaders redirected out-of-layout memory loads/stores to those slots (`set_window_views` only writes `MEM_HEAP_BASE..MEM_NULL_LOAD`). - Add child-isolated WARP + D3D12 debug-layer + GPU-based validation (`ID3D12Debug1::SetEnableGPUBasedValidation(true)`) test `hle::d3d12x::console_heap::tests::shared_heap_preserves_null_window_raw_uavs` that initializes `shared_heap`, dispatches a Direct DXIL SM 6.6 compute shader accessing `ResourceDescriptorHeap[MEM_NULL_LOAD]` and `ResourceDescriptorHeap[MEM_NULL_STORE]` as `RWByteAddressBuffer`, verifies readback (`0 ^ 0xA5A5_5A5A`), and asserts `0` D3D12 debug/GBV errors. **Tested** - Targeted `console_heap` tests (`cargo test -p xcl --lib -j 4 -- hle::d3d12x::console_heap::` and `cargo test -p xcl --test console_heap_contract -j 4`): - Before the fix: `shared_heap_preserves_null_window_raw_uavs` failed on WARP+GBV with two D3D12 GPU-based validation errors (`[id=939]` `Descriptor Heap Index: [20], Descriptor Type in Heap: D3D12_DESCRIPTOR_RANGE_TYPE_SRV, Register Type: D3D12_DESCRIPTOR_RANGE_TYPE_UAV` and `[id=941]` `UAV Dimension Expected: D3D12_UAV_DIMENSION_BUFFER, UAV Dimension In Descriptor: D3D12_UAV_DIMENSION_TEXTURE2D, Descriptor Heap Index: [21]`). - After the fix: `26 passed; 0 failed` (`0.27s`) in `hle::d3d12x::console_heap::` (including `shared_heap_preserves_null_window_raw_uavs` with `0` GBV errors and `0xA5A5_5A5A` readback) and `9 passed; 0 failed` (`0.01s`) in `console_heap_contract`. - Full workspace test suite on Windows 11 Pro (`rustc 1.99.0`, RTX 5070 Ti driver `32.0.16.1074`, DXC `1.9.2609.5`): - Command: `cargo test --workspace -j 2 -- --test-threads=4 --skip test_title_runs_and_game_folder_is_untouched --skip uma_driver::tests::` - Result: `2610 passed; 0 failed; 49 ignored` (`128.2s`). - `SKIPPED`: `26` runtime `SKIPPED` lines (`21` wave64-only checks on this wave32 RTX 5070 Ti, `3` wave32 per-lane `#1426` op refusals, `2` heap-windows opt-in checks). **Regression run** Baseline (`main` ancestor `f0e8fdd5c3942ddd399d5ee11384c8595c5aacff`) and this PR (`5dc64ea70b240d48ee0da31b1deff64ae1260710`), 150 s on RTX 5070 Ti: ``` xcl-smoke v1 commit: f0e8fdd5c3942ddd399d5ee11384c8595c5aacff gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 150 exit: 0x0 frames shown: 1695 (PresentX 1695) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 31546 MB ``` ``` xcl-smoke v1 commit: 5dc64ea70b240d48ee0da31b1deff64ae1260710 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 150 exit: 0x0 frames shown: 4154 (PresentX 4154) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17074 MB ``` **Not tested** - AMD RDNA hardware, macOS/Linux hosts, and `set_window_views` slot expansion past `windows.len().max(MAX_WINDOWS)` (left untouched for `#3096`). **AI use** - Drafted, verified, and tested with Antigravity (`Claude Opus 5.5` for initial patch/GBV test; `Gemini 4 Neon` for verification and PR maintenance); all code, tests, and regression runs were validated locally.
Foniass commented 2026-12-01 05:31:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:31:03Z.


merge-check
base: d0832e614f
head: 5dc64ea70b
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2891 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (console_heap.rs: a 3-line move plus the test). The bug is real on main: shared_heap writes the raw null UAVs (~503) and then fill_nulls(MEM_HEAP_BASE..cap) (~511) writes Texture2D nulls over descriptors 20 and 21. Those slots are never handed out (next starts at 22) and are outside every range that release, drain or resource_gone refill, so writing them once at creation is enough. By default slots 20/21 now hold raw buffer null UAVs instead of Texture2D nulls; only XCL_HEAP_WINDOWS=1 (off by default) uses them, and a garbage T# index of 20 would find a UAV in an SRV slot, the same kind of risk slots 4-19 already carry with heap windows on. Findings: (1) the test catches the bug only through GPU-based validation: a null descriptor reads 0 whatever its type, so the readback (~3022) passes on main too, and without the debug layer it skips. (2) The PR's smoke numbers (4154 vs 1695 frames) aren't caused by this change: smoke doesn't turn heap windows on, and main's run had stopped presenting. (3) AI use names no tool or model. Fine: the test runs in its own child process and calls skip_test; open #3486 says it depends on this PR.
performance: 60 s smoke of a retail title, main d0832e61 vs this merge (ac66e869): 1516 -> 1652 frames shown (108 %; last presents per 2 s: 60 60 60), peak commit 18133 -> 17101 MB, 0 device removals, 0 crashes. Smoke doesn't set XCL_HEAP_WINDOWS=1, so descriptors 20/21 aren't used here.
verdict: safe to merge (the test only catches the bug through GPU-based validation; the description should name the AI model)
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7301854379 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3349#issuecomment-7301854379). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:31:03Z. --- merge-check base: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f head: 5dc64ea70b240d48ee0da31b1deff64ae1260710 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2891 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: read the whole diff (console_heap.rs: a 3-line move plus the test). The bug is real on main: `shared_heap` writes the raw null UAVs (~503) and then `fill_nulls(MEM_HEAP_BASE..cap)` (~511) writes Texture2D nulls over descriptors 20 and 21. Those slots are never handed out (`next` starts at 22) and are outside every range that release, drain or `resource_gone` refill, so writing them once at creation is enough. By default slots 20/21 now hold raw buffer null UAVs instead of Texture2D nulls; only `XCL_HEAP_WINDOWS=1` (off by default) uses them, and a garbage T# index of 20 would find a UAV in an SRV slot, the same kind of risk slots 4-19 already carry with heap windows on. Findings: (1) the test catches the bug only through GPU-based validation: a null descriptor reads 0 whatever its type, so the readback (~3022) passes on main too, and without the debug layer it skips. (2) The PR's smoke numbers (4154 vs 1695 frames) aren't caused by this change: smoke doesn't turn heap windows on, and main's run had stopped presenting. (3) AI use names no tool or model. Fine: the test runs in its own child process and calls `skip_test`; open #3486 says it depends on this PR. performance: 60 s smoke of a retail title, main d0832e61 vs this merge (ac66e869): 1516 -> 1652 frames shown (108 %; last presents per 2 s: 60 60 60), peak commit 18133 -> 17101 MB, 0 device removals, 0 crashes. Smoke doesn't set XCL_HEAP_WINDOWS=1, so descriptors 20/21 aren't used here. verdict: safe to merge (the test only catches the bug through GPU-based validation; the description should name the AI model) hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
bmjask commented 2026-12-02 01:22:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T01:22:18Z.

Code review location: crates/xcl/src/hle/d3d12x/console_heap.rs; line 510

@@ -511,6 +510,9 @@ pub unsafe fn shared_heap(dev: &ID3D12Device) -> bool {
         fill_nulls(dev, cpu, inc, crate::gpu::recomp::MEM_HEAP_BASE, cap, at);

The fix for slots 20/21 looks right, but fill_nulls still starts at MEM_HEAP_BASE, so it writes Texture2D null SRV/UAVs over the window slots 4..19, which are reserved for raw buffer UAVs too. set_window_views only rewrites windows.len().max(MAX_WINDOWS) slots (4 for a normal layout), so slots 8..19 keep Texture2D nulls. A heap-windows shader that reaches window k >= count (a cached PSO translated for a wider layout, or the #3096 expansion) hits the same type mismatch this PR fixes for 20/21 (GBV 939/941, undefined on hardware). Starting fill_nulls at MEM_NULL_STORE + 1 (where Global.next starts), and having null_window_views write raw null UAVs for all of MEM_HEAP_BASE..=MEM_NULL_STORE once, would fix the whole region.

<!-- greyfinch-sync:ivall/xcl:review-comment:4763436243 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3349#discussion_r4763436243). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T01:22:18Z. **Code review location:** `crates/xcl/src/hle/d3d12x/console_heap.rs`; line 510 ~~~~diff @@ -511,6 +510,9 @@ pub unsafe fn shared_heap(dev: &ID3D12Device) -> bool { fill_nulls(dev, cpu, inc, crate::gpu::recomp::MEM_HEAP_BASE, cap, at); ~~~~ --- The fix for slots 20/21 looks right, but `fill_nulls` still starts at MEM_HEAP_BASE, so it writes Texture2D null SRV/UAVs over the window slots 4..19, which are reserved for raw buffer UAVs too. `set_window_views` only rewrites `windows.len().max(MAX_WINDOWS)` slots (4 for a normal layout), so slots 8..19 keep Texture2D nulls. A heap-windows shader that reaches window k >= count (a cached PSO translated for a wider layout, or the #3096 expansion) hits the same type mismatch this PR fixes for 20/21 (GBV 939/941, undefined on hardware). Starting `fill_nulls` at MEM_NULL_STORE + 1 (where Global.next starts), and having `null_window_views` write raw null UAVs for all of MEM_HEAP_BASE..=MEM_NULL_STORE once, would fix the whole region.
bmjask commented 2026-12-02 01:22:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T01:22:18Z.

Code review location: crates/xcl/src/hle/d3d12x/console_heap.rs; line 515

@@ -511,6 +510,9 @@ pub unsafe fn shared_heap(dev: &ID3D12Device) -> bool {
         fill_nulls(dev, cpu, inc, crate::gpu::recomp::MEM_HEAP_BASE, cap, at);
         (h, at)
     });
+    // Written after `fill_nulls` so the two out-of-layout raw buffer null UAVs at
+    // `MEM_NULL_LOAD` and `MEM_NULL_STORE` are not overwritten with Texture2D null SRV/UAVs.
+    null_window_views(dev, cpu, inc);

Not certain about this one: with slots 20/21 holding raw buffer UAVs again, a stale or garbage T# index that lands on them reaches a raw UAV through a Texture2D access. The image guard only checks tw0 < VIEW_HEAP_MAX_SRV, with no lower bound past the window region. A T# with word 0 = 20 indexes ResourceDescriptorHeap[20] as Texture2D and [21] as RWTexture2D and finds a 4-byte raw buffer UAV. The MEM_HEAP_BASE doc already records that a raw buffer UAV read as a texture hangs NVIDIA GPUs, and the shared_heap comment's promise that garbage T# indexes read zeros no longer holds for 4..21.

<!-- greyfinch-sync:ivall/xcl:review-comment:4763436251 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3349#discussion_r4763436251). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T01:22:18Z. **Code review location:** `crates/xcl/src/hle/d3d12x/console_heap.rs`; line 515 ~~~~diff @@ -511,6 +510,9 @@ pub unsafe fn shared_heap(dev: &ID3D12Device) -> bool { fill_nulls(dev, cpu, inc, crate::gpu::recomp::MEM_HEAP_BASE, cap, at); (h, at) }); + // Written after `fill_nulls` so the two out-of-layout raw buffer null UAVs at + // `MEM_NULL_LOAD` and `MEM_NULL_STORE` are not overwritten with Texture2D null SRV/UAVs. + null_window_views(dev, cpu, inc); ~~~~ --- Not certain about this one: with slots 20/21 holding raw buffer UAVs again, a stale or garbage T# index that lands on them reaches a raw UAV through a Texture2D access. The image guard only checks `tw0 < VIEW_HEAP_MAX_SRV`, with no lower bound past the window region. A T# with word 0 = 20 indexes ResourceDescriptorHeap[20] as Texture2D and [21] as RWTexture2D and finds a 4-byte raw buffer UAV. The MEM_HEAP_BASE doc already records that a raw buffer UAV read as a texture hangs NVIDIA GPUs, and the shared_heap comment's promise that garbage T# indexes read zeros no longer holds for 4..21.
bmjask commented 2026-12-02 01:22:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T01:22:18Z.

Review: COMMENTED


Review of 5dc64ea7: 2 finding(s). 2 are inline.


These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6143188720 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3349#pullrequestreview-6143188720). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T01:22:18Z. **Review:** COMMENTED --- Review of `5dc64ea7`: 2 finding(s). 2 are inline. --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
SavageCore commented 2026-12-02 04:30:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SavageCore on 2026-12-02T04:30:47Z.

Review: COMMENTED


sorry, ignore, agent went crazy

<!-- greyfinch-sync:ivall/xcl:review:6144785965 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3349#pullrequestreview-6144785965). Originally posted by [SavageCore](https://github.com/SavageCore) on 2026-12-02T04:30:47Z. **Review:** COMMENTED --- sorry, ignore, agent went crazy
Pipodi commented 2026-12-02 10:48:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-12-02T10:48:56Z.


merge-check
base: 1c8b551475
head: 5dc64ea70b
merge: clean (merge commit bfb2d5db2d578a7ab0860cd4ab4125587f2938b9)
build: cargo build --workspace -> ok (and cargo build --release -p xcl -> ok)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2910 passed, 0 failed, 51 ignored; failing: none. 25 SKIPPED lines (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache). shared_heap_preserves_null_window_raw_uavs runs here (the debug layer is installed; the test turns on GPU-based validation on WARP itself, no env needed) and passes. With only the 3-line move reverted (test kept) it fails at console_heap.rs:3037 with two GBV errors: heap index 20 is an SRV where the shader has a UAV, and index 21 is a TEXTURE2D UAV where the shader expects a BUFFER UAV.
review:

  • Correct: on the base null_window_views (console_heap.rs:503) runs before fill_nulls(MEM_HEAP_BASE..cap) (:511), which copies the null block over 20 (even: Texture2D null SRV) and 21 (odd: Texture2D null UAV); writing them after fill_nulls (:515 in the merge) fixes both. shared_heap is the only caller of null_window_views; the other fill_nulls callers (resource_gone :418, range release/drain :708/:768, GONE copies :1308) only touch handed-out slots, which start at MEM_NULL_STORE + 1 (:536), so 20/21 are never overwritten later. The test runner's heaps (runner.rs:1599/1891) write the same views without fill_nulls. Without the CPU-only null heap fill_nulls does not run and the order does not matter.
  • Format: raw_window_uav(4) is an R32_TYPELESS buffer UAV with the RAW flag, which is what the heap-window accessors bind at those indexes (RWByteAddressBuffer from ResourceDescriptorHeap, emit.rs:6228); with no resource, loads read 0 and stores are dropped.
  • Minor (test): when the child process skips (no debug layer, no WARP, no SM 6.6), the parent only checks the exit status and drops the child's output, so no SKIPPED line reaches the suite and the test shows ok without coverage.
  • Description: AI use still names no tool or model (the point from the first check is not fixed).
    performance: no cost by default: one more pair of view writes at heap creation, and slots 20/21 are only bound with heap windows on (XCL_HEAP_WINDOWS=1, off by default). Smoke pair on the retail title, 60 s, same scripted presses on both sides, one untimed warm-up run before each: main 1611 frames, peak commit 19846 MB; merge 1594 frames (98.9 %), 19825 MB (99.9 %); 0 device removals and 0 crashes on both. The smoke runs do not set XCL_HEAP_WINDOWS=1, so they do not reach descriptors 20/21.

main (base):

xcl-smoke v1
commit: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f
gpu: NVIDIA GeForce RTX 4090
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1611 (PresentX 1611)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19846 MB

this PR merged into base:

xcl-smoke v1
commit: bfb2d5db2d578a7ab0860cd4ab4125587f2938b9
gpu: NVIDIA GeForce RTX 4090
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1594 (PresentX 1594)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 19825 MB

verdict: safe to merge (the AI use section should still name the tool and model)
hardware / tool and model: NVIDIA GeForce RTX 4090 24 GB, driver 621.40; Intel Core i9-13900K, 32 GB; Windows 11 build 26300; rustc 1.100.0; debug suite, release smoke. Claude Code, Claude Opus 5.5 (ran the merge, build, suite, revert test and smoke pair, and wrote this check).

<!-- greyfinch-sync:ivall/xcl:comment:7343020276 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3349#issuecomment-7343020276). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-12-02T10:48:56Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: 5dc64ea70b240d48ee0da31b1deff64ae1260710 merge: clean (merge commit bfb2d5db2d578a7ab0860cd4ab4125587f2938b9) build: cargo build --workspace -> ok (and cargo build --release -p xcl -> ok) tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2910 passed, 0 failed, 51 ignored; failing: none. 25 SKIPPED lines (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache). `shared_heap_preserves_null_window_raw_uavs` runs here (the debug layer is installed; the test turns on GPU-based validation on WARP itself, no env needed) and passes. With only the 3-line move reverted (test kept) it fails at console_heap.rs:3037 with two GBV errors: heap index 20 is an SRV where the shader has a UAV, and index 21 is a TEXTURE2D UAV where the shader expects a BUFFER UAV. review: - Correct: on the base `null_window_views` (console_heap.rs:503) runs before `fill_nulls(MEM_HEAP_BASE..cap)` (:511), which copies the null block over 20 (even: Texture2D null SRV) and 21 (odd: Texture2D null UAV); writing them after `fill_nulls` (:515 in the merge) fixes both. `shared_heap` is the only caller of `null_window_views`; the other `fill_nulls` callers (`resource_gone` :418, range release/drain :708/:768, `GONE` copies :1308) only touch handed-out slots, which start at `MEM_NULL_STORE + 1` (:536), so 20/21 are never overwritten later. The test runner's heaps (runner.rs:1599/1891) write the same views without `fill_nulls`. Without the CPU-only null heap `fill_nulls` does not run and the order does not matter. - Format: `raw_window_uav(4)` is an R32_TYPELESS buffer UAV with the RAW flag, which is what the heap-window accessors bind at those indexes (`RWByteAddressBuffer` from `ResourceDescriptorHeap`, emit.rs:6228); with no resource, loads read 0 and stores are dropped. - Minor (test): when the child process skips (no debug layer, no WARP, no SM 6.6), the parent only checks the exit status and drops the child's output, so no SKIPPED line reaches the suite and the test shows `ok` without coverage. - Description: AI use still names no tool or model (the point from the first check is not fixed). performance: no cost by default: one more pair of view writes at heap creation, and slots 20/21 are only bound with heap windows on (`XCL_HEAP_WINDOWS=1`, off by default). Smoke pair on the retail title, 60 s, same scripted presses on both sides, one untimed warm-up run before each: main 1611 frames, peak commit 19846 MB; merge 1594 frames (98.9 %), 19825 MB (99.9 %); 0 device removals and 0 crashes on both. The smoke runs do not set XCL_HEAP_WINDOWS=1, so they do not reach descriptors 20/21. main (base): ``` xcl-smoke v1 commit: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f gpu: NVIDIA GeForce RTX 4090 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1611 (PresentX 1611) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 19846 MB ``` this PR merged into base: ``` xcl-smoke v1 commit: bfb2d5db2d578a7ab0860cd4ab4125587f2938b9 gpu: NVIDIA GeForce RTX 4090 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1594 (PresentX 1594) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 19825 MB ``` verdict: safe to merge (the AI use section should still name the tool and model) hardware / tool and model: NVIDIA GeForce RTX 4090 24 GB, driver 621.40; Intel Core i9-13900K, 32 GB; Windows 11 build 26300; rustc 1.100.0; debug suite, release smoke. Claude Code, Claude Opus 5.5 (ran the merge, build, suite, revert test and smoke pair, and wrote this check).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3349:upstream-pr/3349'
git switch 'upstream-pr/3349'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3349'
git switch 'upstream-pr/3349'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3349'
git switch 'upstream-pr/3349'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3349'
git switch 'main'
git merge --squash 'upstream-pr/3349'
git switch 'main'
git merge --ff-only 'upstream-pr/3349'
git switch 'main'
git merge 'upstream-pr/3349'
git push origin 'main'
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!3349
No description provided.