Recompiler: use typed R8 views for single-byte compute stores #2926

Open
github-bot wants to merge 1 commit from github-bot/gh-2926 into main AGit
Owner

@⁠Kalmarv on GitHub · 2026-11-27 00:14 UTC · original
Kalmarv:batman/typed-r8-store → main · +125 −5 · 9 files · 1 commits · draft

Part of #2688. A single-byte formatted store currently updates its containing dword with an atomic AND and OR. A typed byte store can update the addressed byte directly.

What is in it

  • Opt in for one compute shader by setting XCL_BYTE_STORE_CS to its hexadecimal hash with four heap-backed windows and direct DXIL compute. Each window has 32 R8_UINT views of up to 128 MiB. Wider stores retain the existing lowering. The adapter's typed-store support and the translation cache key are checked.

Tested

  • Windows, RTX 5070 Ti (610.74), Ryzen 9 9950X, Rust 1.99.0. The new debug regression test validates the generated DXIL and checks both the typed store and the atomic fallback. 1 passed on this head.
  • On the integration branch, one captured 8 × 8 × 40 dispatch on driver host memory took 5.19 / 1.95 / 5.56 ms (original / typed / original, medians of nine). An additional comparison with a patterned mask changed 3,137 words in both forms and found zero differences between them.
  • The locked workspace build and test suite on this head used DXC 1.9. Test harness totals were 1,447 passed, 0 failed, 47 ignored.

Regression run

Both 60-second smoke arms reached the 26,503-shader startup preparation and timed out before the first frame. A 480-second paired retry is queued on the same main and PR revisions.

Not tested

  • AMD and Wine. The native capture's mask was unchanged over the dispatch, so the native replay alone cannot validate a changing mask. Whole-frame performance and picture correctness require separate tests.

AI use

  • OpenAI Codex (GPT-6) implemented the change, wrote the test, ran the checks, and prepared this description at the contributor's request.
**@⁠Kalmarv** on GitHub · 2026-11-27 00:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/2926) `Kalmarv:batman/typed-r8-store` → `main` · +125 −5 · 9 files · 1 commits · draft Part of #2688. A single-byte formatted store currently updates its containing dword with an atomic AND and OR. A typed byte store can update the addressed byte directly. **What is in it** - Opt in for one compute shader by setting `XCL_BYTE_STORE_CS` to its hexadecimal hash with four heap-backed windows and direct DXIL compute. Each window has 32 R8_UINT views of up to 128 MiB. Wider stores retain the existing lowering. The adapter's typed-store support and the translation cache key are checked. **Tested** - Windows, RTX 5070 Ti (610.74), Ryzen 9 9950X, Rust 1.99.0. The new debug regression test validates the generated DXIL and checks both the typed store and the atomic fallback. 1 passed on this head. - On the integration branch, one captured 8 × 8 × 40 dispatch on driver host memory took 5.19 / 1.95 / 5.56 ms (original / typed / original, medians of nine). An additional comparison with a patterned mask changed 3,137 words in both forms and found zero differences between them. - The locked workspace build and test suite on this head used DXC 1.9. Test harness totals were 1,447 passed, 0 failed, 47 ignored. **Regression run** Both 60-second smoke arms reached the 26,503-shader startup preparation and timed out before the first frame. A 480-second paired retry is queued on the same main and PR revisions. **Not tested** - AMD and Wine. The native capture's mask was unchanged over the dispatch, so the native replay alone cannot validate a changing mask. Whole-frame performance and picture correctness require separate tests. **AI use** - OpenAI Codex (GPT-6) implemented the change, wrote the test, ran the checks, and prepared this description at the contributor's request.
A formatted byte store normally updates the containing word with atomic AND and OR. Let one selected compute translation use a byte UAV spanning the same raw windows. Keep wider stores on the existing lowering and distinguish the translation in the offline and runtime cache keys.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:16:24 +00:00
Author
Owner

@⁠andrewDoing on GitHub · 2026-11-27 00:58 UTC · original

