Recompiler: NVIDIA compute programs take flat heap windows by default #2428

Open
github-bot wants to merge 2 commits from github-bot/gh-2428 into main AGit
Owner

@⁠Kalmarv on GitHub · 2026-11-25 18:37 UTC · original
Kalmarv:heap-windows-default → main · +394 −42 · 11 files · 2 commits · open

Part of #2088. Stacked on #2427; only the top commit belongs here.

On NVIDIA, this PR turns #2427's flat heap windows on by default, for compute programs only. Graphics stages, mesh, GS, other vendors and the HLSL path keep the switch over root UAVs, as they do today.

What it changes for compute programs on NVIDIA, compared with main's form (#2368's select over root UAVs):

  • Native code: @⁠pvfreis measured 60 records on an RTX 3060 (comment 7177531683). The driver's compiled code (GetCachedBlob) was 41.11 MB with this form and 51.17 MB with root UAVs, a ratio of 0.803 (0.465–0.922 per record). NVIDIA removes the device when a title's compiled shader code reaches about 448 MB in total (#2403). I have not measured how much this moves that point for a whole title.
  • DXIL: 11–21 % smaller (median 18 %) in @⁠Royalflamejlh's runs (comment 7179985117).
  • Compile time: only measured natively on Windows, on an RTX 5070 Ti (NVIDIA 610.74), for five large compute programs. Against main's form (#2368's select) this form built 22–48 % faster (geomean 7.67 vs 12.72 s, 0.603), with native code 0.877 times the size in that job. Against the switch from before #2368 it built 1.5–3.6 times as fast. Tables are in #2427. The gain is shown only for those few large programs. Under Wine and vkd3d-proton, @⁠Royalflamejlh's times did not separate from the spread between runs (see Tested by others).

