Direct DXIL: sign-extend D16 image_store halves for SINT textures #1910

Merged
emirduran707 merged 1 commit from upstream-pr/1920 into main 2026-11-29 12:17:54 +00:00
emirduran707 commented 2026-11-24 23:10:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T23:10:46Z.


In the Direct DXIL translator, image_store with D16=1 unpacked each 16-bit half with & 0xFFFF and passed it unchanged to the RWTexture<int4> store for SINT formats. A negative half such as -1 (0xFFFF) became 65535, and the R16 SINT store clamped it to 32767. The D16 buffer_store_format_* path in lower_mem.rs already sign-extends SINT halves with sx16; image_store now does the same when the T# format class is SINT. (#1194 makes the same change in the HLSL recompiler, recomp/emit.rs; this is the Direct DXIL path.)

What is in it

  • crates/xcl/src/gpu/dxil/lower_image.rs: in the D16 store arm, select sx16(half) when the format class is SINT (2).
  • crates/xcl/src/gpu/dxil/core_tests.rs: GPU test gpu_direct_image_store_d16_sint_sign_extends: lane 0 stores the halves (-1, -100, 42, -32768) to a 16_16_16_16_SINT texture with D16 and the test checks the texture contents.

Tested

  • AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 on a1e0ee8 (rebased onto main 2aa2d1a): 1136 passed, 2 failed, 46 ignored; 8 SKIPPED (6 in lower_dxil::tests::{f16,f32}_programs_on_the_gpu; heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record)
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3) fail identically on unmodified main 2aa2d1a on this GPU (seeds 722 and 1599).
  • gpu_direct_image_store_d16_sint_sign_extends before the change failed (left: [32767, 32767, 42, 32767], right: [-1, -100, 42, -32768]); passes after

Regression run

main:

xcl-smoke v1
commit: 2aa2d1a54396885bb5bfce8edef4285cf24803c2
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1540 (PresentX 1540)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 20525 MB

this PR:

xcl-smoke v1
commit: a1e0ee891c99b353c1d9ffabcdc8d6fa196e711f
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1537 (PresentX 1537)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 20110 MB

Not tested

  • NVIDIA and Intel GPUs.
  • The smoke title's run is a regression check only.