PR #2926, a0e4c943d2 + local test and descriptor setup in xcl-2926-byte-boundary. The production shader translator and descriptor geometry are unchanged. The fixture explicitly chooses raw/typed modes and binds the production helper's views. This tests a single window and one descriptor boundary, with no game, timing, or launch-gate coverage.
NVIDIA GeForce RTX 5070 (12227 MiB, 616.92), Windows SDK 10.0.26100.0, DXC/DXIL 1.8.2502.11. XCL_ADAPTER=5070. Fresh isolated CARGO_TARGET_DIR set to the worktree's target. CARGO_PROFILE_TEST_DEBUG=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_INCREMENTAL=0, CARGO_NET_OFFLINE=true, XCL_TEST_BYTE_BOUNDARY=1, XCL_DXIL_CACHE=/target/byte-cache. SDK x64 prepended to PATH; vcvars64.bat from VS2017 BuildTools used before Cargo.
cargo test --locked -p xcl --lib gpu::dxil::core_tests::probe_byte_descriptor_boundary -- --exact --nocapture
32 distinct active lane stores using BUFFER_STORE_FORMAT_X with 8_UNORM, alternating between adjacent 128 MiB typed R8 views, all four byte positions covered. Each lowering matched all 134217856 bytes of the CPU oracle, including unchanged neighbors. Test elapsed 0.85 s; 1 passed, 0 failed, 1346 filtered. See xcl-pr2926-byte-boundary.log and the local fixture changes in xcl-2926-byte-boundary.

**@⁠andrewDoing** on GitHub · 2026-11-27 00:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/2926#issuecomment-7206903123) PR #2926, a0e4c943d224950518485c70f280e05855f1d55b + local test and descriptor setup in xcl-2926-byte-boundary. The production shader translator and descriptor geometry are unchanged. The fixture explicitly chooses raw/typed modes and binds the production helper's views. This tests a single window and one descriptor boundary, with no game, timing, or launch-gate coverage. NVIDIA GeForce RTX 5070 (12227 MiB, 616.92), Windows SDK 10.0.26100.0, DXC/DXIL 1.8.2502.11. XCL_ADAPTER=5070. Fresh isolated CARGO_TARGET_DIR set to the worktree's target. CARGO_PROFILE_TEST_DEBUG=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_INCREMENTAL=0, CARGO_NET_OFFLINE=true, XCL_TEST_BYTE_BOUNDARY=1, XCL_DXIL_CACHE=<worktree>/target/byte-cache. SDK x64 prepended to PATH; vcvars64.bat from VS2017 BuildTools used before Cargo. cargo test --locked -p xcl --lib gpu::dxil::core_tests::probe_byte_descriptor_boundary -- --exact --nocapture 32 distinct active lane stores using BUFFER_STORE_FORMAT_X with 8_UNORM, alternating between adjacent 128 MiB typed R8 views, all four byte positions covered. Each lowering matched all 134217856 bytes of the CPU oracle, including unchanged neighbors. Test elapsed 0.85 s; 1 passed, 0 failed, 1346 filtered. See xcl-pr2926-byte-boundary.log and the local fixture changes in xcl-2926-byte-boundary.
Author
Owner

@⁠retrope13 on GitHub · 2026-11-27 01:31 UTC · original

Verified PR #2926 (a0e4c943) on Windows 11 (NVIDIA Ada Lovelace + Intel UHD Graphics targeted checks) and reviewed the full diff. The default workspace suite passes cleanly (1,447 passed, 0 failed), and the code audit caught one reproducible unit-test crash when XCL_BYTE_STORE_CS is exported in the shell environment.

Environment

  • OS: Windows 11 26H2 (build 26300.9818)
  • CPU / RAM: Intel Core i5-14500HX (14C/20T), 24 GB RAM
  • GPUs:
    • NVIDIA GeForce RTX 4060 Laptop GPU (8 GB, Ada Lovelace, wave32, driver 32.0.16.2140)
    • Intel(R) UHD Graphics (driver 32.0.101.7092)
  • Toolchain: rustc 1.100.0 (stable-x86_64-pc-windows-msvc), VS 2022 Build Tools 17.14.45, Windows SDK 10.0.26100.0 (DXC / DXIL 1.9.2602.17)

Test Results (a0e4c943)