How it decides:

  • XCL_HEAP_WINDOWS set: 1 gives heap windows to every stage, as before; 0 turns them off.
  • Unset: heap windows are on when the title's adapter is NVIDIA (PCI vendor 0x10DE), and only for the compute programs the direct translator makes (compute_mem_windows).
  • Flat form: on by default; XCL_HEAP_FLAT=0 brings back the guarded form.
  • Refused pipelines: a pipeline the driver refuses with heap windows (E_OUTOFMEMORY, #156) is still built in the switch form (927adcc0's with_switch_fallback). Only builds that had heap windows are rebuilt that way. A graphics or mesh build without them is not built twice (@⁠bmjask's review).
  • Views not made: if the heap views cannot be made, everything takes the switch, as before.
  • What else turns on: on NVIDIA, the windows' heap views are now made at start by default, and command lists bind the shared heap when they set none, as XCL_HEAP_WINDOWS=1 did. This applies to every list, graphics included, although graphics shaders still take the switch.

Why only compute, and not the HLSL path:

  • Measured: the timings were all of direct-DXIL compute programs.
  • Graphics: for NVIDIA pixel shaders, #2368 measured a select-flattened form as slower.
  • HLSL path: its heap form is not measured.

XCL_HEAP_WINDOWS was opt-in because two NVIDIA setups failed with it in #187's review:

  • The failures: the driver's compiler ended the process, and the device was removed when the views were made on an 8 GB card.
  • Fixed since: pipelines the driver refuses with E_OUTOFMEMORY now fall back to the switch form (927adcc0). A view that some D3D12 runtimes refused, removing the device, is now capped (deb4b92b).
  • Not confirmed: that those fixes cover the two failures. Neither setup was re-run.

What is in it

  • gpu/recomp/pso.rs:
    • heap_windows with the vendor default, set_adapter_vendor, heap_windows_everywhere, compute_mem_windows / compute_windows and hlsl_windows.
    • console_to_dxil_for takes the compute windows for a compute program.
    • XCL_HEAP_FLAT is on by default.
    • Tests: the default rule per vendor and env, and the windows each form takes.
  • hle/d3d12x/real.rs:
    • The device's adapter vendor is noted before the UMA opens.
    • with_switch_fallback takes whether the build has heap windows: the compute windows for a compute build, the graphics windows for graphics and mesh. driver_pso retries E_OUTOFMEMORY in the switch form only for such a build.
    • Tests in switch_fallback_tests: an E_OUTOFMEMORY without heap windows is not retried, one with heap windows is built again once, and a driver call outside a translated build is not a heap-window build.
  • shaders.rs, gpu/adapter.rs: the --precompile / --export-hlsl / --measure-pso windows are the runtime's, per stage, for the bench's adapter. Compute programs take pso::compute_windows, as compute_mem_windows does. VS, PS and mesh programs take pso::graphics_windows, as mem_windows does. So by default on NVIDIA only the compute programs are precompiled with heap windows. Before, every stage got the compute count, so precompiled VS, PS and mesh entries missed at run time (found by @⁠pvfreis, comment 7181439405).
  • gpu/uma.rs: XCL_UMA_WINDOWS=8|16 still needs XCL_HEAP_WINDOWS=1, since graphics need the heap for more than 4 windows.
  • tests/gpu_compute_e2e.rs: the switch-form fallback test checks the compute windows.

Tested

  • Ryzen 9 9950X, RTX 5070 Ti (NVIDIA 610.74), Windows 11 build 26200, rustc 1.99.0, DXC 1.9.2609, debug.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on this head, c6e5af86 (on #2427's c8c2b7a6 and main 6d12f58a): 1431 passed, 0 failed, 46 ignored.
    • 24 SKIPPED notices: 21 for no wave64, and 3 for wave32 per-lane forms refused by the #1426 list (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32).
    • heap_window_out_of_memory_falls_back_to_the_switch_form runs, because heap windows are on by default on this NVIDIA card, and passes: a refused heap-window pipeline is rebuilt in the switch form and runs correctly.
    • The three switch_fallback_tests pass, and so do #2427's gpu_heap_flat_reads_match_the_switch_form, only_compute_programs_read_heap_windows_flat and precompile_windows_are_the_runtimes. The last checks the precompile's windows per stage against the runtime's: with XCL_HEAP_WINDOWS=1, and with it unset on an NVIDIA and an AMD vendor, each in a new process. With the old single count it fails on NVIDIA's default: VS, PS and mesh got 772 where the runtime uses 4.
  • Offline count of precompiled VS entries a title run finds, the first 4,000 records of the title's shader pack, release:
    • How: a fresh DXIL cache; xcl shaders --precompile --only vs with default settings; then the same with XCL_HEAP_WINDOWS=0, whose VS keys are the runtime's default ones. The second run's already-cached count is what the runtime finds.
    • 970823e4 (before): the second run compiled 542 again and found only the 12 that repeat within the pack. None of the 542 precompiled VS entries are found.
    • c6e5af86: the second run compiled none and found all 554.
    • PS: not counted. The first 6,000 records hold none, and a full-pack count takes close to an hour. In precompile, PS and mesh programs take the same count as VS.

Tested by others

  • @⁠upipibi (comment 7172640860), thank you: RTX 3070 8 GB, NVIDIA 616.56, Windows 11, debug.
    • On 970823e, one push before this head (which changes only the precompile's VS, PS and mesh windows), as is: cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2: 1422 passed, 0 failed, 46 ignored. The 16 heap-window tests ran, none skipped, with no device removal. 25 SKIPPED lines (no wave64 and the like).
    • Earlier, on ab2855f: 1417 passed, 0 failed, 46 ignored; on dbf54bf: 1350 passed, 0 failed, 46 ignored.
    • Lib and workspace tests only; no title run on an 8 GB card.
  • @⁠futurepro62 (comment 7186946135), thank you: this head, c6e5af86, debug, Ryzen 7 9800X3D, Windows 11.
    • RTX 5070 Ti, NVIDIA 621.40, XCL_REQUIRE_GPU=mesh: 1419 passed, 0 failed, 44 ignored. All 8 new tests ran and passed.
    • The Radeon integrated GPU (iGPU) of that CPU, RDNA2: 1430 passed, 0 failed, 46 ignored. heap_window_out_of_memory_falls_back_to_the_switch_form skipped there with "no heap windows", as it should off NVIDIA.
    • Their --skip list on NVIDIA includes heap_window_out_of_memory_falls_back_to_the_switch_form, so that run does not cover it (@⁠thehollowedone's run below does). Its other skips are main's tests, which this PR does not change.
  • @⁠thehollowedone (comment 7188274961), thank you: RTX 3080 Ti, NVIDIA 621.35, Windows 11, debug, this head c6e5af86.
    • heap_window_out_of_memory_falls_back_to_the_switch_form with XCL_HEAP_WINDOWS unset and XCL_REQUIRE_GPU=mesh: 1 passed, 0 failed, 0 ignored. It ran on the real adapter with the heap views made by default, and the injected out-of-memory gave one switch-form rebuild.
    • Workspace suite: 1431 passed, 0 failed, 46 ignored.
    • The out-of-memory is the test's injection, not a real driver one; no title run.
  • @⁠pickles976 (comment 7183101099): RTX 4060 Laptop 8 GB, NVIDIA 590.48.1, Wine 11.0, on af825308. Since then only the precompile's windows changed (shaders.rs, and pso::graphics_windows with the same rule as before); the fallback path is the same.
    • heap_window_out_of_memory_falls_back_to_the_switch_form passes 1/1, and the forced out-of-memory fires on the real adapter: the pipeline is built again in the switch form.
    • Caveats: it ran on a relaxed vkd3d-proton diagnostic build with the identity checks compiled out, so it checks the test's assertions, not XCL's vtable patching against a stock runtime. On stock vkd3d-proton 3.2.0 the test stops at the #175 identity assertion. No title run.
  • @⁠pvfreis (comment 7177531683): RTX 3060, NVIDIA 617.14. ab2855f with #2496 on main e1d84b7d.
    • Suite: 1429 passed, 1 failed, 46 ignored. The failure, the e2e presents test, also fails on that main (1422 passed, 1 failed, 46 ignored).
    • Native code over 60 records: root UAVs 51.17 MB, guarded heap 42.19 MB, flat heap 41.11 MB.
    • Flat over root UAVs is 0.803 (0.465–0.922 per record). Flat over guarded is 0.974 (0.901–1.039), and 12 of the 60 are larger.
    • Repeat builds had the same sizes but different contents for 18 and 8 of the 60.
    • No build times.
  • @⁠Royalflamejlh (comment 7179985117): RTX 4070 12 GB, NVIDIA 615.71.09, Fedora 44, Wine 11.21 Staging, vkd3d-proton v3.1-90 with XCL's relaxed-vtable patch, release.
    • Builds: ab2855f with #684 on 6d12f58a, XCL_DIRECT_DXIL=1.
    • Runs: cold, 200 s, two runs with this default and two with XCL_HEAP_WINDOWS=0.
    • What the times are: vkd3d-proton's whole pipeline creation under Wine (dxil-spirv, then the driver), not native Create*PipelineState time.
    • Results:
      • DXIL was 11–21 % smaller (median 18 %).
      • The 18 programs whose DXIL changed took 73.0 s per run against 96.9 s, nearly all of it in the two largest.
      • Their median ratio was 0.98. Without the two largest, the heap-window runs were slower: 56.8 s against 51.7 s.
      • Six programs with the same DXIL either way were also faster in the heap-window runs (median ratio 0.43), so part of the difference comes from the runs, not the form. At most 2 large builds ran at once in the heap-window runs, and 3 in the others.
    • A fifth =0 run lost its device at 77.9 s in vkd3d-proton and is left out.
    • Not this head (c6e5af86) itself.
  • AMD: this PR keeps root UAVs there by default. @⁠bielfreedom's RX 9070 XT timing of the flat form against the guarded one, with heap windows on, is in #2427 (comment 7180279957): 11 % less CreateComputePipelineState time over 26 large programs.

Regression run

  • Setup: scripts/smoke.ps1 through our run script, 120 s, release builds, XCL_DIRECT_DXIL=1, in one queue job: main b49be18, then this head. Both sides use the same data root and XCL cache, warmed by earlier runs, and start from the same learned coherent-window state.
  • Beside it: another agent's offline export job ran on the same machine through both sides; no precompile ran beside it.
  • Result: no device removal and no crash. This PR showed 140 % of main's frames (2227 against 1593) and 50 % of its peak commit (14319 against 28787 MB). Its last 6 s still presented 60 frames per 2 s, where main's presented none. One run each; I have not looked into why the two differ this much.

main b49be18:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 120
exit: 0x0
frames shown: 1593 (PresentX 1593)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 28787 MB

This PR (c6e5af86):

xcl-smoke v1
commit: c6e5af8690fc6257926d5cfca9443e01e60d14dc
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 120
exit: 0x0
frames shown: 2227 (PresentX 2227)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14319 MB

Not tested

  • AMD and Intel (unchanged by default). Native Linux; @⁠Royalflamejlh's run is under Wine and vkd3d-proton.
  • Compile time for programs other than the five large ones, and on other cards natively.
  • Other NVIDIA cards in a title run: only an RTX 5070 Ti on 610.74 (and @⁠Royalflamejlh's RTX 4070 under vkd3d-proton). On 8 GB cards, only @⁠upipibi's suite.
  • The two failing setups from #187's review (not re-run).

AI use

  • Claude Code (Claude Opus 5.5) wrote the change, the tests and this description, and ran the tests.

🤖 Generated with Claude Code

**@⁠Kalmarv** on GitHub · 2026-11-25 18:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428) `Kalmarv:heap-windows-default` → `main` · +394 −42 · 11 files · 2 commits · open Part of #2088. Stacked on #2427; only the top commit belongs here. On NVIDIA, this PR turns #2427's flat heap windows on by default, for compute programs only. Graphics stages, mesh, GS, other vendors and the HLSL path keep the switch over root UAVs, as they do today. **What it changes for compute programs on NVIDIA**, compared with `main`'s form (#2368's select over root UAVs): - **Native code:** @⁠pvfreis measured 60 records on an RTX 3060 (comment 7177531683). The driver's compiled code (`GetCachedBlob`) was 41.11 MB with this form and 51.17 MB with root UAVs, a ratio of 0.803 (0.465–0.922 per record). NVIDIA removes the device when a title's compiled shader code reaches about 448 MB in total (#2403). I have not measured how much this moves that point for a whole title. - **DXIL:** 11–21 % smaller (median 18 %) in @⁠Royalflamejlh's runs (comment 7179985117). - **Compile time:** only measured natively on Windows, on an RTX 5070 Ti (NVIDIA 610.74), for five large compute programs. Against `main`'s form (#2368's select) this form built 22–48 % faster (geomean 7.67 vs 12.72 s, 0.603), with native code 0.877 times the size in that job. Against the switch from before #2368 it built 1.5–3.6 times as fast. Tables are in #2427. The gain is shown only for those few large programs. Under Wine and vkd3d-proton, @⁠Royalflamejlh's times did not separate from the spread between runs (see **Tested by others**). **How it decides:** - **`XCL_HEAP_WINDOWS` set:** `1` gives heap windows to every stage, as before; `0` turns them off. - **Unset:** heap windows are on when the title's adapter is NVIDIA (PCI vendor `0x10DE`), and only for the compute programs the direct translator makes (`compute_mem_windows`). - **Flat form:** on by default; `XCL_HEAP_FLAT=0` brings back the guarded form. - **Refused pipelines:** a pipeline the driver refuses with heap windows (E_OUTOFMEMORY, #156) is still built in the switch form (927adcc0's `with_switch_fallback`). Only builds that had heap windows are rebuilt that way. A graphics or mesh build without them is not built twice (@⁠bmjask's review). - **Views not made:** if the heap views cannot be made, everything takes the switch, as before. - **What else turns on:** on NVIDIA, the windows' heap views are now made at start by default, and command lists bind the shared heap when they set none, as `XCL_HEAP_WINDOWS=1` did. This applies to every list, graphics included, although graphics shaders still take the switch. **Why only compute, and not the HLSL path:** - **Measured:** the timings were all of direct-DXIL compute programs. - **Graphics:** for NVIDIA pixel shaders, #2368 measured a select-flattened form as slower. - **HLSL path:** its heap form is not measured. `XCL_HEAP_WINDOWS` was opt-in because two NVIDIA setups failed with it in #187's review: - **The failures:** the driver's compiler ended the process, and the device was removed when the views were made on an 8 GB card. - **Fixed since:** pipelines the driver refuses with E_OUTOFMEMORY now fall back to the switch form (927adcc0). A view that some D3D12 runtimes refused, removing the device, is now capped (deb4b92b). - **Not confirmed:** that those fixes cover the two failures. Neither setup was re-run. **What is in it** - `gpu/recomp/pso.rs`: - `heap_windows` with the vendor default, `set_adapter_vendor`, `heap_windows_everywhere`, `compute_mem_windows` / `compute_windows` and `hlsl_windows`. - `console_to_dxil_for` takes the compute windows for a compute program. - `XCL_HEAP_FLAT` is on by default. - Tests: the default rule per vendor and env, and the windows each form takes. - `hle/d3d12x/real.rs`: - The device's adapter vendor is noted before the UMA opens. - `with_switch_fallback` takes whether the build has heap windows: the compute windows for a compute build, the graphics windows for graphics and mesh. `driver_pso` retries E_OUTOFMEMORY in the switch form only for such a build. - Tests in `switch_fallback_tests`: an E_OUTOFMEMORY without heap windows is not retried, one with heap windows is built again once, and a driver call outside a translated build is not a heap-window build. - `shaders.rs`, `gpu/adapter.rs`: the `--precompile` / `--export-hlsl` / `--measure-pso` windows are the runtime's, per stage, for the bench's adapter. Compute programs take `pso::compute_windows`, as `compute_mem_windows` does. VS, PS and mesh programs take `pso::graphics_windows`, as `mem_windows` does. So by default on NVIDIA only the compute programs are precompiled with heap windows. Before, every stage got the compute count, so precompiled VS, PS and mesh entries missed at run time (found by @⁠pvfreis, comment 7181439405). - `gpu/uma.rs`: `XCL_UMA_WINDOWS=8|16` still needs `XCL_HEAP_WINDOWS=1`, since graphics need the heap for more than 4 windows. - `tests/gpu_compute_e2e.rs`: the switch-form fallback test checks the compute windows. **Tested** - Ryzen 9 9950X, RTX 5070 Ti (NVIDIA 610.74), Windows 11 build 26200, rustc 1.99.0, DXC 1.9.2609, debug. - `cargo test --workspace --no-fail-fast -- --test-threads=4` on this head, c6e5af86 (on #2427's c8c2b7a6 and `main` 6d12f58a): 1431 passed, 0 failed, 46 ignored. - 24 SKIPPED notices: 21 for no wave64, and 3 for wave32 per-lane forms refused by the #1426 list (`V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`). - `heap_window_out_of_memory_falls_back_to_the_switch_form` runs, because heap windows are on by default on this NVIDIA card, and passes: a refused heap-window pipeline is rebuilt in the switch form and runs correctly. - The three `switch_fallback_tests` pass, and so do #2427's `gpu_heap_flat_reads_match_the_switch_form`, `only_compute_programs_read_heap_windows_flat` and `precompile_windows_are_the_runtimes`. The last checks the precompile's windows per stage against the runtime's: with `XCL_HEAP_WINDOWS=1`, and with it unset on an NVIDIA and an AMD vendor, each in a new process. With the old single count it fails on NVIDIA's default: VS, PS and mesh got 772 where the runtime uses 4. - Offline count of precompiled VS entries a title run finds, the first 4,000 records of the title's shader pack, release: - **How:** a fresh DXIL cache; `xcl shaders --precompile --only vs` with default settings; then the same with `XCL_HEAP_WINDOWS=0`, whose VS keys are the runtime's default ones. The second run's already-cached count is what the runtime finds. - **970823e4 (before):** the second run compiled 542 again and found only the 12 that repeat within the pack. None of the 542 precompiled VS entries are found. - **c6e5af86:** the second run compiled none and found all 554. - **PS:** not counted. The first 6,000 records hold none, and a full-pack count takes close to an hour. In `precompile`, PS and mesh programs take the same count as VS. **Tested by others** - **@⁠upipibi** (comment 7172640860), thank you: RTX 3070 8 GB, NVIDIA 616.56, Windows 11, debug. - **On 970823e**, one push before this head (which changes only the precompile's VS, PS and mesh windows), as is: `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2`: 1422 passed, 0 failed, 46 ignored. The 16 heap-window tests ran, none skipped, with no device removal. 25 SKIPPED lines (no wave64 and the like). - Earlier, on ab2855f: 1417 passed, 0 failed, 46 ignored; on dbf54bf: 1350 passed, 0 failed, 46 ignored. - Lib and workspace tests only; no title run on an 8 GB card. - **@⁠futurepro62** (comment 7186946135), thank you: this head, c6e5af86, debug, Ryzen 7 9800X3D, Windows 11. - **RTX 5070 Ti, NVIDIA 621.40,** `XCL_REQUIRE_GPU=mesh`: 1419 passed, 0 failed, 44 ignored. All 8 new tests ran and passed. - **The Radeon integrated GPU (iGPU) of that CPU, RDNA2:** 1430 passed, 0 failed, 46 ignored. `heap_window_out_of_memory_falls_back_to_the_switch_form` skipped there with "no heap windows", as it should off NVIDIA. - Their `--skip` list on NVIDIA includes `heap_window_out_of_memory_falls_back_to_the_switch_form`, so that run does not cover it (@⁠thehollowedone's run below does). Its other skips are `main`'s tests, which this PR does not change. - **@⁠thehollowedone** (comment 7188274961), thank you: RTX 3080 Ti, NVIDIA 621.35, Windows 11, debug, this head c6e5af86. - `heap_window_out_of_memory_falls_back_to_the_switch_form` with `XCL_HEAP_WINDOWS` unset and `XCL_REQUIRE_GPU=mesh`: 1 passed, 0 failed, 0 ignored. It ran on the real adapter with the heap views made by default, and the injected out-of-memory gave one switch-form rebuild. - Workspace suite: 1431 passed, 0 failed, 46 ignored. - The out-of-memory is the test's injection, not a real driver one; no title run. - **@⁠pickles976** (comment 7183101099): RTX 4060 Laptop 8 GB, NVIDIA 590.48.1, Wine 11.0, on af825308. Since then only the precompile's windows changed (`shaders.rs`, and `pso::graphics_windows` with the same rule as before); the fallback path is the same. - `heap_window_out_of_memory_falls_back_to_the_switch_form` passes 1/1, and the forced out-of-memory fires on the real adapter: the pipeline is built again in the switch form. - Caveats: it ran on a relaxed vkd3d-proton diagnostic build with the identity checks compiled out, so it checks the test's assertions, not XCL's vtable patching against a stock runtime. On stock vkd3d-proton 3.2.0 the test stops at the #175 identity assertion. No title run. - **@⁠pvfreis** (comment 7177531683): RTX 3060, NVIDIA 617.14. ab2855f with #2496 on `main` e1d84b7d. - Suite: 1429 passed, 1 failed, 46 ignored. The failure, the e2e `presents` test, also fails on that `main` (1422 passed, 1 failed, 46 ignored). - Native code over 60 records: root UAVs 51.17 MB, guarded heap 42.19 MB, flat heap 41.11 MB. - Flat over root UAVs is 0.803 (0.465–0.922 per record). Flat over guarded is 0.974 (0.901–1.039), and 12 of the 60 are larger. - Repeat builds had the same sizes but different contents for 18 and 8 of the 60. - No build times. - **@⁠Royalflamejlh** (comment 7179985117): RTX 4070 12 GB, NVIDIA 615.71.09, Fedora 44, Wine 11.21 Staging, vkd3d-proton v3.1-90 with XCL's relaxed-vtable patch, release. - **Builds:** ab2855f with #684 on 6d12f58a, `XCL_DIRECT_DXIL=1`. - **Runs:** cold, 200 s, two runs with this default and two with `XCL_HEAP_WINDOWS=0`. - **What the times are:** vkd3d-proton's whole pipeline creation under Wine (dxil-spirv, then the driver), not native `Create*PipelineState` time. - **Results:** - DXIL was 11–21 % smaller (median 18 %). - The 18 programs whose DXIL changed took 73.0 s per run against 96.9 s, nearly all of it in the two largest. - Their median ratio was 0.98. Without the two largest, the heap-window runs were slower: 56.8 s against 51.7 s. - Six programs with the same DXIL either way were also faster in the heap-window runs (median ratio 0.43), so part of the difference comes from the runs, not the form. At most 2 large builds ran at once in the heap-window runs, and 3 in the others. - A fifth `=0` run lost its device at 77.9 s in vkd3d-proton and is left out. - Not this head (c6e5af86) itself. - **AMD:** this PR keeps root UAVs there by default. @⁠bielfreedom's RX 9070 XT timing of the flat form against the guarded one, with heap windows on, is in #2427 (comment 7180279957): 11 % less `CreateComputePipelineState` time over 26 large programs. **Regression run** - **Setup:** `scripts/smoke.ps1` through our run script, 120 s, release builds, `XCL_DIRECT_DXIL=1`, in one queue job: `main` b49be18, then this head. Both sides use the same data root and XCL cache, warmed by earlier runs, and start from the same learned coherent-window state. - **Beside it:** another agent's offline export job ran on the same machine through both sides; no precompile ran beside it. - **Result:** no device removal and no crash. This PR showed 140 % of `main`'s frames (2227 against 1593) and 50 % of its peak commit (14319 against 28787 MB). Its last 6 s still presented 60 frames per 2 s, where `main`'s presented none. One run each; I have not looked into why the two differ this much. `main` b49be18: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 120 exit: 0x0 frames shown: 1593 (PresentX 1593) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 28787 MB ``` This PR (c6e5af86): ``` xcl-smoke v1 commit: c6e5af8690fc6257926d5cfca9443e01e60d14dc gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 120 exit: 0x0 frames shown: 2227 (PresentX 2227) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14319 MB ``` **Not tested** - AMD and Intel (unchanged by default). Native Linux; @⁠Royalflamejlh's run is under Wine and vkd3d-proton. - Compile time for programs other than the five large ones, and on other cards natively. - Other NVIDIA cards in a title run: only an RTX 5070 Ti on 610.74 (and @⁠Royalflamejlh's RTX 4070 under vkd3d-proton). On 8 GB cards, only @⁠upipibi's suite. - The two failing setups from #187's review (not re-run). **AI use** - Claude Code (Claude Opus 5.5) wrote the change, the tests and this description, and ran the tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With heap windows (XCL_HEAP_WINDOWS=1), every read of the direct DXIL
translator was a branch on `w < windows` (and the lane guard) around the
heap lookup, and a phi per value at the join. On NVIDIA the driver's
compile time follows the block count, and the reads of a large compute
program make thousands of blocks.

XCL_HEAP_FLAT=1 (with heap windows; new flag HEAP_FLAT in the windows
count, so the caches keep the forms apart) reads in one path: the lane
loads from window `w`, or window 0 when `w` is outside the windows or
the lane is not active, and those lanes take 0, as the guarded form and
root UAVs give. All with_mem_i32s callers only load (raw, SMEM,
unaligned, format and BVH node reads). Stores and atomics keep their
branch. Compute programs only (kernel and CS entries,
kernel::reads_heap_flat): mesh, GS, vertex and pixel programs keep the
guarded form. The HLSL path ignores the flag. The one-path form is the
idea #1695 brings to the HLSL heap form.

xcl shaders (--precompile, --export-hlsl, --measure-pso) takes its
windows from pso::windows_for, as pso::mem_windows does, instead of its
own copy of the rule, which had no HEAP_FLAT: with XCL_HEAP_FLAT=1 the
precompile made the guarded form's entries, not the ones the runtime
looks up (found by bielfreedom).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
On NVIDIA, the compute programs the direct DXIL translator makes now
read their memory windows through the shared descriptor heap in the
flat form (HEAP_FLAT) by default, instead of through root UAVs. Other
stages and other GPUs are unchanged.

- pso::heap_windows: XCL_HEAP_WINDOWS=1 every stage (as before), =0 none,
  unset: on when the title's adapter is NVIDIA (set_adapter_vendor, from
  the device's DXGI adapter). XCL_HEAP_FLAT=0 turns the flat form off.
- compute_mem_windows: the windows of a compute program, with the heap
  by default; mem_windows (graphics, mesh, GS) takes the heap only with
  XCL_HEAP_WINDOWS=1. The HLSL path keeps root UAVs unless
  XCL_HEAP_WINDOWS=1 (hlsl_windows): its heap form is not measured.
- A pipeline the driver refuses with heap windows is still built with
  root UAVs (with_switch_fallback), but only when the stage it builds
  took heap windows (with_switch_fallback's `heap`): an E_OUTOFMEMORY of
  a graphics or mesh pipeline built with root UAVs is not retried.
- xcl shaders --precompile / --export-hlsl / --measure-pso: the keys of
  the runtime, from the bench's adapter: compute programs take
  pso::compute_windows (compute_mem_windows), VS, PS and mesh programs
  pso::graphics_windows (mem_windows), so by default on NVIDIA only the
  compute programs are precompiled with heap windows (found by pvfreis).
- XCL_UMA_WINDOWS=8|16 still needs XCL_HEAP_WINDOWS=1.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:30:37 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 19:46 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: 1 real failure — gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier (group-barrier assertion, lower_dxil.rs). Same failure as #2371 and the rest of this stacked series.

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-25 19:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7172739839) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: **1 real failure** — `gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` (group-barrier assertion, lower_dxil.rs). Same failure as #2371 and the rest of this stacked series. — Devin
Author
Owner

@⁠pvfreis on GitHub · 2026-11-25 23:25 UTC · original

Test report for ab2855f (includes #2427 d356a74) with #2496 78bba5c on main e1d84b7d (tree 76fc443d): outputs and driver code size.

Tested

  • RTX 3060 (617.14), Ryzen 9 5900XT, Windows 11. Sandbox: non-interactive session, Low integrity, debug, --test-threads=4, NVIDIA 32-lane waves only. One run each.
  • Suite (tree b39fd905: plus our test arms and a test-only break switch): 1429 passed, 1 failed, 46 ignored, 24 SKIPPED lines. main: 1422 / 1 / 46, 25 (heap_window_out_of_memory_falls_back_to_the_switch_form skips there). Both fail e2e presents only.
  • Outputs: flat windows with and without XCL_WINDOW_NO_CARRY, wave32 and split wave64, in #2408's two tests and a new one (offsets, window edges, out of range, null, inactive lanes, halfword, typed, s_load): all expected values met. Three arms in #2427's test, one flat, agree with its root UAV run. Three one-line breaks of the flat read are caught.
  • Expected values: our arithmetic from AMD's public RDNA2 ISA (3.3, 7.2.1, 8.1.5, 8.2.8, 9.1, 9.3, 9.4, 12.9, 12.14, 12.18.3). Out of range is XCL's contract; a no-carry access leaving its window is #2496's rule.
  • Size only: GetCachedBlob bytes, 60 compute records (30 largest, 30 sampled, chosen beforehand), unsplit, at opt-level 3 without debug assertions; plain debug gives the same DXIL and root signatures (60/60, 0 validator errors).
    • root UAV (XCL_HEAP_WINDOWS=0) 51.17 MB, guarded heap (XCL_HEAP_FLAT=0) 42.19, flat (new default) 41.11
    • flat / root UAV 0.803 (per record 0.465–0.922); flat / guarded 0.974 (0.901–1.039, 12 larger)
    • The base has #2368: the size part of the baseline point on #2427, on Ampere.
  • Failed check (byte-identical repeat): sizes equal 60/60, contents differ in 18/60 (same job) and 8/60 (new job); cause not investigated.

Not tested: what the 60 programs compute, a title, build time, split chains, GS, mesh, graphics, other GPUs.

AI use: Claude Code. Claude Opus 5.5 wrote the test, ran it and wrote this; Claude Fable 5.2 rechecked it.

**@⁠pvfreis** on GitHub · 2026-11-25 23:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7177531683) Test report for `ab2855f` (includes #2427 `d356a74`) with #2496 `78bba5c` on `main` `e1d84b7d` (tree `76fc443d`): outputs and driver code size. **Tested** - RTX 3060 (617.14), Ryzen 9 5900XT, Windows 11. Sandbox: non-interactive session, Low integrity, debug, `--test-threads=4`, NVIDIA 32-lane waves only. One run each. - Suite (tree `b39fd905`: plus our test arms and a test-only break switch): 1429 passed, 1 failed, 46 ignored, 24 SKIPPED lines. `main`: 1422 / 1 / 46, 25 (`heap_window_out_of_memory_falls_back_to_the_switch_form` skips there). Both fail e2e `presents` only. - **Outputs:** flat windows with and without `XCL_WINDOW_NO_CARRY`, wave32 and split wave64, in #2408's two tests and a new one (offsets, window edges, out of range, null, inactive lanes, halfword, typed, `s_load`): all expected values met. Three arms in #2427's test, one flat, agree with its root UAV run. Three one-line breaks of the flat read are caught. - **Expected values:** our arithmetic from AMD's public RDNA2 ISA (3.3, 7.2.1, 8.1.5, 8.2.8, 9.1, 9.3, 9.4, 12.9, 12.14, 12.18.3). Out of range is XCL's contract; a no-carry access leaving its window is #2496's rule. - **Size only:** `GetCachedBlob` bytes, 60 compute records (30 largest, 30 sampled, chosen beforehand), unsplit, at opt-level 3 without debug assertions; plain debug gives the same DXIL and root signatures (60/60, 0 validator errors). - root UAV (`XCL_HEAP_WINDOWS=0`) 51.17 MB, guarded heap (`XCL_HEAP_FLAT=0`) 42.19, flat (new default) 41.11 - flat / root UAV 0.803 (per record 0.465–0.922); flat / guarded 0.974 (0.901–1.039, 12 larger) - The base has #2368: the size part of the [baseline point on #2427](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2427), on Ampere. - Failed check (byte-identical repeat): sizes equal 60/60, contents differ in 18/60 (same job) and 8/60 (new job); cause not investigated. **Not tested:** what the 60 programs compute, a title, build time, split chains, GS, mesh, graphics, other GPUs. **AI use:** Claude Code. Claude Opus 5.5 wrote the test, ran it and wrote this; Claude Fable 5.2 rechecked it.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 00:59 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 00:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7179316760) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-26 01:38 UTC · original

Linux (Wine + vkd3d-proton) + NVIDIA, ab2855f, the title with XCL_DIRECT_DXIL=1, cold, 2 runs with heap windows by default and 2 with XCL_HEAP_WINDOWS=0: the heap form's DXIL was 11 to 21 % smaller (median 18 %), but its creation times did not separate from the spread between runs. The 18 programs whose DXIL changed took 73.0 s per run against 96.9 s, nearly all of it 8994bb33… and dd51cdee…. Six programs with the same DXIL either way were also faster in the heap-window runs, by as much as dd51cdee….

Setup: 6d12f58a (this pull request's base) + #684 e56dbc3 + #2427 d356a74 + #2428 ab2855f, one build, the two settings in turn. RTX 4070 12 GB (615.71.09), Fedora 44, Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b with XCL's relaxed-vtable patch and dxil-spirv e084e35c plus four patches, release, Series X profile, 200 s, A at 16.0 to 16.2 s, XCL_PSO_PRELOAD=0, XCL_PSO_DISK_CACHE=0, fresh NVIDIA and vkd3d-proton caches per run. Times are the driver compile finish lines: vkd3d-proton's whole creation under Wine (dxil-spirv, then the driver), not native Create*PipelineState time.

record heap windows: DXIL, two runs XCL_HEAP_WINDOWS=0: DXIL, two runs
8994bb33444988e6 404,528 B: 3.3, 10.2 s 509,440 B: 25.8, 20.2 s
dd51cdeedc76d3a7 613,648 B: 8.7, 10.3 s 726,112 B: 18.2, 26.2 s
44d832b4bdbd5ef8 282,972 B: 7.8, 7.6 s 340,044 B: 7.9, 7.8 s
a74706fb8f96ade9 386,336 B: 8.1, 8.1 s 471,356 B: 2.6, 2.9 s
the 18 whose DXIL changed, built in all four runs 73.0 s per run 96.9 s per run
the 6 with the same DXIL either way 16.8 s per run 25.7 s per run
  • Ratios are heap windows over =0. Over the 18, the median was 0.98; without the two largest, 56.8 s against 51.7 s. The 6 unchanged had a median of 0.43.
  • Per pair, over programs whose DXIL changed, the median was 1.04 (26 programs, 13 faster) and 0.62 (23, 17 faster).
  • At most 2 big builds ran at once in the heap-window runs, 3 in the others.
  • A fifth =0 run lost its device at 77.9 s (0x887a0005, vkd3d-proton Failed to wait for Vulkan timeline semaphore, vr -4, no NVIDIA kernel message); it is left out.
  • The head is now af82530. Read: its changes limit flat reads to compute entries and retry E_OUTOFMEMORY only for heap-window builds; neither touches these programs, and no run logged an E_OUTOFMEMORY.

Not tested: af82530 itself; the default path's direct programs (not reached in 200 s without XCL_DIRECT_DXIL=1); graphics; the suite; Windows.

AI use: Claude Code (Claude Opus 5.5) ran the title and wrote this comment.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-26 01:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7179985117) Linux (Wine + vkd3d-proton) + NVIDIA, `ab2855f`, the title with `XCL_DIRECT_DXIL=1`, cold, 2 runs with heap windows by default and 2 with `XCL_HEAP_WINDOWS=0`: the heap form's DXIL was 11 to 21 % smaller (median 18 %), but its creation times did not separate from the spread between runs. The 18 programs whose DXIL changed took 73.0 s per run against 96.9 s, nearly all of it `8994bb33…` and `dd51cdee…`. Six programs with the same DXIL either way were also faster in the heap-window runs, by as much as `dd51cdee…`. **Setup:** `6d12f58a` (this pull request's base) + #684 `e56dbc3` + #2427 `d356a74` + #2428 `ab2855f`, one build, the two settings in turn. RTX 4070 12 GB (615.71.09), Fedora 44, Wine 11.21 Staging, vkd3d-proton `v3.1-90-g30b0eb9b` with XCL's relaxed-vtable patch and dxil-spirv `e084e35c` plus four patches, release, Series X profile, 200 s, A at 16.0 to 16.2 s, `XCL_PSO_PRELOAD=0`, `XCL_PSO_DISK_CACHE=0`, fresh NVIDIA and vkd3d-proton caches per run. Times are the `driver compile finish` lines: vkd3d-proton's whole creation under Wine (dxil-spirv, then the driver), not native `Create*PipelineState` time. | record | heap windows: DXIL, two runs | `XCL_HEAP_WINDOWS=0`: DXIL, two runs | |---|---|---| | `8994bb33444988e6` | 404,528 B: 3.3, 10.2 s | 509,440 B: 25.8, 20.2 s | | `dd51cdeedc76d3a7` | 613,648 B: 8.7, 10.3 s | 726,112 B: 18.2, 26.2 s | | `44d832b4bdbd5ef8` | 282,972 B: 7.8, 7.6 s | 340,044 B: 7.9, 7.8 s | | `a74706fb8f96ade9` | 386,336 B: 8.1, 8.1 s | 471,356 B: 2.6, 2.9 s | | the 18 whose DXIL changed, built in all four runs | 73.0 s per run | 96.9 s per run | | the 6 with the same DXIL either way | 16.8 s per run | 25.7 s per run | - Ratios are heap windows over `=0`. Over the 18, the median was 0.98; without the two largest, 56.8 s against 51.7 s. The 6 unchanged had a median of 0.43. - Per pair, over programs whose DXIL changed, the median was 1.04 (26 programs, 13 faster) and 0.62 (23, 17 faster). - At most 2 big builds ran at once in the heap-window runs, 3 in the others. - A fifth `=0` run lost its device at 77.9 s (`0x887a0005`, vkd3d-proton `Failed to wait for Vulkan timeline semaphore, vr -4`, no NVIDIA kernel message); it is left out. - The head is now `af82530`. Read: its changes limit flat reads to compute entries and retry E_OUTOFMEMORY only for heap-window builds; neither touches these programs, and no run logged an E_OUTOFMEMORY. **Not tested:** `af82530` itself; the default path's direct programs (not reached in 200 s without `XCL_DIRECT_DXIL=1`); graphics; the suite; Windows. **AI use:** Claude Code (Claude Opus 5.5) ran the title and wrote this comment. Posted without review by a person: the account owner was away and reads replies later.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-26 01:50 UTC · original

@⁠Royalflamejlh thank you for the runs and the careful write-up.

Under Wine and vkd3d-proton, the compile-time gain doesn't separate from the spread between runs except in the two largest programs, and the six programs with unchanged DXIL show how large that spread is. I've scoped the description's compile-time claim to what it was measured on: native Windows, an RTX 5070 Ti on 610.74, and five large compute programs, timed against the switch from before #2368. Those five are all the native compile-time evidence there is, so the description now says the gain is shown only for a few large programs, and not natively against #2368's form. Your result is under Tested by others, with your caveat that the times are vkd3d-proton's whole creation path rather than native Create*PipelineState. The 11–21 % DXIL reduction is cited there as well.

AI use: Claude Code (Claude Opus 5.5) wrote this reply.

**@⁠Kalmarv** on GitHub · 2026-11-26 01:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7180184376) @⁠Royalflamejlh thank you for the runs and the careful write-up. Under Wine and vkd3d-proton, the compile-time gain doesn't separate from the spread between runs except in the two largest programs, and the six programs with unchanged DXIL show how large that spread is. I've scoped the description's compile-time claim to what it was measured on: native Windows, an RTX 5070 Ti on 610.74, and five large compute programs, timed against the switch from before #2368. Those five are all the native compile-time evidence there is, so the description now says the gain is shown only for a few large programs, and not natively against #2368's form. Your result is under **Tested by others**, with your caveat that the times are vkd3d-proton's whole creation path rather than native `Create*PipelineState`. The 11–21 % DXIL reduction is cited there as well. AI use: Claude Code (Claude Opus 5.5) wrote this reply.
Author
Owner

@⁠pvfreis on GitHub · 2026-11-26 03:08 UTC · original

By reading only, not run, at 970823e4: on NVIDIA with default settings, xcl shaders --precompile makes VS, PS and mesh compute-pass entries that the runtime never looks up.

  • precompile gets one window count for every stage: shaders.rs:978 takes it from runtime_windows, which is pso::compute_windows(n) (shaders.rs:996). On NVIDIA that is n | HEAP_WINDOWS | HEAP_FLAT (pso.rs:92, :146).
  • VS, PS and mesh programs are translated with it (shaders.rs:1695), so translate emits the heap form (recomp/mod.rs:1506), and compile_cached keys on that HLSL (dxc.rs:575).
  • At run time those stages take mem_windows() (pso.rs:204 for VS/PS, pso.rs:1229 for mesh), which has heap windows only with XCL_HEAP_WINDOWS=1 (pso.rs:79, :151). Their HLSL is the root-UAV form, so each of those precompiled entries is a cache miss and the title compiles them cold. Nothing wrong is loaded. On main and on #2427 alone the two counts are the same.
  • Compute is fine, and so is the mesh pass-through. --only cs, --windows 1, XCL_HEAP_WINDOWS=0 or =1 and other vendors are not affected. precompile_windows_are_the_runtimes runs with XCL_HEAP_WINDOWS=1, so it does not see this.

A fix could give precompile both counts: compute_windows(n) for compute containers and the rule mem_windows uses for the rest, with the test also run with XCL_HEAP_WINDOWS unset and an NVIDIA vendor. #2613 and #2246 pass the same single count on to VS/PS and to the mesh pass, so they do not change this.

AI use: Claude Code (Claude Opus 5.5) found this; Claude Fable 5.2 rechecked it; checked by a person before posting.

**@⁠pvfreis** on GitHub · 2026-11-26 03:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7181439405) By reading only, not run, at `970823e4`: on NVIDIA with default settings, `xcl shaders --precompile` makes VS, PS and mesh compute-pass entries that the runtime never looks up. - `precompile` gets one window count for every stage: `shaders.rs:978` takes it from `runtime_windows`, which is `pso::compute_windows(n)` (`shaders.rs:996`). On NVIDIA that is `n | HEAP_WINDOWS | HEAP_FLAT` (`pso.rs:92`, `:146`). - VS, PS and mesh programs are translated with it (`shaders.rs:1695`), so `translate` emits the heap form (`recomp/mod.rs:1506`), and `compile_cached` keys on that HLSL (`dxc.rs:575`). - At run time those stages take `mem_windows()` (`pso.rs:204` for VS/PS, `pso.rs:1229` for mesh), which has heap windows only with `XCL_HEAP_WINDOWS=1` (`pso.rs:79`, `:151`). Their HLSL is the root-UAV form, so each of those precompiled entries is a cache miss and the title compiles them cold. Nothing wrong is loaded. On `main` and on #2427 alone the two counts are the same. - Compute is fine, and so is the mesh pass-through. `--only cs`, `--windows 1`, `XCL_HEAP_WINDOWS=0` or `=1` and other vendors are not affected. `precompile_windows_are_the_runtimes` runs with `XCL_HEAP_WINDOWS=1`, so it does not see this. A fix could give `precompile` both counts: `compute_windows(n)` for compute containers and the rule `mem_windows` uses for the rest, with the test also run with `XCL_HEAP_WINDOWS` unset and an NVIDIA vendor. #2613 and #2246 pass the same single count on to VS/PS and to the mesh pass, so they do not change this. **AI use:** Claude Code (Claude Opus 5.5) found this; Claude Fable 5.2 rechecked it; checked by a person before posting.
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 19:41 UTC · original · edited 2026-11-26 03:56 UTC

Update, head c6e5af8 (pushed 03:30Z), same 8 GB RTX 3070, driver 616.56, Windows 11, debug, head as is: cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2: 1422 passed, 0 failed, 46 ignored. The 16 heap-window tests ran (none skipped); no device removal; 25 SKIPPED lines (no wave64 etc.). The same counts as on 970823e. Lib and workspace tests only; still no title run on an 8 GB card.


NVIDIA test report for dbf54bf on an 8 GB card, which Not tested lists. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, head as is (base 3f27770), after cargo build --workspace:

  • cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2 --skip gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier: 1350 passed, 0 failed, 46 ignored. No device removal and no compiler exit in the run, and the end-to-end title tests pass.
  • With this head the heap-window tests run rather than skip on this card: the no heap windows SKIPPED line that main shows here is gone, and heap_window_out_of_memory_falls_back_to_the_switch_form, heap_windows_by_default_on_nvidia_only, default_heap_windows_are_flat_and_for_the_direct_form_only, gpu_raw_window_view_reaches_its_top and gpu_heap_windows_reject_out_of_uma_aliasing pass.
  • Skipped a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier: this head's base has that test but not its fix (#2420), so it fails there on main too. Skipped hle::xaudio2, because its tests fail or hang on this machine on main too. The PR touches neither.
  • SKIPPED lines: 25: 21 no wave64, 3 f16/f32 forms the per-lane path refuses, 1 PSO measurement that needs Developer Mode.
  • Not tested: a title, and #187's two failing setups.

Added 21:32Z: re-run at the current head ab2855f (as is, base 6d12f58), same RTX 3070 8 GB, same command but without the bridged-test skip (the base now has #2420's fix): 1417 passed, 0 failed, 46 ignored. No device removal, and the end-to-end title tests pass. The heap-window tests run rather than skip (12 pass, including heap_windows_by_default_on_nvidia_only and heap_window_out_of_memory_falls_back_to_the_switch_form), and no no heap windows SKIPPED line appears. SKIPPED lines: 25 (21 no wave64, 3 f16/f32 per-lane refusals, 1 PSO measurement that needs Developer Mode).

AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.

**@⁠upipibi** on GitHub · 2026-11-25 19:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7172640860) · edited 2026-11-26 03:56 UTC **Update, head `c6e5af8` (pushed 03:30Z), same 8 GB RTX 3070, driver 616.56, Windows 11, debug, head as is:** `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2`: **1422 passed, 0 failed**, 46 ignored. The 16 heap-window tests ran (none skipped); no device removal; 25 `SKIPPED` lines (no wave64 etc.). The same counts as on `970823e`. Lib and workspace tests only; still no title run on an 8 GB card. --- NVIDIA test report for `dbf54bf` on an 8 GB card, which **Not tested** lists. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, head as is (base `3f27770`), after `cargo build --workspace`: - `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2 --skip gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier`: **1350 passed, 0 failed, 46 ignored**. No device removal and no compiler exit in the run, and the end-to-end title tests pass. - With this head the heap-window tests run rather than skip on this card: the `no heap windows` SKIPPED line that `main` shows here is gone, and `heap_window_out_of_memory_falls_back_to_the_switch_form`, `heap_windows_by_default_on_nvidia_only`, `default_heap_windows_are_flat_and_for_the_direct_form_only`, `gpu_raw_window_view_reaches_its_top` and `gpu_heap_windows_reject_out_of_uma_aliasing` pass. - Skipped `a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier`: this head's base has that test but not its fix (#2420), so it fails there on `main` too. Skipped `hle::xaudio2`, because its tests fail or hang on this machine on `main` too. The PR touches neither. - SKIPPED lines: 25: 21 `no wave64`, 3 f16/f32 forms the per-lane path refuses, 1 PSO measurement that needs Developer Mode. - Not tested: a title, and #187's two failing setups. --- **Added 21:32Z: re-run at the current head `ab2855f`** (as is, base `6d12f58`), same RTX 3070 8 GB, same command but without the bridged-test skip (the base now has #2420's fix): **1417 passed, 0 failed, 46 ignored**. No device removal, and the end-to-end title tests pass. The heap-window tests run rather than skip (12 pass, including `heap_windows_by_default_on_nvidia_only` and `heap_window_out_of_memory_falls_back_to_the_switch_form`), and no `no heap windows` SKIPPED line appears. SKIPPED lines: 25 (21 `no wave64`, 3 f16/f32 per-lane refusals, 1 PSO measurement that needs Developer Mode). AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-26 01:55 UTC · original · edited 2026-11-26 04:14 UTC

@⁠bmjask thank you, the P2 was right.

Fallback scope. driver_pso took "heap windows" from compute_mem_windows() for every pipeline. With NVIDIA's default, compute is heap-windowed and graphics stays in the switch form. So a graphics E_OUTOFMEMORY was taken for a heap-window refusal, and with_switch_fallback built the same graphics pipeline again. Fixed, now in c6e5af86:

  • with_switch_fallback(heap, build) now takes whether the stage being built took heap windows: compute_mem_windows() for compute, mem_windows() for graphics and mesh (heap only with XCL_HEAP_WINDOWS=1).

  • driver_pso notes E_OUTOFMEMORY only while that is set, and only for the first attempt. A driver call outside a translated build never counts.

  • Tests, real.rs switch_fallback_tests:

    • an_out_of_memory_without_heap_windows_is_not_retried: one attempt, E_OUTOFMEMORY returned;
    • an_out_of_memory_with_heap_windows_is_built_again_once: two attempts, nothing left noted;
    • a_driver_call_outside_a_translated_build_is_not_a_heap_window_build.

    The end-to-end heap_window_out_of_memory_falls_back_to_the_switch_form still runs and passes on this head. Suite on c6e5af86 (on #2427 and main 6d12f58a): 1431 passed, 0 failed, 46 ignored.

Regression pair (in the body), on c6e5af86 against main b49be18, 120 s, XCL_DIRECT_DXIL=1: no removal or crash, 140 % of main's frames (2227 against 1593) and 50 % of its peak commit.

Earlier NVIDIA failures and 8 GB.

  • 8 GB: @⁠upipibi ran the suite on an RTX 3070 8 GB (comment 7172640860): 1417 passed, 0 failed, 46 ignored at ab2855f, with the heap-window tests running and no device removal. They have since rerun it on 970823e, after the fallback fix: 1422 passed, 0 failed, 46 ignored, with all 16 heap-window tests running. There is no title run on an 8 GB card.
  • #187's two failing setups: I can't rerun them; I don't have those machines. Since then, pipelines the driver refuses with E_OUTOFMEMORY fall back to the switch form (927adcc0, scoped above), and the view that removed the device on some runtimes is capped (deb4b92b). This card shows no removals. Whether that covers both failures is not confirmed, and the body says so.

AI use: Claude Code (Claude Opus 5.5) made the fix and the tests and wrote this reply.

**@⁠Kalmarv** on GitHub · 2026-11-26 01:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7180287306) · edited 2026-11-26 04:14 UTC @⁠bmjask thank you, the P2 was right. **Fallback scope.** `driver_pso` took "heap windows" from `compute_mem_windows()` for every pipeline. With NVIDIA's default, compute is heap-windowed and graphics stays in the switch form. So a graphics E_OUTOFMEMORY was taken for a heap-window refusal, and `with_switch_fallback` built the same graphics pipeline again. Fixed, now in c6e5af86: - `with_switch_fallback(heap, build)` now takes whether the stage being built took heap windows: `compute_mem_windows()` for compute, `mem_windows()` for graphics and mesh (heap only with `XCL_HEAP_WINDOWS=1`). - `driver_pso` notes E_OUTOFMEMORY only while that is set, and only for the first attempt. A driver call outside a translated build never counts. - Tests, `real.rs` `switch_fallback_tests`: - `an_out_of_memory_without_heap_windows_is_not_retried`: one attempt, E_OUTOFMEMORY returned; - `an_out_of_memory_with_heap_windows_is_built_again_once`: two attempts, nothing left noted; - `a_driver_call_outside_a_translated_build_is_not_a_heap_window_build`. The end-to-end `heap_window_out_of_memory_falls_back_to_the_switch_form` still runs and passes on this head. Suite on c6e5af86 (on #2427 and `main` 6d12f58a): 1431 passed, 0 failed, 46 ignored. **Regression pair** (in the body), on c6e5af86 against `main` b49be18, 120 s, `XCL_DIRECT_DXIL=1`: no removal or crash, 140 % of `main`'s frames (2227 against 1593) and 50 % of its peak commit. **Earlier NVIDIA failures and 8 GB.** - **8 GB:** @⁠upipibi ran the suite on an RTX 3070 8 GB (comment 7172640860): 1417 passed, 0 failed, 46 ignored at ab2855f, with the heap-window tests running and no device removal. They have since rerun it on 970823e, after the fallback fix: 1422 passed, 0 failed, 46 ignored, with all 16 heap-window tests running. There is no title run on an 8 GB card. - **#187's two failing setups:** I can't rerun them; I don't have those machines. Since then, pipelines the driver refuses with E_OUTOFMEMORY fall back to the switch form (927adcc0, scoped above), and the view that removed the device on some runtimes is capped (deb4b92b). This card shows no removals. Whether that covers both failures is not confirmed, and the body says so. AI use: Claude Code (Claude Opus 5.5) made the fix and the tests and wrote this reply.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-26 04:23 UTC · original

@⁠pvfreis thank you, that was right, and it would have cost exactly what this PR is for: VS, PS and mesh programs compiling in play after a precompile.

Checked against the code at 970823e4: precompile translated every stage with pso::compute_windows(n), which on NVIDIA by default is n | HEAP_WINDOWS | HEAP_FLAT. VS, PS and mesh programs take pso::mem_windows() at run time, which has heap windows only with XCL_HEAP_WINDOWS=1.

Fixed in c6e5af86, as you suggested:

  • runtime_windows in shaders.rs gives two counts. Compute programs take pso::compute_windows, as compute_mem_windows does. VS, PS and mesh programs take the new pso::graphics_windows, which mem_windows now uses too.
  • precompile_windows_are_the_runtimes now also runs with XCL_HEAP_WINDOWS unset on an NVIDIA and an AMD vendor, each in a new process. With the old single count it fails on the NVIDIA case: VS, PS and mesh got 772 where the runtime uses 4.
  • Suite on c6e5af86: 1431 passed, 0 failed, 46 ignored.

Offline count, the first 4,000 records of the title's shader pack, release: a fresh DXIL cache, xcl shaders --precompile --only vs with default settings, then the same with XCL_HEAP_WINDOWS=0, whose VS keys are the runtime's default ones.

  • 970823e4: the second run compiled all 542 again, so none of the precompiled VS entries would have been found in play. The 12 it found are programs that repeat within the pack.
  • c6e5af86: the second run compiled none and found all 554.

I did not count PS. The first 6,000 records hold none, and a full-pack count takes close to an hour. PS and mesh take the same count as VS in precompile.

AI use: Claude Code (Claude Opus 5.5) made the fix, the test and the count and wrote this reply.

**@⁠Kalmarv** on GitHub · 2026-11-26 04:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7182556829) @⁠pvfreis thank you, that was right, and it would have cost exactly what this PR is for: VS, PS and mesh programs compiling in play after a precompile. **Checked against the code at 970823e4:** `precompile` translated every stage with `pso::compute_windows(n)`, which on NVIDIA by default is `n | HEAP_WINDOWS | HEAP_FLAT`. VS, PS and mesh programs take `pso::mem_windows()` at run time, which has heap windows only with `XCL_HEAP_WINDOWS=1`. **Fixed in c6e5af86, as you suggested:** - `runtime_windows` in `shaders.rs` gives two counts. Compute programs take `pso::compute_windows`, as `compute_mem_windows` does. VS, PS and mesh programs take the new `pso::graphics_windows`, which `mem_windows` now uses too. - `precompile_windows_are_the_runtimes` now also runs with `XCL_HEAP_WINDOWS` unset on an NVIDIA and an AMD vendor, each in a new process. With the old single count it fails on the NVIDIA case: VS, PS and mesh got 772 where the runtime uses 4. - Suite on c6e5af86: 1431 passed, 0 failed, 46 ignored. **Offline count, the first 4,000 records of the title's shader pack, release:** a fresh DXIL cache, `xcl shaders --precompile --only vs` with default settings, then the same with `XCL_HEAP_WINDOWS=0`, whose VS keys are the runtime's default ones. - **970823e4:** the second run compiled all 542 again, so none of the precompiled VS entries would have been found in play. The 12 it found are programs that repeat within the pack. - **c6e5af86:** the second run compiled none and found all 554. I did not count PS. The first 6,000 records hold none, and a full-pack count takes close to an hour. PS and mesh take the same count as VS in `precompile`. AI use: Claude Code (Claude Opus 5.5) made the fix, the test and the count and wrote this reply.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-26 05:00 UTC · original

The GPU leg now runs and passes on a relaxed diagnostic stack — and the fallback genuinely fires. Head af825308 (policy tests previously verified 2/2 under Wine on this host), RTX 4060 Laptop GPU 8 GiB, Wine 11.0, NVIDIA 590.48.1, --locked --target x86_64-pc-windows-msvc, one test thread, fresh Compiling xcl .../xcl-pr2428/... provenance.

On stock vkd3d-proton 3.2.0 this integration test aborted before its body: Assertion failed: iface->lpVtbl == &d3d12_root_signature_vtbl (vkd3d_private.h:2111) after ID3D12RootSignature – 8 PC methods, 33 internal slots under the guard — the #175 identity wall, which is why the earlier report here carried only the policy-test result.

On the relaxed diagnostic build of the same provenance commit our stock DLL reports (2576c0b4adfae4a, -Db_ndebug=true + the two #175 from_iface relaxations, local-only): heap_window_out_of_memory_falls_back_to_the_switch_form passes 1/1 (0.91 s). Not a skip: the log shows the forced OOM hitting on the real adapter — the driver ran out of memory on a pipeline with heap windows – building it in the switch form (1 so far) — followed by a translated console CS PSO build and full Queue/Fence/Resource/Allocator/List adoption through the guards. The #1651 concern about this test's opt-in GPU skip did not apply here; the fallback path executed.

Scope: relaxed stack = identity checks compiled out, so this verifies the fixture's assertions, not XCL's vtable patching against a stock runtime; no title run. Log: .compat-xcl/logs/verify-pr2428-wine-heap-oom-relaxed.log (local). AI-assisted verification and report (OpenAI Codex).

**@⁠pickles976** on GitHub · 2026-11-26 05:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7183101099) **The GPU leg now runs and passes on a relaxed diagnostic stack — and the fallback genuinely fires.** Head `af825308` (policy tests previously verified 2/2 under Wine on this host), RTX 4060 Laptop GPU 8 GiB, Wine 11.0, NVIDIA 590.48.1, `--locked --target x86_64-pc-windows-msvc`, one test thread, fresh `Compiling xcl .../xcl-pr2428/...` provenance. On **stock** vkd3d-proton 3.2.0 this integration test aborted before its body: `Assertion failed: iface->lpVtbl == &d3d12_root_signature_vtbl (vkd3d_private.h:2111)` after `ID3D12RootSignature – 8 PC methods, 33 internal slots under the guard` — the #175 identity wall, which is why the earlier report here carried only the policy-test result. On the **relaxed diagnostic build** of the same provenance commit our stock DLL reports (`2576c0b4adfae4a`, `-Db_ndebug=true` + the two #175 `from_iface` relaxations, local-only): `heap_window_out_of_memory_falls_back_to_the_switch_form` **passes 1/1** (0.91 s). Not a skip: the log shows the forced OOM hitting on the real adapter — `the driver ran out of memory on a pipeline with heap windows – building it in the switch form (1 so far)` — followed by a translated console CS PSO build and full Queue/Fence/Resource/Allocator/List adoption through the guards. The #1651 concern about this test's opt-in GPU skip did not apply here; the fallback path executed. Scope: relaxed stack = identity checks compiled out, so this verifies the fixture's assertions, not XCL's vtable patching against a stock runtime; no title run. Log: `.compat-xcl/logs/verify-pr2428-wine-heap-oom-relaxed.log` (local). AI-assisted verification and report (OpenAI Codex).
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-26 05:06 UTC · original

@⁠pickles976 thank you, especially for showing that the fallback really fired on the adapter and wasn't skipped. Your run is under Tested by others in the description, with your caveats: the relaxed diagnostic build with the identity checks compiled out, and no title run. It was on af825308. The head is now c6e5af86, which changes only the precompile's windows, not the fallback path.

AI use: Claude Code (Claude Opus 5.5) wrote this reply.

**@⁠Kalmarv** on GitHub · 2026-11-26 05:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7183184026) @⁠pickles976 thank you, especially for showing that the fallback really fired on the adapter and wasn't skipped. Your run is under **Tested by others** in the description, with your caveats: the relaxed diagnostic build with the identity checks compiled out, and no title run. It was on af825308. The head is now c6e5af86, which changes only the precompile's windows, not the fallback path. AI use: Claude Code (Claude Opus 5.5) wrote this reply.
Author
Owner

@⁠bmjask on GitHub · 2026-11-25 21:03 UTC · original · reviewed

P2: driver_pso uses compute_mem_windows() for every PSO. On NVIDIA defaults compute is heap-windowed but graphics remains switch-form; nevertheless translated_graphics_pso runs under with_switch_fallback, so any unrelated graphics E_OUTOFMEMORY is misclassified as heap-window failure and retries the identical graphics pipeline. Restrict heap-OOM fallback to the actual translated stage/form and add graphics-E_OOM/no-retry coverage. This draft also lacks regression pair, reruns of prior NVIDIA failure scenarios, and 8 GB-card validation.

**@⁠bmjask** on GitHub · 2026-11-25 21:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#pullrequestreview-6064948599) · **reviewed** P2: driver_pso uses compute_mem_windows() for every PSO. On NVIDIA defaults compute is heap-windowed but graphics remains switch-form; nevertheless translated_graphics_pso runs under with_switch_fallback, so any unrelated graphics E_OUTOFMEMORY is misclassified as heap-window failure and retries the identical graphics pipeline. Restrict heap-OOM fallback to the actual translated stage/form and add graphics-E_OOM/no-retry coverage. This draft also lacks regression pair, reruns of prior NVIDIA failure scenarios, and 8 GB-card validation.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-26 08:43 UTC · original

NVIDIA and AMD full-suite run, to go with the reports above by pickles976, upipibi, since none of them covers AMD. Tested exact head c6e5af86 (on its base 6d12f58).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1419 passed, 0 failed, 44 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, dispatch_chain_native_wave64_builds_whole, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: only_compute_programs_read_heap_windows_flat, heap_windows_by_default_on_nvidia_only, default_heap_windows_are_flat_and_for_the_direct_form_only, gpu_heap_flat_reads_match_the_switch_form, an_out_of_memory_without_heap_windows_is_not_retried, an_out_of_memory_with_heap_windows_is_built_again_once, a_driver_call_outside_a_translated_build_is_not_a_heap_window_build, precompile_windows_are_the_runtimes.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1430 passed, 0 failed, 46 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main b49be183 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-26 08:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7186946135) NVIDIA and AMD full-suite run, to go with the reports above by pickles976, upipibi, since none of them covers AMD. Tested exact head `c6e5af86` (on its base `6d12f58`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **1419 passed, 0 failed, 44 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `dispatch_chain_native_wave64_builds_whole`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `only_compute_programs_read_heap_windows_flat`, `heap_windows_by_default_on_nvidia_only`, `default_heap_windows_are_flat_and_for_the_direct_form_only`, `gpu_heap_flat_reads_match_the_switch_form`, `an_out_of_memory_without_heap_windows_is_not_retried`, `an_out_of_memory_with_heap_windows_is_built_again_once`, `a_driver_call_outside_a_translated_build_is_not_a_heap_window_build`, `precompile_windows_are_the_runtimes`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **1430 passed, 0 failed, 46 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `b49be183` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://git.gtahub.st/github/xcl-dev--xcl/issues/1651)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-26 08:46 UTC · original

@⁠futurepro62 thank you for the full suite on c6e5af86, and on the Radeon iGPU too. Both runs are now under Tested by others in the description.

One test in your NVIDIA --skip list is one this PR changes: heap_window_out_of_memory_falls_back_to_the_switch_form. On main it skips on NVIDIA, because heap windows are opt-in there, and XCL_REQUIRE_GPU=mesh turns that skip into the #1651 failure. On this head, heap windows are on by default on NVIDIA, so the test does not skip: it forces an out-of-memory and checks the switch-form rebuild. On my RTX 5070 Ti (610.74) it ran and passed in the suite on c6e5af86 (1431 passed, 0 failed, 46 ignored, no --skip). If you have a minute, cargo test -p xcl --test gpu_compute_e2e heap_window_out_of_memory_falls_back_to_the_switch_form on 621.40 would cover it on your driver. On the iGPU it skipped with "no heap windows", which is the intended default off NVIDIA.

The rest of the list are main's tests, which this PR does not touch.

AI use: Claude Code (Claude Opus 5.5) drafted this reply from your comment and my suite log.

**@⁠Kalmarv** on GitHub · 2026-11-26 08:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7187004561) @⁠futurepro62 thank you for the full suite on c6e5af86, and on the Radeon iGPU too. Both runs are now under **Tested by others** in the description. One test in your NVIDIA `--skip` list is one this PR changes: `heap_window_out_of_memory_falls_back_to_the_switch_form`. On `main` it skips on NVIDIA, because heap windows are opt-in there, and `XCL_REQUIRE_GPU=mesh` turns that skip into the #1651 failure. On this head, heap windows are on by default on NVIDIA, so the test does not skip: it forces an out-of-memory and checks the switch-form rebuild. On my RTX 5070 Ti (610.74) it ran and passed in the suite on c6e5af86 (1431 passed, 0 failed, 46 ignored, no `--skip`). If you have a minute, `cargo test -p xcl --test gpu_compute_e2e heap_window_out_of_memory_falls_back_to_the_switch_form` on 621.40 would cover it on your driver. On the iGPU it skipped with "no heap windows", which is the intended default off NVIDIA. The rest of the list are `main`'s tests, which this PR does not touch. **AI use:** Claude Code (Claude Opus 5.5) drafted this reply from your comment and my suite log.
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-26 09:38 UTC · original

