Recompiler: vectorize multi-dword loads/stores and merge window switches #1429

Closed
coolpersonnn wants to merge 1 commit from upstream-pr/1439 into main
coolpersonnn commented 2026-11-24 15:58:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by coolpersonnn on 2026-11-24T15:58:28Z.


Vectorize multi-dword memory loads/stores (Load{2,3,4}, Store{2,3,4}) and merge multi-chunk memory window dispatches into shared helpers so DXC and GPU shader compilers optimize fewer scalar memory operations and window branches. Part of #1269.

What is in it

  • Replace per-4-dword xcl_loadx4 scalar expansion in smem (s_buffer_load_dwordx{2,4}) and mubuf (buffer_load_dwordx{2,3,4}) with branch-free vector mem.Load{count}(select(any(...), addr, 0u)) and componentwise select zeroing OOB dwords (crates/xcl/src/gpu/recomp/emit.rs).
  • Replace xcl_loadx4 and repeated [branch] switch (xcl_w) / XCL_MW descriptor-heap lookups in s_load_dwordx{8,16}, s_buffer_load_dwordx{8,16}, and PRELUDE_MEM's ld_raw with shared helpers xcl_load4x2, xcl_load4x4, and xcl_load5 across single-window (LOAD_HELPERS_ONE_WINDOW), multi-window switch, and descriptor-heap (XCL_MW in mem_accessors, zeroing out parameters when xcl_w >= windows) modes (crates/xcl/src/gpu/recomp/emit.rs).
  • Emit vector mem.Load{2,3,4} and mem.Store{2,3,4} in flat for multi-dword global/flat accesses while keeping the 1-dword form unchanged (crates/xcl/src/gpu/recomp/emit.rs).
  • Add unit/DXC test multi_dword_loads_and_stores_use_vector_accessors (covering 1-window, 4-window switch, and 4-window descriptor-heap HLSL + DXC compilation), add GPU test gpu_vectorized_loads_partial_oob_at_buffer_end_and_global_rw (bounds at the end of a 256-byte mem buffer, inactive lanes, and unaligned global_store/global_load x2/x3/x4), and extend memory_windows_above_4_gib and memory_windows_reject_out_of_uma_aliasing (covering both switch and heap windows) with S_LOAD_DWORDX8, partial-OOB S_BUFFER_LOAD_DWORDX4, unaligned GLOBAL_LOAD_DWORDX4, GLOBAL_STORE_DWORDX3, and out-of-UMA S_LOAD_DWORDX8 (crates/xcl/src/gpu/recomp/tests.rs).

Tested

  • Hardware & toolchain: NVIDIA GeForce RTX 5090 (driver 32.0.16.2101), AMD Ryzen 9 9950X3D 16-Core Processor, Windows 11 (NT 10.0.26300.0), rustc 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.8.2502.11.
  • .\scripts\test.ps1 (XCL_ADAPTER=nvidia, debug build on rebased 7ed8f931a175): 860 passed, 0 failed, 42 ignored (811 lib + 49 integration/e2e/oracle; SKIPPED GPU tests on RTX 5090: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64, heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows; XCL_SAMPLE_* unset/skipped).
  • Cold benchmark (measured pre-rebase against 930e8b4 in 4-window switch mode, --precompile --only cs --windows 4 --split 1, isolated cold XCL_DXIL_CACHE, XCL_PSO_DISK_CACHE=0, and cold NVIDIA/D3D12 shader caches) across 4 large extracted retail compute shaders:
    • 0ee92721dbda03f6: DXIL 1,165,204 -> 1,066,328 B (-8.5%), cold DXC 28.443 -> 22.154 s (-22.1%), cold PSO 177.441 -> 167.876 s (-5.4%)
    • 6893b6dcf6e8b9e0: DXIL 1,138,784 -> 1,034,028 B (-9.2%), cold DXC 14.954 -> 10.502 s (-29.8%), cold PSO 100.793 -> 100.184 s (-0.6%)
    • ab5e0d66397ce5c8: DXIL 1,304,588 -> 1,175,752 B (-9.9%), cold DXC 15.246 -> 16.708 s (+9.6%), cold PSO 155.008 -> 141.814 s (-8.5%)
    • d821b06a29eceb3e: DXIL 1,190,680 -> 1,091,000 B (-8.4%), cold DXC 12.269 -> 9.339 s (-23.9%), cold PSO 94.762 -> 87.735 s (-7.4%)
    • Total (4 CS): DXIL 4,799,256 -> 4,367,108 B (-9.0%), cold DXC 70.912 -> 58.703 s (-17.2%), cold RTX 5090 PSO 528.004 -> 497.609 s (-5.8%).
  • Both main and PR smoke runs in Regression run below ran with existing shader caches warm in default switch-window mode.

Regression run
main:

xcl-smoke v1
commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0
gpu: NVIDIA GeForce RTX 5090
title: RetailGame.Xbox.v1.0.2.1.Dump
seconds: 60
exit: 0x0
frames shown: 1670 (PresentX 1670)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14660 MB

PR:

xcl-smoke v1
commit: 7ed8f931a1757b1e37d3e52cf8133ee5ef9b646c
gpu: NVIDIA GeForce RTX 5090
title: RetailGame.Xbox.v1.0.2.1.Dump
seconds: 60
exit: 0x0
frames shown: 1669 (PresentX 1669)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14660 MB

Not tested

  • Rebased commit (7ed8f931a175) on AMD (XCL_ADAPTER=radeon), native wave64, or discrete AMD GPUs; AMD shader benchmark timings; retail smoke with XCL_HEAP_WINDOWS=1; Linux / Wine; XCL_SAMPLE_* sample tests; and retail gameplay past 60 s.

AI use
T3 Code / Antigravity (gemini-pro-orchestrator-neon) — inspected emit.rs and tests.rs, implemented vectorized multi-dword loads/stores and merged switch/descriptor-heap helpers, wrote unit and GPU tests, rebased onto c160d86, ran the test suite, shader benchmarks, and smoke runs, and drafted the commit, PR description, and review reply.