Command Adapter / Env Result
cargo test --locked -p xcl --lib -- typed_byte_store_adds_a_byte_view_and_keeps_the_raw_fallback --nocapture NVIDIA (XCL_ADAPTER=NVIDIA) 1 passed, 0 failed (0.03s, validated & disassembled with DXC/DXIL 1.9.2602.17)
cargo test --locked -p xcl --lib -- gpu_direct_unaligned_multi_dword_format_store --nocapture NVIDIA (XCL_ADAPTER=NVIDIA) 1 passed, 0 failed, 0 skipped (0.39s)
cargo test --locked -p xcl --lib -- gpu_direct_unaligned_multi_dword_format_store --nocapture Intel (XCL_ADAPTER=Intel) 1 passed, 0 failed (0.10s; capability-skipped: no GPU / DXC / wave64)
cargo test --locked -p xcl --test console_heap_contract -- --nocapture NVIDIA & Intel 9 passed, 0 failed on both (0.03s each)
cargo build --workspace --locked && cargo test --workspace --locked --no-fail-fast -- --test-threads=4 NVIDIA (XCL_ADAPTER=NVIDIA, default env) 1,447 passed, 0 failed, 47 ignored (29 capability/SDK SKIPPED lines: 21 no wave64, 3 per-lane f16 form refused, 3 no D3D12 debug layer, 1 cannot disable driver cache, 1 no heap windows)
cargo test --locked -p xcl --lib -- window_views_do_not_hold_global_during_device_calls --nocapture XCL_BYTE_STORE_CS=1234 FAILED (reproduced child crash — see below)

Code Review Findings

  1. Test crash when XCL_BYTE_STORE_CS is set in the shell (crates/xcl/src/hle/d3d12x/console_heap.rs:886-926):

    • window_views_do_not_hold_global_during_device_calls spawns a child test process inheriting the parent environment (console_heap.rs:889-892), and its mock ID3D12Device vtable (console_heap.rs:909-912) only fills vt[1] (AddRef), vt[2] (Release), and vt[19] (CreateUnorderedAccessView), leaving CheckFeatureSupport (vt[13]) null.
    • Running with XCL_BYTE_STORE_CS=1234 causes set_window_views(&dev, &[window]) (count == 4) to enter if bytes_enabled (console_heap.rs:247) and call device.CheckFeatureSupport(...) through the null vtable entry, crashing the child process (panicked at console_heap.rs:894:13). (And even if stubbed to return supported, CALLS would increase from 4 to 132 at line 926.)
    • Suggested fix: Clear .env_remove("XCL_BYTE_STORE_CS") on the spawned Command at console_heap.rs:891 so the test is hermetic when developers test with XCL_BYTE_STORE_CS exported.
  2. Minor defensive note (non-blocking) — shared_heap cap check (crates/xcl/src/hle/d3d12x/console_heap.rs:176-178):

    • If next > cap triggers when reserving the 128 byte-window descriptor slots, shared_heap returns false without setting GLOBAL_FAILED = true (unlike the CreateDescriptorHeap failure path at line 166). On real hardware cap is far larger than 148, so this is purely defensive.
  3. Everything else audited cleanly:

    • crates/xcl/src/gpu/dxil/ops.rs:560: 0x4000 matches shader.rs:342's IsGloballyCoherent bit for heap raw UAVs.
    • crates/xcl/src/gpu/dxil/lower_mem.rs:517-536: st_bytes properly guards win < mems.len() && n == 1, computes BYTE_HEAP_BASE + ((win << 5) | (a >> 27)) with nonuniform = true, masks offset ((1 << 27) - 1) and value (& 255), and preserves st_bytes_raw for wider or out-of-range stores.
    • crates/xcl/src/gpu/recomp/pso.rs:161-185, 304, 613: BYTE_WINDOWS (0x200) is cleanly gated to Stage::Compute, HEAP_WINDOWS | 4, direct DXIL (non-per-lane), and !byte_views_unavailable(), isolated in both ShaderKey (RAM) and translated::file (disk), and stripped before HLSL fallback.

Not Tested

  • Live retail title smoke runs or GPU execution of a compute shader with XCL_BYTE_STORE_CS actively matching a shader hash (no retail game files or captures on this machine).
  • AMD, Wine, or native wave64 hardware.
  • The 47 #[ignore] tests in the workspace suite.

(AI disclosure: diff review, test execution commands, and report formatting were assisted by Antigravity / Gemini 4; all tests were executed locally on the hardware listed above.)