Independent RTX 3080 Ti check of PR head c6e5af86, following the request to cover the fallback test. NVIDIA driver 621.35, Ryzen 7 9800X3D, Windows 11 build 26300, rustc 1.99.1 MSVC, DXC/DXIL 1.8.2502.11; debug build.

With XCL_HEAP_WINDOWS unset and XCL_REQUIRE_GPU=mesh:
cargo test --offline --locked -p xcl --test gpu_compute_e2e heap_window_out_of_memory_falls_back_to_the_switch_form -- --nocapture --test-threads=1 passed 1/0/0. It ran on the real RTX adapter, made the shared heap views by default, logged the injected heap-window out-of-memory condition and one switch-form rebuild, then completed the compute fixture. No skip or device removal occurred.

With XCL_HEAP_WINDOWS and XCL_REQUIRE_GPU unset:

  • cargo build --offline --locked --workspace: passed.
  • cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --quiet: 1,431 passed, 0 failed, 46 ignored across 37 test executables; 24 GPU SKIPPED notices (mainly unsupported wave64). Skips are not GPU coverage.

An initial suite invocation before the workspace build failed three e2e tests because the test title binaries were missing. The documented build step and full rerun above passed.

Not tested: a retail title or paired smoke run, an actual driver out-of-memory event rather than the test injection, other GPU vendors, or release performance. This confirms the fallback fixture on Ampere driver 621.35; it does not establish the whole-title code-size or compile-time gain.