AI use

  • Antigravity with Gemini 4 Neon and Claude Opus 5.5: found the bug, wrote the fix, GPU test and this description, and ran the test suite and smoke runs above.
  • Claude Code with Claude Opus 5.5: rebased the change onto main 2aa2d1a (a conflict in crates/xcl/src/gpu/dxil/core_tests.rs; both tests kept, this PR's now beside ps_get_lod_with_a_static_sampler) and reran the suite and smoke runs above.
<!-- greyfinch-sync:ivall/xcl:issue:5481891006 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-24T23:10:46Z. --- In the Direct DXIL translator, `image_store` with `D16=1` unpacked each 16-bit half with `& 0xFFFF` and passed it unchanged to the `RWTexture<int4>` store for SINT formats. A negative half such as -1 (`0xFFFF`) became 65535, and the R16 SINT store clamped it to 32767. The D16 `buffer_store_format_*` path in `lower_mem.rs` already sign-extends SINT halves with `sx16`; `image_store` now does the same when the T# format class is SINT. (#1194 makes the same change in the HLSL recompiler, `recomp/emit.rs`; this is the Direct DXIL path.) **What is in it** - `crates/xcl/src/gpu/dxil/lower_image.rs`: in the D16 `store` arm, select `sx16(half)` when the format class is SINT (2). - `crates/xcl/src/gpu/dxil/core_tests.rs`: GPU test `gpu_direct_image_store_d16_sint_sign_extends`: lane 0 stores the halves (-1, -100, 42, -32768) to a 16_16_16_16_SINT texture with D16 and the test checks the texture contents. **Tested** - AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` on a1e0ee8 (rebased onto `main` `2aa2d1a`): 1136 passed, 2 failed, 46 ignored; 8 SKIPPED (6 in `lower_dxil::tests::{f16,f32}_programs_on_the_gpu`; `heap_window_out_of_memory_falls_back_to_the_switch_form`; `pso_measurement_compiles_an_exact_synthetic_record`) - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3`) fail identically on unmodified `main` `2aa2d1a` on this GPU (seeds 722 and 1599). - `gpu_direct_image_store_d16_sint_sign_extends` before the change failed (`left: [32767, 32767, 42, 32767]`, `right: [-1, -100, 42, -32768]`); passes after **Regression run** main: ``` xcl-smoke v1 commit: 2aa2d1a54396885bb5bfce8edef4285cf24803c2 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1540 (PresentX 1540) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 20525 MB ``` this PR: ``` xcl-smoke v1 commit: a1e0ee891c99b353c1d9ffabcdc8d6fa196e711f gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1537 (PresentX 1537) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 20110 MB ``` **Not tested** - NVIDIA and Intel GPUs. - The smoke title's run is a regression check only. **AI use** - Antigravity with Gemini 4 Neon and Claude Opus 5.5: found the bug, wrote the fix, GPU test and this description, and ran the test suite and smoke runs above. - Claude Code with Claude Opus 5.5: rebased the change onto `main` `2aa2d1a` (a conflict in `crates/xcl/src/gpu/dxil/core_tests.rs`; both tests kept, this PR's now beside `ps_get_lod_with_a_static_sampler`) and reran the suite and smoke runs above.
towiice commented 2026-11-24 23:55:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by towiice on 2026-11-24T23:55:06Z.

Review: COMMENTED


Verified on Windows 11 (NVIDIA GeForce GTX 1650 SUPER, 4 GB Turing TU116, wave32, driver 610.88, DXC 1.9.2609.5):

  • \cargo test -p xcl --lib gpu_direct_image_store_d16_sint_sign_extends: 1 passed; 0 failed (0.58s; DXIL translation and \dxil.dll\ validation succeeded, GPU execution skipped with
    o wave64\ on Turing)

Sign-extending \hp\ via \self.sx16(hp)\ when \cls == 2\ (SINT) in \Lw::image_store\ matches the \D16\ \uffer_store_format_*\ handling in \lower_mem.rs.

<!-- greyfinch-sync:ivall/xcl:review:6049364632 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#pullrequestreview-6049364632). Originally posted by [towiice](https://github.com/towiice) on 2026-11-24T23:55:06Z. **Review:** COMMENTED --- Verified on Windows 11 (NVIDIA GeForce GTX 1650 SUPER, 4 GB Turing TU116, wave32, driver 610.88, DXC 1.9.2609.5): - \cargo test -p xcl --lib gpu_direct_image_store_d16_sint_sign_extends\: **1 passed; 0 failed** (0.58s; DXIL translation and \dxil.dll\ validation succeeded, GPU execution skipped with \ o wave64\ on Turing) Sign-extending \hp\ via \self.sx16(hp)\ when \cls == 2\ (SINT) in \Lw::image_store\ matches the \D16\ \uffer_store_format_*\ handling in \lower_mem.rs\.
upipibi commented 2026-11-25 00:08:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-24T23:15:25Z.


NVIDIA counterpart to the Radeon run: RTX 3070 8 GB, driver 616.56, Windows 11, debug, c56f06d on main 689f2db. gpu_direct_image_store_d16_sint_sign_extends and the other tests matching d16: 4 passed, 0 failed, with and without XCL_DIRECT_DXIL=1.

AI-assisted (Claude Code). Synthetic tests only.

<!-- greyfinch-sync:ivall/xcl:comment:7147192980 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#issuecomment-7147192980). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-24T23:15:25Z. --- NVIDIA counterpart to the Radeon run: RTX 3070 8 GB, driver 616.56, Windows 11, debug, `c56f06d` on `main` `689f2db`. `gpu_direct_image_store_d16_sint_sign_extends` and the other tests matching `d16`: 4 passed, 0 failed, with and without `XCL_DIRECT_DXIL=1`. AI-assisted (Claude Code). Synthetic tests only.
towiice commented 2026-11-25 00:37:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by towiice on 2026-11-25T00:37:04Z.

Review: COMMENTED


Verified on Windows 11 (NVIDIA GeForce GTX 1650 SUPER, 4 GB Turing TU116, 32-lane waves, driver 610.88, DXC 1.9.2609.5, Rust 1.100.0 gnullvm, debug):

  • cargo test -p xcl --lib gpu_direct_image_store_d16_sint_sign_extends: 1 passed, 0 failed (0.58 s). No SKIPPED line was printed, so the GPU part ran here as well as the translation and validation.

Not tested: the test on main without the fix (to see it fail), the rest of the suite, AMD/Intel.

AI use: an AI assistant (Antigravity) ran the test and drafted this; the result is from that run.

<!-- greyfinch-sync:ivall/xcl:review:6049733262 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#pullrequestreview-6049733262). Originally posted by [towiice](https://github.com/towiice) on 2026-11-25T00:37:04Z. **Review:** COMMENTED --- Verified on Windows 11 (NVIDIA GeForce GTX 1650 SUPER, 4 GB Turing TU116, 32-lane waves, driver 610.88, DXC 1.9.2609.5, Rust 1.100.0 gnullvm, debug): - `cargo test -p xcl --lib gpu_direct_image_store_d16_sint_sign_extends`: 1 passed, 0 failed (0.58 s). No `SKIPPED` line was printed, so the GPU part ran here as well as the translation and validation. **Not tested:** the test on `main` without the fix (to see it fail), the rest of the suite, AMD/Intel. AI use: an AI assistant (Antigravity) ran the test and drafted this; the result is from that run.
raylitebull commented 2026-11-25 01:11:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:08:01Z.


Both AMD and NVIDIA verification look good on c56f06d. This is currently DIRTY with merge conflicts against main — please rebase onto main and let Build and test (Windows, no GPU) run cleanly so we can merge.

<!-- greyfinch-sync:ivall/xcl:comment:7149238999 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#issuecomment-7149238999). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T01:08:01Z. --- Both AMD and NVIDIA verification look good on `c56f06d`. This is currently `DIRTY` with merge conflicts against `main` — please rebase onto `main` and let `Build and test (Windows, no GPU)` run cleanly so we can merge.
raylitebull commented 2026-11-25 02:08:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:36:10Z.


Build and test (Windows, no GPU) and PR description both passed on 5f0e965, and #1922 just landed on main touching the same spot at the end of crates/xcl/src/gpu/dxil/core_tests.rs. Please rebase onto main to clear the DIRTY conflict so we can merge.

<!-- greyfinch-sync:ivall/xcl:comment:7149737581 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#issuecomment-7149737581). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T01:36:10Z. --- `Build and test (Windows, no GPU)` and `PR description` both passed on `5f0e965`, and `#1922` just landed on `main` touching the same spot at the end of `crates/xcl/src/gpu/dxil/core_tests.rs`. Please rebase onto `main` to clear the `DIRTY` conflict so we can merge.
DavidM1911 commented 2026-11-25 03:05:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T02:26:06Z.


Verification on RTX 3060 Ti (Windows 11): merge conflict with current main (crates/xcl/src/gpu/dxil/core_tests.rs) — needs a rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7150715356 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#issuecomment-7150715356). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T02:26:06Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** (`crates/xcl/src/gpu/dxil/core_tests.rs`) — needs a rebase before it can be tested.
JJAutoCompare commented 2026-11-25 04:10:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T03:11:35Z.


Tested

I ran gpu_direct_image_store_d16_sint_sign_extends on Intel Arc A770 at clean PR head a1e0ee891c99b353c1d9ffabcdc8d6fa196e711f. The test builds the kernel with direct_kernel_full, validates its DXIL, dispatches that same DXIL on D3D12, and reads the signed texture back. The GPU readback assertion matched all four channels of texel (0, 0), RGBA [-1, -100, 42, -32768] in R16G16B16A16_SINT. The other 15 texels read back as zero. This exercises ordinary signed D16 store conversion on the direct DXIL backend. PR #1920

Intel Arc A770 driver 32.0.101.9175, AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation 25H2 build 26200.9974, Rust 1.100.0 (x86_64-pc-windows-msvc), DXC and DXIL 1.9.2609.5. Cargo test profile with debug info and incremental compilation disabled.

$env:RUSTUP_TOOLCHAIN = 'stable-x86_64-pc-windows-msvc'
$env:CARGO_BUILD_JOBS = '2'
$env:CARGO_INCREMENTAL = '0'
$env:CARGO_PROFILE_DEV_DEBUG = '0'
$env:CARGO_PROFILE_TEST_DEBUG = '0'
$env:CARGO_TARGET_DIR = 'L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target'
$env:TEMP = 'L:/XclTooling/pr1920/temp'
$env:TMP = $env:TEMP
$env:XCL_ADAPTER = 'A770'
$env:XCL_DXC_DIR = 'C:/Users/ljensen/AppData/Local/XclTooling/dxc-1.9.2609/bin/x64'
cargo test -p xcl --lib --no-run --locked -j 2 --message-format=json-render-diagnostics
$env:XCL_PR1920_TEST_EXE = 'L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target/debug/build/xcl/97fdf2b9ff8e1482/out/xcl-97fdf2b9ff8e1482.exe'
$env:XCL_REQUIRE_GPU = 'wave64'
$child = @'
& 'L:/XclTooling/Invoke-ArcTest.ps1' -WaitMinutes 30 -Test { & $env:XCL_PR1920_TEST_EXE 'gpu::dxil::core_tests::gpu_direct_image_store_d16_sint_sign_extends' --exact --nocapture --test-threads=1 }
exit $LASTEXITCODE
'@
& "$PSHOME/powershell.exe" -NoProfile -ExecutionPolicy RemoteSigned -Command $child

The prebuild exited 0 outside the Arc lock. The GPU invocation acquired and released the lock and exited 0 in 1.88 s of test execution with 1 passed, 0 failed, 0 ignored, 0 skipped and 1,114 filtered out. The exact shader backend and values are verified by the fixture and its passing readback assertions. The PR was still open at the same head after the run. Seven visible comment blocks contained no comparable Arc A770 result.

Not tested

HLSL #1194, normalized texture loads, other signed formats and masks, a pre-fix baseline, the workspace suite, retail smoke, and other GPU vendors.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the test and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7151679956 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#issuecomment-7151679956). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T03:11:35Z. --- ## Tested I ran `gpu_direct_image_store_d16_sint_sign_extends` on Intel Arc A770 at clean PR head `a1e0ee891c99b353c1d9ffabcdc8d6fa196e711f`. The test builds the kernel with `direct_kernel_full`, validates its DXIL, dispatches that same DXIL on D3D12, and reads the signed texture back. The GPU readback assertion matched all four channels of texel (0, 0), RGBA `[-1, -100, 42, -32768]` in `R16G16B16A16_SINT`. The other 15 texels read back as zero. This exercises ordinary signed D16 store conversion on the direct DXIL backend. [PR #1920](https://github.com/xcl-dev/xcl/pull/1920) Intel Arc A770 driver `32.0.101.9175`, AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation 25H2 build `26200.9974`, Rust `1.100.0` (`x86_64-pc-windows-msvc`), DXC and DXIL `1.9.2609.5`. Cargo test profile with debug info and incremental compilation disabled. ```powershell $env:RUSTUP_TOOLCHAIN = 'stable-x86_64-pc-windows-msvc' $env:CARGO_BUILD_JOBS = '2' $env:CARGO_INCREMENTAL = '0' $env:CARGO_PROFILE_DEV_DEBUG = '0' $env:CARGO_PROFILE_TEST_DEBUG = '0' $env:CARGO_TARGET_DIR = 'L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target' $env:TEMP = 'L:/XclTooling/pr1920/temp' $env:TMP = $env:TEMP $env:XCL_ADAPTER = 'A770' $env:XCL_DXC_DIR = 'C:/Users/ljensen/AppData/Local/XclTooling/dxc-1.9.2609/bin/x64' cargo test -p xcl --lib --no-run --locked -j 2 --message-format=json-render-diagnostics $env:XCL_PR1920_TEST_EXE = 'L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target/debug/build/xcl/97fdf2b9ff8e1482/out/xcl-97fdf2b9ff8e1482.exe' $env:XCL_REQUIRE_GPU = 'wave64' $child = @' & 'L:/XclTooling/Invoke-ArcTest.ps1' -WaitMinutes 30 -Test { & $env:XCL_PR1920_TEST_EXE 'gpu::dxil::core_tests::gpu_direct_image_store_d16_sint_sign_extends' --exact --nocapture --test-threads=1 } exit $LASTEXITCODE '@ & "$PSHOME/powershell.exe" -NoProfile -ExecutionPolicy RemoteSigned -Command $child ``` The prebuild exited 0 outside the Arc lock. The GPU invocation acquired and released the lock and exited 0 in **1.88 s of test execution** with **1 passed, 0 failed, 0 ignored, 0 skipped** and 1,114 filtered out. The exact shader backend and values are verified by the fixture and its passing readback assertions. The PR was still open at the same head after the run. Seven visible comment blocks contained no comparable Arc A770 result. ## Not tested HLSL #1194, normalized texture loads, other signed formats and masks, a pre-fix baseline, the workspace suite, retail smoke, and other GPU vendors. ## AI use T3 Code / Codex (`gpt-6.2-sol`) ran the test and wrote this report.
DavidM1911 commented 2026-11-26 01:05:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T00:42:44Z.


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

<!-- greyfinch-sync:ivall/xcl:comment:7179038175 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#issuecomment-7179038175). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T00:42:44Z. --- 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
futurepro62 commented 2026-11-26 17:22:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-26T17:22:44Z.


NVIDIA and AMD full-suite run, to go with the reports above by JJAutoCompare, since none of them names a GPU. Tested exact head a1e0ee89 (on its base 2aa2d1a).

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: 1126 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, 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: gpu_direct_image_store_d16_sint_sign_extends.
  • 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: 1137 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 8b957bec 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.
<!-- greyfinch-sync:ivall/xcl:comment:7198913609 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#issuecomment-7198913609). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-26T17:22:44Z. --- NVIDIA and AMD full-suite run, to go with the reports above by JJAutoCompare, since none of them names a GPU. Tested exact head `a1e0ee89` (on its base `2aa2d1a`). **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`: **1126 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`, `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: `gpu_direct_image_store_d16_sint_sign_extends`. - 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`: **1137 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 `8b957bec` 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://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) 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.
throny commented 2026-11-28 21:07:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T21:07:43Z.


merge-check claim
head: a1e0ee891c

<!-- greyfinch-sync:ivall/xcl:comment:7245791796 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#issuecomment-7245791796). Originally posted by [throny](https://github.com/throny) on 2026-11-28T21:07:43Z. --- merge-check claim head: a1e0ee891c99b353c1d9ffabcdc8d6fa196e711f
throny commented 2026-11-28 21:36:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T21:36:57Z.


merge-check
base: beeb81be
head: a1e0ee891c
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2595 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at beeb81be (main after the merge of nvidia-dev): 2594 passed, 0 failed, 49 ignored. The PR's GPU test needs native wave64 and is among the SKIPPED lines on this card (32-lane NVIDIA), so its assertion did not run here.
review: no blocking finding; all hunks read. The class it tests is the signed-integer one in the store loop, and the sign-extension helper it calls is public in its module. Nothing open in the thread.
performance: none. It changes a direct-DXIL source only: users of XCL_DIRECT_DXIL (and the large compute programs routed there by default) re-translate once; the HLSL path is untouched.
verdict: safe to merge (code and merge result; the new GPU assertion itself still needs an AMD run if the thread has none on this head)
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7246146884 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#issuecomment-7246146884). Originally posted by [throny](https://github.com/throny) on 2026-11-28T21:36:57Z. --- merge-check base: beeb81be head: a1e0ee891c99b353c1d9ffabcdc8d6fa196e711f merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2595 passed, 0 failed, 49 ignored (27 SKIPPED lines). Base alone at beeb81be (main after the merge of nvidia-dev): 2594 passed, 0 failed, 49 ignored. The PR's GPU test needs native wave64 and is among the SKIPPED lines on this card (32-lane NVIDIA), so its assertion did not run here. review: no blocking finding; all hunks read. The class it tests is the signed-integer one in the store loop, and the sign-extension helper it calls is public in its module. Nothing open in the thread. performance: none. It changes a direct-DXIL source only: users of XCL_DIRECT_DXIL (and the large compute programs routed there by default) re-translate once; the HLSL path is untouched. verdict: safe to merge (code and merge result; the new GPU assertion itself still needs an AMD run if the thread has none on this head) hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
iggyvilla commented 2026-11-29 06:16:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by iggyvilla on 2026-11-29T06:16:42Z.


merge-check
base: fa204595a4
head: a1e0ee891c
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2606 passed, 3 failed, 49 ignored; failing: the same three as on the base: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, test_title_runs_and_game_folder_is_untouched (e2e), two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (re-run on the base, same signatures). The 4th FAILED result line is the two-pass child's own summary.
review: narrow, correct fix: in the D16 image_store arm only the float class rebuilt the half via f16_to_f32; SINT halves fell through as zero-extended u16, so -1 stored as 65535 and clamped to 32767 by the R16 SINT store. Selecting sx16(half) when img_cls == 2 matches the D16 buffer_store path in lower_mem.rs and the HLSL recompiler fix in #1194; UINT (cls 1) still passes the masked half, float (cls 0) still the converted bits, and the per-component guarded stores (U32/I32/F32 keyed on the same cls) are untouched. The new GPU test asserts exact texel contents [-1, -100, 42, -32768] plus neighbouring-texel isolation, and it RAN and passed here (not skipped). Not verified: NVIDIA/Intel GPUs and Wine/vkd3d (author tested AMD only); the load-side arm just above still zero-extends SINT halves (sel(fl, h, lo)) with no cls==2 sign extension, so a symmetric D16 load bug for SINT textures may remain — out of scope but worth a follow-up check.
performance: none by default. Compile-time only: two extra selects (sx16/cmpc/sel) in the D16 store arm of re-translated shaders; users of XCL_DIRECT_DXIL re-translate once. HLSL path untouched.
verdict: safe to merge
hardware / tool and model: AMD Radeon RX 6650 XT, Windows 10.0.26300; Muse Spark 1.3 (via pi) ran the build and tests in a prepared trial-merge worktree and drafted the review/performance lines; Claude Sonnet 5.5 (Claude Code) prepared the merge worktrees, read every hunk of the diff, checked the test counts and that the PR's own tests ran and passed in the logs, edited this text and posted it.

AI use: the two models above did all of this; the account owner did not read the diff or write this text. Claude Sonnet 5.5 read the whole diff; Muse Spark 1.3 only ran the commands and drafted lines. What was not done: no game run, NVIDIA or Intel GPU, or Linux.

<!-- greyfinch-sync:ivall/xcl:comment:7251756760 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#issuecomment-7251756760). Originally posted by [iggyvilla](https://github.com/iggyvilla) on 2026-11-29T06:16:42Z. --- merge-check base: fa204595a488c60c6c5f905244f0172072c9c2a9 head: a1e0ee891c99b353c1d9ffabcdc8d6fa196e711f merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2606 passed, 3 failed, 49 ignored; failing: the same three as on the base: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, test_title_runs_and_game_folder_is_untouched (e2e), two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (re-run on the base, same signatures). The 4th `FAILED` result line is the two-pass child's own summary. review: narrow, correct fix: in the D16 image_store arm only the float class rebuilt the half via f16_to_f32; SINT halves fell through as zero-extended u16, so -1 stored as 65535 and clamped to 32767 by the R16 SINT store. Selecting sx16(half) when img_cls == 2 matches the D16 buffer_store path in lower_mem.rs and the HLSL recompiler fix in #1194; UINT (cls 1) still passes the masked half, float (cls 0) still the converted bits, and the per-component guarded stores (U32/I32/F32 keyed on the same cls) are untouched. The new GPU test asserts exact texel contents [-1, -100, 42, -32768] plus neighbouring-texel isolation, and it RAN and passed here (not skipped). Not verified: NVIDIA/Intel GPUs and Wine/vkd3d (author tested AMD only); the load-side arm just above still zero-extends SINT halves (sel(fl, h, lo)) with no cls==2 sign extension, so a symmetric D16 load bug for SINT textures may remain — out of scope but worth a follow-up check. performance: none by default. Compile-time only: two extra selects (sx16/cmpc/sel) in the D16 store arm of re-translated shaders; users of XCL_DIRECT_DXIL re-translate once. HLSL path untouched. verdict: safe to merge hardware / tool and model: AMD Radeon RX 6650 XT, Windows 10.0.26300; Muse Spark 1.3 (via pi) ran the build and tests in a prepared trial-merge worktree and drafted the review/performance lines; Claude Sonnet 5.5 (Claude Code) prepared the merge worktrees, read every hunk of the diff, checked the test counts and that the PR's own tests ran and passed in the logs, edited this text and posted it. AI use: the two models above did all of this; the account owner did not read the diff or write this text. Claude Sonnet 5.5 read the whole diff; Muse Spark 1.3 only ran the commands and drafted lines. What was not done: no game run, NVIDIA or Intel GPU, or Linux.
SlopTart commented 2026-11-29 06:42:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-29T06:42:24Z.


Test report on Wine, both real-GPU vendors, on the now-default direct path.

Test: gpu::dxil::core_tests::gpu_direct_image_store_d16_sint_sign_extends (this PR's new parity test), run solo (--test-threads=2 default env, filter on the test name), 3 repeats per state.

Tested

  • rig1, RX 7900 XT 20 GB (RDNA3), Ryzen 9 9900X, 96 GB, Arch, Mesa 26.2.5 RADV, wine 11.0 (proton build):
    • at this PR's head a1e0ee89 as-is: 3/3 ok, 0.10-0.13 s
    • head merged cleanly onto current main fa204595 (merge 18f456e5): 3/3 ok, 0.10-0.11 s
  • rig2, GTX 1070, i5-10600K, 16 GB, Debian 13, nvidia 550.163.01, wine 10.0 under xvfb:
    • at a1e0ee89 as-is: 3/3 ok, 0.27-0.50 s
    • head merged onto fa204595 (merge 597dc727): 3/3 ok, 0.28-0.30 s

Note the branch base is older (2aa2d1a5 by merge-base), so the merged-onto-fa204595 runs are the ones that reflect how this lands on today's direct-DXIL default; both merged without conflicts and the test stayed green on both GPUs.

Not tested: native Windows, whether the test goes red without the lower_image.rs hunk (assumed by design), other D3D_FEATURE_LEVELs.
AI use: Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7252018235 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1920#issuecomment-7252018235). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-29T06:42:24Z. --- Test report on Wine, both real-GPU vendors, on the now-default direct path. Test: `gpu::dxil::core_tests::gpu_direct_image_store_d16_sint_sign_extends` (this PR's new parity test), run solo (`--test-threads=2` default env, filter on the test name), 3 repeats per state. **Tested** - rig1, RX 7900 XT 20 GB (RDNA3), Ryzen 9 9900X, 96 GB, Arch, Mesa 26.2.5 RADV, wine 11.0 (proton build): - at this PR's head `a1e0ee89` as-is: 3/3 ok, 0.10-0.13 s - head merged cleanly onto current `main` `fa204595` (merge `18f456e5`): 3/3 ok, 0.10-0.11 s - rig2, GTX 1070, i5-10600K, 16 GB, Debian 13, nvidia 550.163.01, wine 10.0 under xvfb: - at `a1e0ee89` as-is: 3/3 ok, 0.27-0.50 s - head merged onto `fa204595` (merge `597dc727`): 3/3 ok, 0.28-0.30 s Note the branch base is older (`2aa2d1a5` by merge-base), so the merged-onto-`fa204595` runs are the ones that reflect how this lands on today's direct-DXIL default; both merged without conflicts and the test stayed green on both GPUs. **Not tested:** native Windows, whether the test goes red without the `lower_image.rs` hunk (assumed by design), other D3D_FEATURE_LEVELs. **AI use:** Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting.
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!1910
No description provided.