**@⁠retrope13** on GitHub · 2026-11-27 01:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/2926#issuecomment-7207358628) Verified PR #2926 (`a0e4c943`) on Windows 11 (NVIDIA Ada Lovelace + Intel UHD Graphics targeted checks) and reviewed the full diff. The default workspace suite passes cleanly (`1,447 passed, 0 failed`), and the code audit caught one reproducible unit-test crash when `XCL_BYTE_STORE_CS` is exported in the shell environment. ### Environment - **OS:** Windows 11 26H2 (build `26300.9818`) - **CPU / RAM:** Intel Core i5-14500HX (14C/20T), 24 GB RAM - **GPUs:** - NVIDIA GeForce RTX 4060 Laptop GPU (8 GB, Ada Lovelace, wave32, driver `32.0.16.2140`) - Intel(R) UHD Graphics (driver `32.0.101.7092`) - **Toolchain:** `rustc 1.100.0` (`stable-x86_64-pc-windows-msvc`), VS 2022 Build Tools `17.14.45`, Windows SDK `10.0.26100.0` (DXC / DXIL `1.9.2602.17`) ### Test Results (`a0e4c943`) | Command | Adapter / Env | Result | | --- | --- | --- | | `cargo test --locked -p xcl --lib -- typed_byte_store_adds_a_byte_view_and_keeps_the_raw_fallback --nocapture` | NVIDIA (`XCL_ADAPTER=NVIDIA`) | **1 passed, 0 failed** (`0.03s`, validated & disassembled with DXC/DXIL `1.9.2602.17`) | | `cargo test --locked -p xcl --lib -- gpu_direct_unaligned_multi_dword_format_store --nocapture` | NVIDIA (`XCL_ADAPTER=NVIDIA`) | **1 passed, 0 failed, 0 skipped** (`0.39s`) | | `cargo test --locked -p xcl --lib -- gpu_direct_unaligned_multi_dword_format_store --nocapture` | Intel (`XCL_ADAPTER=Intel`) | **1 passed, 0 failed** (`0.10s`; capability-skipped: `no GPU / DXC / wave64`) | | `cargo test --locked -p xcl --test console_heap_contract -- --nocapture` | NVIDIA & Intel | **9 passed, 0 failed** on both (`0.03s` each) | | `cargo build --workspace --locked && cargo test --workspace --locked --no-fail-fast -- --test-threads=4` | NVIDIA (`XCL_ADAPTER=NVIDIA`, default env) | **1,447 passed, 0 failed, 47 ignored** *(29 capability/SDK `SKIPPED` lines: 21 `no wave64`, 3 per-lane f16 form refused, 3 no D3D12 debug layer, 1 cannot disable driver cache, 1 `no heap windows`)* | | `cargo test --locked -p xcl --lib -- window_views_do_not_hold_global_during_device_calls --nocapture` | `XCL_BYTE_STORE_CS=1234` | **FAILED** (reproduced child crash — see below) | ### Code Review Findings 1. **Test crash when `XCL_BYTE_STORE_CS` is set in the shell (`crates/xcl/src/hle/d3d12x/console_heap.rs:886-926`):** - `window_views_do_not_hold_global_during_device_calls` spawns a child test process inheriting the parent environment (`console_heap.rs:889-892`), and its mock `ID3D12Device` vtable (`console_heap.rs:909-912`) only fills `vt[1]` (`AddRef`), `vt[2]` (`Release`), and `vt[19]` (`CreateUnorderedAccessView`), leaving `CheckFeatureSupport` (`vt[13]`) null. - Running with `XCL_BYTE_STORE_CS=1234` causes `set_window_views(&dev, &[window])` (`count == 4`) to enter `if bytes_enabled` (`console_heap.rs:247`) and call `device.CheckFeatureSupport(...)` through the null vtable entry, crashing the child process (`panicked at console_heap.rs:894:13`). (And even if stubbed to return supported, `CALLS` would increase from `4` to `132` at line 926.) - **Suggested fix:** Clear `.env_remove("XCL_BYTE_STORE_CS")` on the spawned `Command` at `console_heap.rs:891` so the test is hermetic when developers test with `XCL_BYTE_STORE_CS` exported. 2. **Minor defensive note (non-blocking) — `shared_heap` cap check (`crates/xcl/src/hle/d3d12x/console_heap.rs:176-178`):** - If `next > cap` triggers when reserving the 128 byte-window descriptor slots, `shared_heap` returns `false` without setting `GLOBAL_FAILED = true` (unlike the `CreateDescriptorHeap` failure path at line 166). On real hardware `cap` is far larger than `148`, so this is purely defensive. 3. **Everything else audited cleanly:** - `crates/xcl/src/gpu/dxil/ops.rs:560`: `0x4000` matches `shader.rs:342`'s `IsGloballyCoherent` bit for heap raw UAVs. - `crates/xcl/src/gpu/dxil/lower_mem.rs:517-536`: `st_bytes` properly guards `win < mems.len() && n == 1`, computes `BYTE_HEAP_BASE + ((win << 5) | (a >> 27))` with `nonuniform = true`, masks `offset` (`(1 << 27) - 1`) and `value` (`& 255`), and preserves `st_bytes_raw` for wider or out-of-range stores. - `crates/xcl/src/gpu/recomp/pso.rs:161-185, 304, 613`: `BYTE_WINDOWS` (`0x200`) is cleanly gated to `Stage::Compute`, `HEAP_WINDOWS | 4`, direct DXIL (non-per-lane), and `!byte_views_unavailable()`, isolated in both `ShaderKey` (RAM) and `translated::file` (disk), and stripped before HLSL fallback. ### Not Tested - Live retail title smoke runs or GPU execution of a compute shader with `XCL_BYTE_STORE_CS` actively matching a shader hash (no retail game files or captures on this machine). - AMD, Wine, or native wave64 hardware. - The 47 `#[ignore]` tests in the workspace suite. *(AI disclosure: diff review, test execution commands, and report formatting were assisted by Antigravity / Gemini 4; all tests were executed locally on the hardware listed above.)*
Author
Owner