AI use: Codex (GPT-6.2 Sol) checked out the exact head, ran the tests, checked the log for the real GPU and actual fallback, and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-26 09:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7188274961) Independent RTX 3080 Ti check of [PR head `c6e5af86`](https://github.com/xcl-dev/xcl/commit/c6e5af8690fc6257926d5cfca9443e01e60d14dc), following [the request to cover the fallback test](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2428). NVIDIA driver 621.35, Ryzen 7 9800X3D, Windows 11 build 26300, rustc 1.99.1 MSVC, DXC/DXIL 1.8.2502.11; debug build. With `XCL_HEAP_WINDOWS` unset and `XCL_REQUIRE_GPU=mesh`: `cargo test --offline --locked -p xcl --test gpu_compute_e2e heap_window_out_of_memory_falls_back_to_the_switch_form -- --nocapture --test-threads=1` **passed 1/0/0**. It ran on the real RTX adapter, made the shared heap views by default, logged the injected heap-window out-of-memory condition and one switch-form rebuild, then completed the compute fixture. No skip or device removal occurred. With `XCL_HEAP_WINDOWS` and `XCL_REQUIRE_GPU` unset: - `cargo build --offline --locked --workspace`: passed. - `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --quiet`: **1,431 passed, 0 failed, 46 ignored** across 37 test executables; 24 GPU `SKIPPED` notices (mainly unsupported wave64). Skips are not GPU coverage. An initial suite invocation before the workspace build failed three e2e tests because the test title binaries were missing. The documented build step and full rerun above passed. Not tested: a retail title or paired smoke run, an actual driver out-of-memory event rather than the test injection, other GPU vendors, or release performance. This confirms the fallback fixture on Ampere driver 621.35; it does not establish the whole-title code-size or compile-time gain. AI use: Codex (GPT-6.2 Sol) checked out the exact head, ran the tests, checked the log for the real GPU and actual fallback, and drafted this report.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-26 09:43 UTC · original

@⁠thehollowedone thank you. Your run covers the fallback test that the earlier run left out: heap_window_out_of_memory_falls_back_to_the_switch_form ran on a real RTX 3080 Ti (621.35) with heap windows on by default, and the injected out-of-memory gave one switch-form rebuild. Your 1431/0/46 workspace run is also under Tested by others in the description, with your caveat that the out-of-memory was the test's injection, not a real driver event.

AI use: Claude Code (Claude Opus 5.5) drafted this reply from your comment.

**@⁠Kalmarv** on GitHub · 2026-11-26 09:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/2428#issuecomment-7188389141) @⁠thehollowedone thank you. Your run covers the fallback test that the earlier run left out: `heap_window_out_of_memory_falls_back_to_the_switch_form` ran on a real RTX 3080 Ti (621.35) with heap windows on by default, and the injected out-of-memory gave one switch-form rebuild. Your 1431/0/46 workspace run is also under **Tested by others** in the description, with your caveat that the out-of-memory was the test's injection, not a real driver event. **AI use:** Claude Code (Claude Opus 5.5) drafted this reply from your comment.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2428/head:github-bot/gh-2428'
git switch 'github-bot/gh-2428'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2428'
git switch 'github-bot/gh-2428'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2428'
git switch 'github-bot/gh-2428'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2428'
git switch 'main'
git merge --squash 'github-bot/gh-2428'
git switch 'main'
git merge --ff-only 'github-bot/gh-2428'
git switch 'main'
git merge 'github-bot/gh-2428'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.