<!-- greyfinch-sync:ivall/xcl:issue:5475684602 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1439). Originally posted by [coolpersonnn](https://github.com/coolpersonnn) on 2026-11-24T15:58:28Z. --- Vectorize multi-dword memory loads/stores (`Load{2,3,4}`, `Store{2,3,4}`) and merge multi-chunk memory window dispatches into shared helpers so DXC and GPU shader compilers optimize fewer scalar memory operations and window branches. Part of #1269. **What is in it** - Replace per-4-dword `xcl_loadx4` scalar expansion in `smem` (`s_buffer_load_dwordx{2,4}`) and `mubuf` (`buffer_load_dwordx{2,3,4}`) with branch-free vector `mem.Load{count}(select(any(...), addr, 0u))` and componentwise `select` zeroing OOB dwords (`crates/xcl/src/gpu/recomp/emit.rs`). - Replace `xcl_loadx4` and repeated `[branch] switch (xcl_w)` / `XCL_MW` descriptor-heap lookups in `s_load_dwordx{8,16}`, `s_buffer_load_dwordx{8,16}`, and `PRELUDE_MEM`'s `ld_raw` with shared helpers `xcl_load4x2`, `xcl_load4x4`, and `xcl_load5` across single-window (`LOAD_HELPERS_ONE_WINDOW`), multi-window switch, and descriptor-heap (`XCL_MW` in `mem_accessors`, zeroing `out` parameters when `xcl_w >= windows`) modes (`crates/xcl/src/gpu/recomp/emit.rs`). - Emit vector `mem.Load{2,3,4}` and `mem.Store{2,3,4}` in `flat` for multi-dword `global`/`flat` accesses while keeping the 1-dword form unchanged (`crates/xcl/src/gpu/recomp/emit.rs`). - Add unit/DXC test `multi_dword_loads_and_stores_use_vector_accessors` (covering 1-window, 4-window switch, and 4-window descriptor-heap HLSL + DXC compilation), add GPU test `gpu_vectorized_loads_partial_oob_at_buffer_end_and_global_rw` (bounds at the end of a 256-byte `mem` buffer, inactive lanes, and unaligned `global_store`/`global_load` `x2`/`x3`/`x4`), and extend `memory_windows_above_4_gib` and `memory_windows_reject_out_of_uma_aliasing` (covering both switch and heap windows) with `S_LOAD_DWORDX8`, partial-OOB `S_BUFFER_LOAD_DWORDX4`, unaligned `GLOBAL_LOAD_DWORDX4`, `GLOBAL_STORE_DWORDX3`, and out-of-UMA `S_LOAD_DWORDX8` (`crates/xcl/src/gpu/recomp/tests.rs`). **Tested** - Hardware & toolchain: NVIDIA GeForce RTX 5090 (driver `32.0.16.2101`), AMD Ryzen 9 9950X3D 16-Core Processor, Windows 11 (`NT 10.0.26300.0`), `rustc 1.100.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.8.2502.11`. - `.\scripts\test.ps1` (`XCL_ADAPTER=nvidia`, debug build on rebased `7ed8f931a175`): `860 passed, 0 failed, 42 ignored` (`811` lib + `49` integration/e2e/oracle; `SKIPPED` GPU tests on RTX 5090: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64`, `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows`; `XCL_SAMPLE_*` unset/skipped). - Cold benchmark (measured pre-rebase against `930e8b4` in 4-window switch mode, `--precompile --only cs --windows 4 --split 1`, isolated cold `XCL_DXIL_CACHE`, `XCL_PSO_DISK_CACHE=0`, and cold NVIDIA/D3D12 shader caches) across 4 large extracted retail compute shaders: - `0ee92721dbda03f6`: DXIL `1,165,204 -> 1,066,328 B` (`-8.5%`), cold DXC `28.443 -> 22.154 s` (`-22.1%`), cold PSO `177.441 -> 167.876 s` (`-5.4%`) - `6893b6dcf6e8b9e0`: DXIL `1,138,784 -> 1,034,028 B` (`-9.2%`), cold DXC `14.954 -> 10.502 s` (`-29.8%`), cold PSO `100.793 -> 100.184 s` (`-0.6%`) - `ab5e0d66397ce5c8`: DXIL `1,304,588 -> 1,175,752 B` (`-9.9%`), cold DXC `15.246 -> 16.708 s` (`+9.6%`), cold PSO `155.008 -> 141.814 s` (`-8.5%`) - `d821b06a29eceb3e`: DXIL `1,190,680 -> 1,091,000 B` (`-8.4%`), cold DXC `12.269 -> 9.339 s` (`-23.9%`), cold PSO `94.762 -> 87.735 s` (`-7.4%`) - Total (4 CS): DXIL `4,799,256 -> 4,367,108 B` (`-9.0%`), cold DXC `70.912 -> 58.703 s` (`-17.2%`), cold RTX 5090 PSO `528.004 -> 497.609 s` (`-5.8%`). - Both `main` and PR smoke runs in **Regression run** below ran with existing shader caches warm in default switch-window mode. **Regression run** main: ``` xcl-smoke v1 commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 gpu: NVIDIA GeForce RTX 5090 title: RetailGame.Xbox.v1.0.2.1.Dump seconds: 60 exit: 0x0 frames shown: 1670 (PresentX 1670) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14660 MB ``` PR: ``` xcl-smoke v1 commit: 7ed8f931a1757b1e37d3e52cf8133ee5ef9b646c gpu: NVIDIA GeForce RTX 5090 title: RetailGame.Xbox.v1.0.2.1.Dump seconds: 60 exit: 0x0 frames shown: 1669 (PresentX 1669) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14660 MB ``` **Not tested** - Rebased commit (`7ed8f931a175`) on AMD (`XCL_ADAPTER=radeon`), native wave64, or discrete AMD GPUs; AMD shader benchmark timings; retail smoke with `XCL_HEAP_WINDOWS=1`; Linux / Wine; `XCL_SAMPLE_*` sample tests; and retail gameplay past 60 s. **AI use** T3 Code / Antigravity (gemini-pro-orchestrator-neon) — inspected `emit.rs` and `tests.rs`, implemented vectorized multi-dword loads/stores and merged switch/descriptor-heap helpers, wrote unit and GPU tests, rebased onto `c160d86`, ran the test suite, shader benchmarks, and smoke runs, and drafted the commit, PR description, and review reply.
DarkPanda69 commented 2026-11-24 16:07:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-24T16:02:25Z.


The run on a discrete AMD GPU with XCL_ADAPTER=radeon, which this PR lists as not tested. Updated for head 7ed8f93 (first run was on d2d28789aa24, same result).

Tested: pass, head 7ed8f93 merged onto main 9039900 (no conflicts), debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.
cargo test -p xcl --lib -- gpu::recomp --test-threads=4:

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, XCL_ADAPTER=radeon, native wave64: 196 passed, 0 failed, 18 ignored, 0 SKIPPED. gpu_vectorized_loads_partial_oob_at_buffer_end_and_global_rw and the memory / heap window tests ok.
  • NVIDIA RTX 3060, driver 32.0.16.1088: 196 passed, 0 failed, 18 ignored, 2 SKIPPED (no wave64). Same tests ok.

Not tested: AMD shader benchmark timings; the whole workspace suite; Linux / Wine; a title.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7137021914 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1439#issuecomment-7137021914). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-24T16:02:25Z. --- The run on a discrete AMD GPU with `XCL_ADAPTER=radeon`, which this PR lists as not tested. Updated for head `7ed8f93` (first run was on `d2d28789aa24`, same result). **Tested:** pass, head `7ed8f93` merged onto `main` `9039900` (no conflicts), debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. `cargo test -p xcl --lib -- gpu::recomp --test-threads=4`: - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, `XCL_ADAPTER=radeon`, native wave64: 196 passed, 0 failed, 18 ignored, 0 SKIPPED. `gpu_vectorized_loads_partial_oob_at_buffer_end_and_global_rw` and the memory / heap window tests ok. - NVIDIA RTX 3060, driver 32.0.16.1088: 196 passed, 0 failed, 18 ignored, 2 SKIPPED (no wave64). Same tests ok. **Not tested:** AMD shader benchmark timings; the whole workspace suite; Linux / Wine; a title. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
mastrr9 commented 2026-11-24 16:07:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mastrr9 on 2026-11-24T16:04:51Z.


Verified head d2d28789aa24eb40970f486e16c22f561ce749a4 on Windows 11 / NVIDIA RTX 5080 (wave32 / split-wave64, DXC 1.9.2602.17, Rust MSVC, debug build, clean worktree):

  • cargo test -p xcl --lib -- gpu::recomp --test-threads=4: 191 passed, 0 failed, 18 ignored (0 new compiler warnings).

Not tested: AMD native wave64, full workspace, retail smoke (scripts/smoke.ps1).
AI use: T3 Code (Antigravity / Claude Sonnet 5.5) ran the build and tests on our RTX 5080 and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7137086256 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1439#issuecomment-7137086256). Originally posted by [mastrr9](https://github.com/mastrr9) on 2026-11-24T16:04:51Z. --- Verified head `d2d28789aa24eb40970f486e16c22f561ce749a4` on Windows 11 / NVIDIA RTX 5080 (wave32 / split-wave64, DXC 1.9.2602.17, Rust MSVC, debug build, clean worktree): - `cargo test -p xcl --lib -- gpu::recomp --test-threads=4`: **191 passed, 0 failed, 18 ignored** (0 new compiler warnings). **Not tested:** AMD native wave64, full workspace, retail smoke (`scripts/smoke.ps1`). **AI use:** T3 Code (Antigravity / Claude Sonnet 5.5) ran the build and tests on our RTX 5080 and drafted this report.
tctev commented 2026-11-24 17:06:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tctev on 2026-11-24T16:15:47Z.


Tested head d2d28789aa24 in debug on an RTX 4050 Laptop (driver 32.0.16.1742, wave32 / split wave64), i5-12500H, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2602.17.

Running the whole suite with cargo build --workspace && cargo test --workspace -- --test-threads=4 gave 757 passed, 0 failed, and 41 ignored, with gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware skipped for no wave64.

I closed #1443 as a duplicate of this, though one thing from it may be worth taking: none of the GPU tests here run the vector global path across real memory windows (the shape test translates with several windows, the GPU test runs one). Adding an unaligned global_load_dwordx4 and a global_store_dwordx3 in window 1 to gpu_memory_windows_above_4_gib (diff below) passes on this head while its call-site check fails on main, so it pins the one-switch form for multi-window programs.

I also read through the emit.rs part. The new load helpers are defined before PRELUDE_MEM uses them in both the one-window and multi-window headers, and the per-dword bounds masking is still there; nothing I'd change.

Not tested: retail title, AMD, native wave64.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and drafted this report.

diff --git a/crates/xcl/src/gpu/recomp/tests.rs b/crates/xcl/src/gpu/recomp/tests.rs
index 66691c7..22377bc 100644
--- a/crates/xcl/src/gpu/recomp/tests.rs
+++ b/crates/xcl/src/gpu/recomp/tests.rs
@@ -3367,2 +3367,4 @@ fn gpu_memory_windows_above_4_gib() {
         glbl("GLOBAL_ATOMIC_ADD", &[("VDST", 10), ("ADDR", 3), ("DATA", 11), ("SADDR", 16), ("OFFSET", 0), ("GLC", 1)]), // s[16:17] + v3 → window 1
+        glbl("GLOBAL_LOAD_DWORDX4", &[("VDST", 12), ("ADDR", 4), ("SADDR", 0x7D), ("OFFSET", 4)]), // v[4:5] + 4: not 16-byte aligned
+        glbl("GLOBAL_STORE_DWORDX3", &[("ADDR", 16), ("DATA", 12), ("SADDR", 0x7D), ("OFFSET", 0)]), // v[16:17] → window 1
     ];
@@ -3374,2 +3376,4 @@ fn gpu_memory_windows_above_4_gib() {
     assert!(t.hlsl.contains("RWByteAddressBuffer mem1 : register(u3)"));
+    // check call sites since the accessors are defined either way
+    assert!(t.hlsl.contains("= xcl_mLoad4(") && t.hlsl.contains(") xcl_mStore3("), "global x4 / x3: one window switch each");
     let dxil = super::dxc::compile(&t.hlsl, "main", "cs_6_6", &[]).map_err(|e| format!("{e}\n{}", t.hlsl)).unwrap();
@@ -3391,2 +3395,4 @@ fn gpu_memory_windows_above_4_gib() {
         r[11] = 1;
+        r[16] = (w1 + 0x7000 + 16 * l) as u32;
+        r[17] = hi(w1);
     }
@@ -3400,2 +3406,7 @@ fn gpu_memory_windows_above_4_gib() {
         assert_eq!(*word(w1 + 0x5000 + 4 * l), 7 * l as u32, "lane {l}: global_store into window 1");
+        // dwords l+1..l+4 of the 64 written at 0x4000; anything past them is 0
+        let x4: Vec<u32> = (1..5).map(|k| if l + k < 64 { 5000 + (l + k) as u32 } else { 0 }).collect();
+        assert_eq!(r.vgpr[l as usize][12..16], x4, "lane {l}: global_load_dwordx4 from window 1");
+        let x3: Vec<u32> = (0..3).map(|k| *word(w1 + 0x7000 + 16 * l + 4 * k)).collect();
+        assert_eq!(x3, x4[..3], "lane {l}: global_store_dwordx3 into window 1");
     }
<!-- greyfinch-sync:ivall/xcl:comment:7137377409 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1439#issuecomment-7137377409). Originally posted by [tctev](https://github.com/tctev) on 2026-11-24T16:15:47Z. --- Tested head `d2d28789aa24` in debug on an RTX 4050 Laptop (driver 32.0.16.1742, wave32 / split wave64), i5-12500H, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2602.17. Running the whole suite with `cargo build --workspace && cargo test --workspace -- --test-threads=4` gave 757 passed, 0 failed, and 41 ignored, with `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware` skipped for no wave64. I closed #1443 as a duplicate of this, though one thing from it may be worth taking: none of the GPU tests here run the vector global path across real memory windows (the shape test translates with several windows, the GPU test runs one). Adding an unaligned `global_load_dwordx4` and a `global_store_dwordx3` in window 1 to `gpu_memory_windows_above_4_gib` (diff below) passes on this head while its call-site check fails on `main`, so it pins the one-switch form for multi-window programs. I also read through the `emit.rs` part. The new load helpers are defined before `PRELUDE_MEM` uses them in both the one-window and multi-window headers, and the per-dword bounds masking is still there; nothing I'd change. Not tested: retail title, AMD, native wave64. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and drafted this report. ```diff diff --git a/crates/xcl/src/gpu/recomp/tests.rs b/crates/xcl/src/gpu/recomp/tests.rs index 66691c7..22377bc 100644 --- a/crates/xcl/src/gpu/recomp/tests.rs +++ b/crates/xcl/src/gpu/recomp/tests.rs @@ -3367,2 +3367,4 @@ fn gpu_memory_windows_above_4_gib() { glbl("GLOBAL_ATOMIC_ADD", &[("VDST", 10), ("ADDR", 3), ("DATA", 11), ("SADDR", 16), ("OFFSET", 0), ("GLC", 1)]), // s[16:17] + v3 → window 1 + glbl("GLOBAL_LOAD_DWORDX4", &[("VDST", 12), ("ADDR", 4), ("SADDR", 0x7D), ("OFFSET", 4)]), // v[4:5] + 4: not 16-byte aligned + glbl("GLOBAL_STORE_DWORDX3", &[("ADDR", 16), ("DATA", 12), ("SADDR", 0x7D), ("OFFSET", 0)]), // v[16:17] → window 1 ]; @@ -3374,2 +3376,4 @@ fn gpu_memory_windows_above_4_gib() { assert!(t.hlsl.contains("RWByteAddressBuffer mem1 : register(u3)")); + // check call sites since the accessors are defined either way + assert!(t.hlsl.contains("= xcl_mLoad4(") && t.hlsl.contains(") xcl_mStore3("), "global x4 / x3: one window switch each"); let dxil = super::dxc::compile(&t.hlsl, "main", "cs_6_6", &[]).map_err(|e| format!("{e}\n{}", t.hlsl)).unwrap(); @@ -3391,2 +3395,4 @@ fn gpu_memory_windows_above_4_gib() { r[11] = 1; + r[16] = (w1 + 0x7000 + 16 * l) as u32; + r[17] = hi(w1); } @@ -3400,2 +3406,7 @@ fn gpu_memory_windows_above_4_gib() { assert_eq!(*word(w1 + 0x5000 + 4 * l), 7 * l as u32, "lane {l}: global_store into window 1"); + // dwords l+1..l+4 of the 64 written at 0x4000; anything past them is 0 + let x4: Vec<u32> = (1..5).map(|k| if l + k < 64 { 5000 + (l + k) as u32 } else { 0 }).collect(); + assert_eq!(r.vgpr[l as usize][12..16], x4, "lane {l}: global_load_dwordx4 from window 1"); + let x3: Vec<u32> = (0..3).map(|k| *word(w1 + 0x7000 + 16 * l + 4 * k)).collect(); + assert_eq!(x3, x4[..3], "lane {l}: global_store_dwordx3 into window 1"); } ```
coolpersonnn commented 2026-11-24 17:06:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by coolpersonnn on 2026-11-24T16:20:43Z.


Thanks @tctev for the full-suite run, the emit.rs review, and the suggested multi-window test addition from #1443 (and thanks @DarkPanda69 and @mastrr9 for testing on RX 9070 XT, RTX 3060, and RTX 5080 — great to have native wave64 RDNA4 coverage on head d2d28789aa24).

Adding unaligned global_load_dwordx4 and global_store_dwordx3 plus the xcl_mLoad4( / xcl_mStore3( call-site checks to gpu_memory_windows_above_4_gib is a clean way to pin the multi-window vector path on the GPU. Keeping d2d28789aa24 as-is for now so the existing multi-GPU runs and smoke check stay aligned with head, and happy to fold that test diff in (with a fresh scripts/smoke.ps1 run) if a maintainer wants it included before merge.

Message generated by AI (Gemini Neon)

<!-- greyfinch-sync:ivall/xcl:comment:7137514958 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1439#issuecomment-7137514958). Originally posted by [coolpersonnn](https://github.com/coolpersonnn) on 2026-11-24T16:20:43Z. --- Thanks @tctev for the full-suite run, the `emit.rs` review, and the suggested multi-window test addition from #1443 (and thanks @DarkPanda69 and @mastrr9 for testing on RX 9070 XT, RTX 3060, and RTX 5080 — great to have native wave64 RDNA4 coverage on head `d2d28789aa24`). Adding unaligned `global_load_dwordx4` and `global_store_dwordx3` plus the `xcl_mLoad4(` / `xcl_mStore3(` call-site checks to `gpu_memory_windows_above_4_gib` is a clean way to pin the multi-window vector path on the GPU. Keeping `d2d28789aa24` as-is for now so the existing multi-GPU runs and smoke check stay aligned with head, and happy to fold that test diff in (with a fresh `scripts/smoke.ps1` run) if a maintainer wants it included before merge. Message generated by AI (Gemini Neon)
GonZiin commented 2026-11-24 17:47:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by GonZiin on 2026-11-24T17:47:58Z.

Review: COMMENTED


The rebase onto current main needs a heap-window implementation for all three new vector helpers. I confirmed the conflict with #680 in mem_accessors. Keeping the old heap branch and resolving only the switch branch leaves xcl_load4x2, xcl_load4x4 and xcl_load5 undeclared in heap-window shaders.

Tested

  • Linux: git merge-tree --write-tree for base 9e3831e1f570d3646e53ab753b19ec07eb8f1485 and PR head d2d28789aa24eb40970f486e16c22f561ce749a4 reported a content conflict in crates/xcl/src/gpu/recomp/emit.rs.
  • Windows 11 Pro 26300, Ryzen 7 7800X3D, Rust 1.100.0 MSVC, debug, SDK DXC 1.8.2502.11. On a temporary merge I extended multi_dword_loads_and_stores_use_vector_accessors to compile one-window, four-window switch and four-window descriptor-heap HLSL. Running cargo test -p xcl --lib multi_dword_loads_and_stores_use_vector_accessors -- --nocapture passed the first two modes and DXC rejected the third with undeclared identifiers for the three helpers.
  • I then emitted the three helpers in the heap branch using XCL_MW and preserved zero outputs for an out-of-range window. The same test passed with all three modes enabled (1 passed, 0 failed, 0 ignored).

Please include the four-window heap case in the regression test when rebasing. It catches the API gap that the switch tests alone miss.

Not tested

GPU execution of the temporary merge and retail titles. This check compiles the emitted HLSL.

AI use

Codex (gpt-6.2-sol) tested the merge conflict, wrote and ran the temporary compilation probe, and drafted this review.

<!-- greyfinch-sync:ivall/xcl:review:6044463210 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1439#pullrequestreview-6044463210). Originally posted by [GonZiin](https://github.com/GonZiin) on 2026-11-24T17:47:58Z. **Review:** COMMENTED --- The rebase onto current `main` needs a heap-window implementation for all three new vector helpers. I confirmed the conflict with #680 in `mem_accessors`. Keeping the old heap branch and resolving only the switch branch leaves `xcl_load4x2`, `xcl_load4x4` and `xcl_load5` undeclared in heap-window shaders. **Tested** - Linux: `git merge-tree --write-tree` for base `9e3831e1f570d3646e53ab753b19ec07eb8f1485` and PR head `d2d28789aa24eb40970f486e16c22f561ce749a4` reported a content conflict in `crates/xcl/src/gpu/recomp/emit.rs`. - Windows 11 Pro 26300, Ryzen 7 7800X3D, Rust 1.100.0 MSVC, debug, SDK DXC 1.8.2502.11. On a temporary merge I extended `multi_dword_loads_and_stores_use_vector_accessors` to compile one-window, four-window switch and four-window descriptor-heap HLSL. Running `cargo test -p xcl --lib multi_dword_loads_and_stores_use_vector_accessors -- --nocapture` passed the first two modes and DXC rejected the third with undeclared identifiers for the three helpers. - I then emitted the three helpers in the heap branch using `XCL_MW` and preserved zero outputs for an out-of-range window. The same test passed with all three modes enabled (1 passed, 0 failed, 0 ignored). Please include the four-window heap case in the regression test when rebasing. It catches the API gap that the switch tests alone miss. **Not tested** GPU execution of the temporary merge and retail titles. This check compiles the emitted HLSL. **AI use** Codex (`gpt-6.2-sol`) tested the merge conflict, wrote and ran the temporary compilation probe, and drafted this review.
DTsordas commented 2026-11-24 18:08:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DTsordas on 2026-11-24T17:16:10Z.


Test report for d2d2878 on a discrete AMD GPU, with DXC timings across a broad program mix

Tested

  • RX 9060 XT 16 GB (RDNA4, driver 32.0.32029.2010), Ryzen 5 5600X, 64 GB RAM, Windows 11 Pro 26300, rustc 1.100.0, debug build.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 on d2d2878: 757 passed, 0 failed, 41 ignored, no SKIPPED. Both new GPU tests pass: gpu_vectorized_loads_partial_oob_at_buffer_end_and_global_rw and gpu_grouped_loads_bounds_and_inactive_lanes.
  • DXC on retail programs. I built d2d2878 and its base 037aecd, then ran xcl shaders shaders.rpf --recomp with XCL_DUMP_HLSL and XCL_DUMP_EVERY=400. That dumps the same 59 programs from each build (every program whose name hash ≡ 0 mod 400: 26 MS, 19 PS, 5 CS, 5 VS, 4 GS). I compiled them with dxc.exe 1.9.2602.17 using XCL's flags (-HV 2021, -O picked by size as dxc.rs does), best of 2, with scripts/dxc_ab.py. All 59 compile on both builds.
DXC time DXIL size
1 memory window 47.60 → 43.91 s (-7.8 %, median per program -2.4 %) -4.2 %
4 memory windows (XCL_RECOMP_WINDOWS=4) 68.50 → 61.70 s (-9.9 %, median per program -8.1 %) -9.2 %

DXC time by stage:

stage 1 window 4 windows
CS -13.5 % -8.6 %
MS -6.0 % -10.7 %
PS -2.7 % -11.2 %
VS -5.4 % -7.3 %
GS 0 % -1.3 %

Whole pack, 26 698 programs: HLSL 9 665.7 → 9 645.2 MB with 1 window and 10 759.3 → 10 753.6 MB with 4. The text barely shrinks, but DXC time and DXIL size drop.

For context, I measured on #1269 that on main the buffer loads this PR rewrites cost about 6.5 ms of DXC time each, against about 0.7 ms for a VALU op. They are 3 % of instructions and 22 % of DXC time. With one window, this PR saves 3.7 s on the same programs. The ablation, run separately on a later main, put buffer and SMEM loads together at about 16 s. That is only a rough comparison, but it suggests a good part of the load cost is still left.

Not tested

  • Driver (PSO) compile time, the retail title run, and NVIDIA (the PR already has NVIDIA numbers).

AI use: Claude Code (Claude Opus 5.5) ran the builds, tests and measurements and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7138940186 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1439#issuecomment-7138940186). Originally posted by [DTsordas](https://github.com/DTsordas) on 2026-11-24T17:16:10Z. --- **Test report for `d2d2878` on a discrete AMD GPU, with DXC timings across a broad program mix** **Tested** - RX 9060 XT 16 GB (RDNA4, driver 32.0.32029.2010), Ryzen 5 5600X, 64 GB RAM, Windows 11 Pro 26300, rustc 1.100.0, debug build. - `cargo build --workspace && cargo test --workspace -- --test-threads=4` on `d2d2878`: **757 passed, 0 failed, 41 ignored, no SKIPPED**. Both new GPU tests pass: `gpu_vectorized_loads_partial_oob_at_buffer_end_and_global_rw` and `gpu_grouped_loads_bounds_and_inactive_lanes`. - DXC on retail programs. I built `d2d2878` and its base `037aecd`, then ran `xcl shaders shaders.rpf --recomp` with `XCL_DUMP_HLSL` and `XCL_DUMP_EVERY=400`. That dumps the same 59 programs from each build (every program whose name hash ≡ 0 mod 400: 26 MS, 19 PS, 5 CS, 5 VS, 4 GS). I compiled them with `dxc.exe` 1.9.2602.17 using XCL's flags (`-HV 2021`, -O picked by size as `dxc.rs` does), best of 2, with [`scripts/dxc_ab.py`](https://github.com/DTsordas/xcl/commit/accbd21). All 59 compile on both builds. | | DXC time | DXIL size | | --- | --- | --- | | 1 memory window | 47.60 → 43.91 s (**-7.8 %**, median per program -2.4 %) | -4.2 % | | 4 memory windows (`XCL_RECOMP_WINDOWS=4`) | 68.50 → 61.70 s (**-9.9 %**, median per program -8.1 %) | -9.2 % | DXC time by stage: | stage | 1 window | 4 windows | | --- | --- | --- | | CS | -13.5 % | -8.6 % | | MS | -6.0 % | -10.7 % | | PS | -2.7 % | -11.2 % | | VS | -5.4 % | -7.3 % | | GS | 0 % | -1.3 % | Whole pack, 26 698 programs: HLSL 9 665.7 → 9 645.2 MB with 1 window and 10 759.3 → 10 753.6 MB with 4. The text barely shrinks, but DXC time and DXIL size drop. For context, I [measured on #1269](https://github.com/ivall/xcl/issues/1269#issuecomment-7138051760) that on `main` the buffer loads this PR rewrites cost about 6.5 ms of DXC time each, against about 0.7 ms for a VALU op. They are 3 % of instructions and 22 % of DXC time. With one window, this PR saves 3.7 s on the same programs. The ablation, run separately on a later `main`, put buffer and SMEM loads together at about 16 s. That is only a rough comparison, but it suggests a good part of the load cost is still left. **Not tested** - Driver (PSO) compile time, the retail title run, and NVIDIA (the PR already has NVIDIA numbers). AI use: Claude Code (Claude Opus 5.5) ran the builds, tests and measurements and wrote this report.
coolpersonnn commented 2026-11-24 19:07:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by coolpersonnn on 2026-11-24T18:50:02Z.


Thanks @GonZiin for catching that — rebased onto c160d86 and force-pushed (7ed8f93):

  • Added descriptor-heap (XCL_MW) implementations of xcl_load4x2, xcl_load4x4, and xcl_load5 in mem_accessors (crates/xcl/src/gpu/recomp/emit.rs), zeroing all out parameters before returning when xcl_w >= windows.
  • Extended multi_dword_loads_and_stores_use_vector_accessors to translate and DXC-compile 1-window, 4-window switch, and 4-window descriptor-heap modes.
  • Added GPU runtime coverage in both switch and heap modes (gpu_memory_windows_from_the_heap, gpu_heap_windows_reject_out_of_uma_aliasing, and their switch counterparts) for S_LOAD_DWORDX8, partial-OOB S_BUFFER_LOAD_DWORDX4 (at window top in bounded heap mode and interior in unbounded Root-UAV mode), and out-of-UMA S_LOAD_DWORDX8.
  • Folded in @tctev's unaligned GLOBAL_LOAD_DWORDX4 and GLOBAL_STORE_DWORDX3 + xcl_mLoad4( / xcl_mStore3( multi-window checks from #1443 (and thanks @DTsordas for the discrete AMD DXC A/B numbers across the 59 retail programs).

Re-verified on RTX 5090 (XCL_ADAPTER=nvidia) on 7ed8f93:

  • .\scripts\test.ps1: 860 passed, 0 failed, 42 ignored (2 wave64-only tests and 1 heap_window_out_of_memory_falls_back_to_the_switch_form skipped).
  • Updated Regression run (scripts/smoke.ps1, 60 s): 1669 frames on PR 7ed8f93 vs 1670 on main c160d86, 0 device removals, 0 crashes, 14660 MB peak commit.

AI use: T3 Code / Antigravity (gemini-pro-orchestrator-neon) resolved the rebase conflict, updated the tests, ran the suite and smoke checks, and wrote this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7141216259 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1439#issuecomment-7141216259). Originally posted by [coolpersonnn](https://github.com/coolpersonnn) on 2026-11-24T18:50:02Z. --- Thanks @GonZiin for catching that — rebased onto `c160d86` and force-pushed (`7ed8f93`): - Added descriptor-heap (`XCL_MW`) implementations of `xcl_load4x2`, `xcl_load4x4`, and `xcl_load5` in `mem_accessors` (`crates/xcl/src/gpu/recomp/emit.rs`), zeroing all `out` parameters before returning when `xcl_w >= windows`. - Extended `multi_dword_loads_and_stores_use_vector_accessors` to translate and DXC-compile 1-window, 4-window switch, and 4-window descriptor-heap modes. - Added GPU runtime coverage in both switch and heap modes (`gpu_memory_windows_from_the_heap`, `gpu_heap_windows_reject_out_of_uma_aliasing`, and their switch counterparts) for `S_LOAD_DWORDX8`, partial-OOB `S_BUFFER_LOAD_DWORDX4` (at window top in bounded heap mode and interior in unbounded Root-UAV mode), and out-of-UMA `S_LOAD_DWORDX8`. - Folded in @tctev's unaligned `GLOBAL_LOAD_DWORDX4` and `GLOBAL_STORE_DWORDX3` + `xcl_mLoad4(` / `xcl_mStore3(` multi-window checks from #1443 (and thanks @DTsordas for the discrete AMD DXC A/B numbers across the 59 retail programs). Re-verified on RTX 5090 (`XCL_ADAPTER=nvidia`) on `7ed8f93`: - `.\scripts\test.ps1`: **860 passed, 0 failed, 42 ignored** (`2` wave64-only tests and `1` `heap_window_out_of_memory_falls_back_to_the_switch_form` skipped). - Updated **Regression run** (`scripts/smoke.ps1`, 60 s): `1669` frames on PR `7ed8f93` vs `1670` on `main` `c160d86`, `0` device removals, `0` crashes, `14660 MB` peak commit. AI use: T3 Code / Antigravity (gemini-pro-orchestrator-neon) resolved the rebase conflict, updated the tests, ran the suite and smoke checks, and wrote this reply.
DavidM1911 commented 2026-11-24 19:07:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:52:33Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141274288 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1439#issuecomment-7141274288). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:52:33Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
nnonno91 commented 2026-11-24 19:07:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T19:05:40Z.


Independent AMD native-wave64 check of 7ed8f931a1757b1e37d3e52cf8133ee5ef9b646c.

Tested

  • AMD Radeon(TM) Graphics (Ryzen 7 9800X3D integrated GPU, driver 32.0.21042.62), Windows 11 25H2 build 26200.9974, Rust 1.100.0 MSVC, SDK DXC 1.8.2502.11. Targeted XCL_ADAPTER='AMD Radeon' and used unoptimized debug/test builds (debug info disabled on the PR).
  • cargo build --workspace --locked passed. cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output reported 860 passed, 0 failed, 42 ignored. The bundled title passed. One explicit GPU skip is included in the pass count (heap_window_out_of_memory_falls_back_to_the_switch_form, heap windows off).
  • With XCL_REQUIRE_GPU=wave64,mesh, cargo test --locked -p xcl --lib -- multi_dword_loads_and_stores_use_vector_accessors gpu_vectorized_loads_partial_oob_at_buffer_end_and_global_rw gpu_memory_windows_above_4_gib gpu_memory_windows_from_the_heap gpu_memory_windows_reject_out_of_uma_aliasing gpu_heap_windows_reject_out_of_uma_aliasing --test-threads=1 --nocapture gave 6 passed, 0 failed, 0 ignored, 0 skips. This covered the single-window GPU fixture and the switch and descriptor-heap multiple-window fixtures.
  • With XCL_HEAP_WINDOWS=1, cargo test --locked -p xcl --test gpu_compute_e2e -- --test-threads=1 --show-output gave 4 passed, 0 failed, 0 ignored, 0 skips. The log confirmed use of the shared descriptor heap and a rebuild in switch form after the test injected an out-of-memory result.
  • cargo test --locked -p xcl --test dwordx16_window_probe -- --exact dwordx16_reads_respect_window_and_buffer_bounds --test-threads=1 --nocapture ran the same temporary native-wave64 fixture at the PR and its base c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 (one pass each, no skips). It dispatched in switch and descriptor-heap modes, with two mapped windows 4 GiB apart. In both modes and builds, all 16 words of an ordinary load came from window 1, a buffered load returned 13 valid words and three zeros, and a load targeting an unmapped window returned 16 zeros. The partial heap read ended at the physical view boundary. In switch mode the three excluded words had nonzero sentinels. The PR emitted three xcl_load4x4 call sites per mode, versus zero on the base.

Not tested

Discrete AMD, retail workloads, Linux / Wine, or performance.

AI use

OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary probe, ran the tests, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7141588321 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1439#issuecomment-7141588321). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-24T19:05:40Z. --- Independent AMD native-wave64 check of `7ed8f931a1757b1e37d3e52cf8133ee5ef9b646c`. **Tested** - AMD Radeon(TM) Graphics (Ryzen 7 9800X3D integrated GPU, driver 32.0.21042.62), Windows 11 25H2 build 26200.9974, Rust 1.100.0 MSVC, SDK DXC 1.8.2502.11. Targeted `XCL_ADAPTER='AMD Radeon'` and used unoptimized debug/test builds (debug info disabled on the PR). - `cargo build --workspace --locked` passed. `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output` reported **860 passed, 0 failed, 42 ignored**. The bundled title passed. One explicit GPU skip is included in the pass count (`heap_window_out_of_memory_falls_back_to_the_switch_form`, heap windows off). - With `XCL_REQUIRE_GPU=wave64,mesh`, `cargo test --locked -p xcl --lib -- multi_dword_loads_and_stores_use_vector_accessors gpu_vectorized_loads_partial_oob_at_buffer_end_and_global_rw gpu_memory_windows_above_4_gib gpu_memory_windows_from_the_heap gpu_memory_windows_reject_out_of_uma_aliasing gpu_heap_windows_reject_out_of_uma_aliasing --test-threads=1 --nocapture` gave **6 passed, 0 failed, 0 ignored, 0 skips**. This covered the single-window GPU fixture and the switch and descriptor-heap multiple-window fixtures. - With `XCL_HEAP_WINDOWS=1`, `cargo test --locked -p xcl --test gpu_compute_e2e -- --test-threads=1 --show-output` gave **4 passed, 0 failed, 0 ignored, 0 skips**. The log confirmed use of the shared descriptor heap and a rebuild in switch form after the test injected an out-of-memory result. - `cargo test --locked -p xcl --test dwordx16_window_probe -- --exact dwordx16_reads_respect_window_and_buffer_bounds --test-threads=1 --nocapture` ran the same temporary native-wave64 fixture at the PR and its base `c160d86ef2efe3a07e4dfb473e4fa72eafb413c0` (one pass each, no skips). It dispatched in switch and descriptor-heap modes, with two mapped windows 4 GiB apart. In both modes and builds, all 16 words of an ordinary load came from window 1, a buffered load returned 13 valid words and three zeros, and a load targeting an unmapped window returned 16 zeros. The partial heap read ended at the physical view boundary. In switch mode the three excluded words had nonzero sentinels. The PR emitted three `xcl_load4x4` call sites per mode, versus zero on the base. **Not tested** Discrete AMD, retail workloads, Linux / Wine, or performance. **AI use** OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary probe, ran the tests, and drafted this report.
DavidM1911 commented 2026-11-26 06:06:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:27:40Z.


Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7183504881 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1439#issuecomment-7183504881). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T05:27:40Z. --- Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.
Foniass commented 2026-12-01 05:45:19 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 7ed8f93

No open PR makes the same change; #1699 (vectorized multi-dword loads in the direct DXIL path) was closed, and #113 (merged) introduced the xcl_loadx4 helper this PR replaces with Load2/3/4, xcl_load4x2/xcl_load4x4 and xcl_load5.
The PR conflicts with main: emit.rs has since gained loadx4_switch, the linked xcl_l_loadx4 accessor for big compute programs and the MEM_NULL_LOAD heap form, all built around xcl_loadx4, so the rebase has to carry the new helpers into those paths too.
The smem / MUBUF paths now issue one LoadN when any dword is in range and rely on the per-component select plus D3D12 out-of-bounds reads for the rest; the GPU test at the end of a 256-byte buffer covers that, and it should be rerun on both vendors after the rebase.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302102242 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1439#issuecomment-7302102242). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:45:19Z. --- **Triage (#1607)** – head 7ed8f93 No open PR makes the same change; #1699 (vectorized multi-dword loads in the direct DXIL path) was closed, and #113 (merged) introduced the xcl_loadx4 helper this PR replaces with Load2/3/4, xcl_load4x2/xcl_load4x4 and xcl_load5. The PR conflicts with main: emit.rs has since gained loadx4_switch, the linked xcl_l_loadx4 accessor for big compute programs and the MEM_NULL_LOAD heap form, all built around xcl_loadx4, so the rebase has to carry the new helpers into those paths too. The smem / MUBUF paths now issue one LoadN when any dword is in range and rely on the per-component select plus D3D12 out-of-bounds reads for the rest; the GPU test at the end of a 256-byte buffer covers that, and it should be rerun on both vendors after the rebase. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
coolpersonnn commented 2026-12-01 14:27:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by coolpersonnn on 2026-12-01T14:27:17Z.


Closing: heavily conflicts with newer memory-accessor and heap-window changes on main, and the rebase cost isn't worth it for an HLSL-only path.

<!-- greyfinch-sync:ivall/xcl:comment:7314276133 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1439#issuecomment-7314276133). Originally posted by [coolpersonnn](https://github.com/coolpersonnn) on 2026-12-01T14:27:17Z. --- Closing: heavily conflicts with newer memory-accessor and heap-window changes on main, and the rebase cost isn't worth it for an HLSL-only path.

Pull request closed

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

No due date set.

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