@⁠andrewDoing on GitHub · 2026-11-27 02:01 UTC · original

Follow-up to my boundary report: I tested 32 simultaneous lanes writing distinct bytes of only eight shared words, distributed across the 128 MiB descriptor boundary. This covers shared-word writes as well as the earlier one-writer-per-word case.

On a0e4c943d224950518485c70f280e05855f1d55b plus a local test-only fixture, both raw and typed paths matched the CPU reference across all 134,217,856 bytes, including the untouched neighbors. The test passed once with no reported skips. It explicitly selected both paths; automatic path selection, GTA VI execution, and performance remain untested.

AI use: OpenAI Codex with GPT-6.2 Astra wrote and ran the fixture; Codex coordinated and prepared this follow-up.

**@⁠andrewDoing** on GitHub · 2026-11-27 02:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/2926#issuecomment-7207761552) Follow-up to my boundary report: I tested 32 simultaneous lanes writing distinct bytes of only eight shared words, distributed across the 128 MiB descriptor boundary. This covers shared-word writes as well as the earlier one-writer-per-word case. On `a0e4c943d224950518485c70f280e05855f1d55b` plus a local test-only fixture, both raw and typed paths matched the CPU reference across all 134,217,856 bytes, including the untouched neighbors. The test passed once with no reported skips. It explicitly selected both paths; automatic path selection, GTA VI execution, and performance remain untested. AI use: OpenAI Codex with GPT-6.2 Astra wrote and ran the fixture; Codex coordinated and prepared this follow-up.
Author
Owner

@⁠ettehn on GitHub · 2026-11-27 02:13 UTC · original

I checked the automatic hash selection and translated-disk-cache split on a0e4c943 with a local test-only fixture, Windows 11 and SDK DXC/DXIL 1.8.2502.11. Seven fresh child processes called the production console_to_dxil_in entry point for the same synthetic BUFFER_STORE_FORMAT_X program (9bca5a67805f87ea) using one scratch cache. No BYTE_WINDOWS flag was supplied by the test.

  • With four heap windows and direct DXIL, a matching XCL_BYTE_STORE_CS emitted one typed bufferStore.i32. With the switch unset or a different hash, it emitted zero.
  • With three heap windows, setting the matching hash did not change the typed store count. The four-window raw and selected configurations still returned different results on warm revisits. Disk keys encoded 259 (three windows), 260 (four raw windows) and 772 (four with the byte-view flag). All seven outputs validated.

This checks translation and cache routing. I did not dispatch this fixture or launch a retail title. OpenAI Codex (6.2sol) assisted with verification.

**@⁠ettehn** on GitHub · 2026-11-27 02:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/2926#issuecomment-7207942478) I checked the automatic hash selection and translated-disk-cache split on `a0e4c943` with a local test-only fixture, Windows 11 and SDK DXC/DXIL 1.8.2502.11. Seven fresh child processes called the production `console_to_dxil_in` entry point for the same synthetic `BUFFER_STORE_FORMAT_X` program (`9bca5a67805f87ea`) using one scratch cache. No `BYTE_WINDOWS` flag was supplied by the test. - With four heap windows and direct DXIL, a matching `XCL_BYTE_STORE_CS` emitted one typed `bufferStore.i32`. With the switch unset or a different hash, it emitted zero. - With three heap windows, setting the matching hash did not change the typed store count. The four-window raw and selected configurations still returned different results on warm revisits. Disk keys encoded `259` (three windows), `260` (four raw windows) and `772` (four with the byte-view flag). All seven outputs validated. This checks translation and cache routing. I did not dispatch this fixture or launch a retail title. OpenAI Codex (6.2sol) assisted with verification.
Author
Owner

@⁠SzczepanGrela on GitHub · 2026-11-27 03:33 UTC · original

RX 9070 / RADV / Wine functional comparison, including native wave64: main/raw, head/raw and head/typed match the independent CPU reference byte-for-byte in every tested case. This adds AMD execution coverage; no timing or FPS conclusion.

Tested

  • Exact head a0e4c943d224950518485c70f280e05855f1d55b and main 8b957bec6f82495aec940944c6bf47faa02db590, separate source copies with test-only capture/helper access. Production translator and typed-view geometry unchanged; original assertions preserved.
  • RX 9070 16 GB, RADV GFX1201, Mesa 26.3.1-arch3.5; Ryzen 7 7700, CachyOS 7.3.0-5-cachyos. Windows GNU release executables under GE-Proton11-12 / Wine 11.0 Staging, native D3D12 through vkd3d-proton 8293130ebe370b1+ (local asserts-disabled build). Rust 1.97.1, DXC/DXIL 1.9.2602.17. Adapter LUID 00000000:000003ef and R8_UINT buffer/typed-UAV-store support checked.
  • Build each copy: cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --no-run --message-format=json-render-diagnostics.
  • Original executable filters gpu_direct_unaligned_multi_dword_format_store typed_byte_store_adds_a_byte_view_and_keeps_the_raw_fallback --nocapture --test-threads=1, then --test-threads=4: main 1 passed, 0 failed each; head 2 passed, 0 failed each. The full 512-byte original GPU readback was additionally checked, including unchanged neighbors.
  • Owned filter workflow_byte_store_boundary_matrix --nocapture --test-threads=1: main/raw, head/raw and head/typed, three fresh processes per mode. 1 passed, 0 failed in all nine runs; 0 ignored, 0 skipped throughout.

Each matrix run has ten dispatches: five cases in physical wave32 and native wave64. The single backing buffer is 134,217,856 bytes, spanning the first two 128 MiB R8 views. Mode selection is explicit in KernelOptions; the head's typed descriptors come from the production set_byte_window_views helper through a test-only accessor. Four heap windows are configured, but only window 0 is backed/exercised.

  • Active lanes write distinct bytes of shared dwords on both sides of the 128 MiB descriptor boundary, covering all four byte positions. Wave64 has 64 active stores; wave32 has 32.
  • The same addresses with an EXEC mask leave inactive lanes' bytes unchanged.
  • Stores at the backing buffer's tail preserve every other byte.
  • A one-lane unaligned 16-byte FLOAT store across the boundary remains correct with typed mode enabled, exercising the wider-store raw fallback.
  • Addresses in the next empty segment leave the backing unchanged: typed-null and raw resource bounds agree.

Across the matrix: 90 GPU dispatches, including 45 native wave64, and 12,079,607,040 readback bytes. Complete readbacks were saved losslessly compressed, decompressed and independently compared with Python-generated inputs, f32 packing, EXEC masks and untouched bytes. Zero differences. Payloads match across all three modes and repetitions; raw shader containers also remain byte-identical. Saved DXIL verifies the requested wave sizes, one added typed store, and retained atomic fallback.

Inherited XCL_* variables were cleared, XCL_NETWORK=0, RX 9070 selected, XCL_REQUIRE_GPU=wave64; separate enabled caches per process. XCL_BYTE_STORE_CS was unset.

Not tested

Automatic hash/launch selection, the shared-heap allocation/setup path, windows 1 through 3, globally coherent console-compute dispatch, native Windows, other GPUs, full suite, retail workload, scripts/smoke.ps1, or performance. This is explicit kernel-ABI path/descriptor testing, not full runtime integration.

AI use

OpenAI Codex (GPT-6; exact serving variant not exposed) wrote the owned test-only fixture, ran the comparisons, independently verified all captured bytes/IR/source provenance and drafted this report. Publication authorized by the account owner.

**@⁠SzczepanGrela** on GitHub · 2026-11-27 03:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/2926#issuecomment-7209089749) RX 9070 / RADV / Wine functional comparison, including native wave64: main/raw, head/raw and head/typed match the independent CPU reference byte-for-byte in every tested case. This adds AMD execution coverage; no timing or FPS conclusion. **Tested** - Exact head `a0e4c943d224950518485c70f280e05855f1d55b` and main `8b957bec6f82495aec940944c6bf47faa02db590`, separate source copies with test-only capture/helper access. Production translator and typed-view geometry unchanged; original assertions preserved. - RX 9070 16 GB, RADV GFX1201, Mesa `26.3.1-arch3.5`; Ryzen 7 7700, CachyOS `7.3.0-5-cachyos`. Windows GNU release executables under GE-Proton11-12 / Wine 11.0 Staging, native D3D12 through vkd3d-proton `8293130ebe370b1+` (local asserts-disabled build). Rust `1.97.1`, DXC/DXIL `1.9.2602.17`. Adapter LUID `00000000:000003ef` and R8_UINT buffer/typed-UAV-store support checked. - Build each copy: `cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --no-run --message-format=json-render-diagnostics`. - Original executable filters `gpu_direct_unaligned_multi_dword_format_store typed_byte_store_adds_a_byte_view_and_keeps_the_raw_fallback --nocapture --test-threads=1`, then `--test-threads=4`: main **1 passed, 0 failed** each; head **2 passed, 0 failed** each. The full 512-byte original GPU readback was additionally checked, including unchanged neighbors. - Owned filter `workflow_byte_store_boundary_matrix --nocapture --test-threads=1`: main/raw, head/raw and head/typed, three fresh processes per mode. **1 passed, 0 failed** in all nine runs; **0 ignored, 0 skipped** throughout. Each matrix run has ten dispatches: five cases in physical wave32 and native wave64. The single backing buffer is **134,217,856 bytes**, spanning the first two 128 MiB R8 views. Mode selection is explicit in KernelOptions; the head's typed descriptors come from the production `set_byte_window_views` helper through a test-only accessor. Four heap windows are configured, but only window 0 is backed/exercised. - Active lanes write distinct bytes of shared dwords on both sides of the 128 MiB descriptor boundary, covering all four byte positions. Wave64 has 64 active stores; wave32 has 32. - The same addresses with an EXEC mask leave inactive lanes' bytes unchanged. - Stores at the backing buffer's tail preserve every other byte. - A one-lane unaligned 16-byte FLOAT store across the boundary remains correct with typed mode enabled, exercising the wider-store raw fallback. - Addresses in the next empty segment leave the backing unchanged: typed-null and raw resource bounds agree. Across the matrix: **90 GPU dispatches**, including **45 native wave64**, and **12,079,607,040 readback bytes**. Complete readbacks were saved losslessly compressed, decompressed and independently compared with Python-generated inputs, f32 packing, EXEC masks and untouched bytes. Zero differences. Payloads match across all three modes and repetitions; raw shader containers also remain byte-identical. Saved DXIL verifies the requested wave sizes, one added typed store, and retained atomic fallback. Inherited `XCL_*` variables were cleared, `XCL_NETWORK=0`, RX 9070 selected, `XCL_REQUIRE_GPU=wave64`; separate enabled caches per process. `XCL_BYTE_STORE_CS` was unset. **Not tested** Automatic hash/launch selection, the shared-heap allocation/setup path, windows 1 through 3, globally coherent console-compute dispatch, native Windows, other GPUs, full suite, retail workload, `scripts/smoke.ps1`, or performance. This is explicit kernel-ABI path/descriptor testing, not full runtime integration. **AI use** OpenAI Codex (GPT-6; exact serving variant not exposed) wrote the owned test-only fixture, ran the comparisons, independently verified all captured bytes/IR/source provenance and drafted this report. Publication authorized by the account owner.
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/2926/head:github-bot/gh-2926'
git switch 'github-bot/gh-2926'

Merge

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