Direct DXIL: reject image_gather4h/8h instead of translating as 2x2 Gather #2050

Merged
Decodere merged 1 commit from upstream-pr/2060 into main 2026-11-29 22:55:02 +00:00
Decodere commented 2026-11-25 02:22:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T02:22:45Z.


Brings direct DXIL Lw::mimg (crates/xcl/src/gpu/dxil/lower_image.rs) into parity with merged PR #437 (recomp/emit.rs) by rejecting IMAGE_GATHER4H, IMAGE_GATHER4H_PCK, and IMAGE_GATHER8H_PCK with image_gather4h instead of silently miscompiling them as 2x2 dx.op.textureGather or falling through to non-sampling MIMG. Part of #1269.

image_gather4h, image_gather4h_pck, and image_gather8h_pck fetch a horizontal row of texels rather than a 2x2 Gather footprint. Previously, Lw::mimg matched base.starts_with("gather4"), causing IMAGE_GATHER4H and IMAGE_GATHER4H_PCK to emit 2x2 dx.op.textureGather calls (while IMAGE_GATHER8H_PCK fell through to non-sampling MIMG).

What is in it

  • crates/xcl/src/gpu/dxil/lower_image.rs:
    • Reject base.starts_with("gather4h") || base.starts_with("gather8h") at the top of Lw::mimg with err(d, "image_gather4h"), matching recomp/emit.rs (#437).
    • Add direct_image_gather4h_and_8h_are_rejected verifying all three instructions are rejected with image_gather4h across wave32 compute, wave64 compute, and pixel shaders, while standard IMAGE_GATHER4 still translates and passes DXIL validation.

Tested

  • Hardware / toolchain: NVIDIA GeForce RTX 4060 (8 GB, 32-lane waves, driver 621.14), Intel Core i5-11400F, 32 GB RAM, Windows 11 Home build 26200, Rust 1.100.0 (0ef1bc386), DXC 1.9.2609.5 (01b62ad4), release build.
  • Pre-fix reproduction: confirmed direct_image_gather4h_and_8h_are_rejected fails before the fix (IMAGE_GATHER4H wave64=false must be rejected: silently translated to DXBC).
  • Targeted post-fix runs (0 failures, 0 skipped):
    • cargo test --release -p xcl --lib gpu::dxil::lower_image::heap_bounds_tests -- --nocapture: 3 passed, 0 failed, 0 ignored.
    • cargo test --release -p xcl --lib image_gather4h_is_unsupported -- --nocapture: 1 passed, 0 failed, 0 ignored.
  • cargo build --release --workspace + cargo test --release --workspace -- --test-threads=4: 1147 passed, 0 failed, 46 ignored across 20 test binaries.
  • SKIPPED GPU/runtime tests on this adapter (25 lines):
    • 20 no wave64 subcases across gpu::recomp::lower::tests (4), gpu::recomp::lower_dxil::tests (14), and gpu::recomp::tests (2)
    • 3 intentional per-lane #1426 refusals (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32) in gpu::recomp::lower_dxil::tests
    • shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required)
    • heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows

Regression run
scripts/smoke.ps1 on main (5ce558f82a48c51d527f6035234dacbd29db3f05) and on this PR's head commit (1933324629a73931a2a52dbf4fff5bf3472a1412):

xcl-smoke v1
commit: 5ce558f82a48c51d527f6035234dacbd29db3f05
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14517 MB
xcl-smoke v1
commit: 1933324629a73931a2a52dbf4fff5bf3472a1412
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1590 (PresentX 1590)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14518 MB

Not tested

  • Emulating image_gather4h / image_gather8h horizontal row fetches (this PR rejects them in direct DXIL for parity with HLSL #437).
  • AMD/Intel GPUs, native wave64 hardware, and debug-profile full workspace test run (the full suite ran in --release).

AI use

  • Google Antigravity (Gemini 4 Neon) — audited Lw::mimg against HLSL #437, implemented the rejection check, unit test, and PR description; all tests and paired 60s smoke runs were executed and verified locally on RTX 4060 hardware.
<!-- greyfinch-sync:ivall/xcl:issue:5483921353 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2060). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T02:22:45Z. --- Brings direct DXIL `Lw::mimg` (`crates/xcl/src/gpu/dxil/lower_image.rs`) into parity with merged PR #437 (`recomp/emit.rs`) by rejecting `IMAGE_GATHER4H`, `IMAGE_GATHER4H_PCK`, and `IMAGE_GATHER8H_PCK` with `image_gather4h` instead of silently miscompiling them as 2x2 `dx.op.textureGather` or falling through to non-sampling MIMG. Part of #1269. `image_gather4h`, `image_gather4h_pck`, and `image_gather8h_pck` fetch a horizontal row of texels rather than a 2x2 `Gather` footprint. Previously, `Lw::mimg` matched `base.starts_with("gather4")`, causing `IMAGE_GATHER4H` and `IMAGE_GATHER4H_PCK` to emit 2x2 `dx.op.textureGather` calls (while `IMAGE_GATHER8H_PCK` fell through to non-sampling MIMG). **What is in it** - `crates/xcl/src/gpu/dxil/lower_image.rs`: - Reject `base.starts_with("gather4h") || base.starts_with("gather8h")` at the top of `Lw::mimg` with `err(d, "image_gather4h")`, matching `recomp/emit.rs` (#437). - Add `direct_image_gather4h_and_8h_are_rejected` verifying all three instructions are rejected with `image_gather4h` across wave32 compute, wave64 compute, and pixel shaders, while standard `IMAGE_GATHER4` still translates and passes DXIL validation. **Tested** - Hardware / toolchain: NVIDIA GeForce RTX 4060 (8 GB, 32-lane waves, driver 621.14), Intel Core i5-11400F, 32 GB RAM, Windows 11 Home build 26200, Rust 1.100.0 (`0ef1bc386`), DXC 1.9.2609.5 (`01b62ad4`), release build. - Pre-fix reproduction: confirmed `direct_image_gather4h_and_8h_are_rejected` fails before the fix (`IMAGE_GATHER4H wave64=false must be rejected`: silently translated to DXBC). - Targeted post-fix runs (0 failures, 0 skipped): - `cargo test --release -p xcl --lib gpu::dxil::lower_image::heap_bounds_tests -- --nocapture`: 3 passed, 0 failed, 0 ignored. - `cargo test --release -p xcl --lib image_gather4h_is_unsupported -- --nocapture`: 1 passed, 0 failed, 0 ignored. - `cargo build --release --workspace` + `cargo test --release --workspace -- --test-threads=4`: 1147 passed, 0 failed, 46 ignored across 20 test binaries. - `SKIPPED` GPU/runtime tests on this adapter (25 lines): - 20 `no wave64` subcases across `gpu::recomp::lower::tests` (4), `gpu::recomp::lower_dxil::tests` (14), and `gpu::recomp::tests` (2) - 3 intentional per-lane `#1426` refusals (`V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`) in `gpu::recomp::lower_dxil::tests` - `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required)` - `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows` **Regression run** `scripts/smoke.ps1` on `main` (`5ce558f82a48c51d527f6035234dacbd29db3f05`) and on this PR's head commit (`1933324629a73931a2a52dbf4fff5bf3472a1412`): ``` xcl-smoke v1 commit: 5ce558f82a48c51d527f6035234dacbd29db3f05 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14517 MB ``` ``` xcl-smoke v1 commit: 1933324629a73931a2a52dbf4fff5bf3472a1412 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1590 (PresentX 1590) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14518 MB ``` **Not tested** - Emulating `image_gather4h` / `image_gather8h` horizontal row fetches (this PR rejects them in direct DXIL for parity with HLSL `#437`). - AMD/Intel GPUs, native wave64 hardware, and debug-profile full workspace test run (the full suite ran in `--release`). **AI use** - Google Antigravity (Gemini 4 Neon) — audited `Lw::mimg` against HLSL `#437`, implemented the rejection check, unit test, and PR description; all tests and paired 60s smoke runs were executed and verified locally on RTX 4060 hardware.
JJAutoCompare commented 2026-11-25 03:05:49 +00:00 (Migrated from github.com)

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


PR #2060 ordinary compatibility verification

Verified the open head 1933324629a73931a2a52dbf4fff5bf3472a1412 before and after testing. The assigned detached checkout was clean. GitHub showed zero conversation comments, submitted reviews, and inline review threads. PR #2060

Tested

Windows 11 Enterprise Evaluation 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 with driver 32.0.101.9175, Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), DXC and DXIL 1.9.2609.5. These tests execute on the CPU.

The unoptimized Cargo test profile used two build jobs, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, and CARGO_PROFILE_TEST_DEBUG=0. The run set CARGO_TARGET_DIR=L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target, TEMP=TMP=L:/XclTooling/pr2060, XCL_ADAPTER=A770, and XCL_DXC_DIR=%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64 for the test process.

cargo test -j 2 -p xcl --lib --no-run
cargo test -j 2 -p xcl --lib gpu::dxil::lower_image::heap_bounds_tests::direct_image_gather4h_and_8h_are_rejected -- --exact --nocapture
cargo test -j 2 -p xcl --lib gpu::recomp::tests::image_gather4h_is_unsupported -- --exact --nocapture
  • Prebuild completed in 57.847 s wall time with exit code 0.
  • Direct DXIL passed in 4.043 s wall time (0.02 s in the test harness). All nine rejection assertions passed for IMAGE_GATHER4H, IMAGE_GATHER4H_PCK, and IMAGE_GATHER8H_PCK across wave32 compute, wave64 compute, and pixel translation. Each error contained image_gather4h. The standard IMAGE_GATHER4 control translated and passed the DXC validator. The log confirmed DXC and DXIL 1.9.2609.5 and recorded zero validation skips.
  • HLSL passed in 0.177 s wall time (0.00 s in the test harness). Translation was incomplete for all three horizontal instructions and included the expected <lowercase opcode>: image_gather4h diagnostic keys.
  • Total: 2 passed, 0 failed, 0 ignored, 0 skipped. Each exact command selected one test and filtered out 1,119. Raw logs are prebuild.log, direct.log, and hlsl.log alongside this report.

Not tested

GPU execution, retail title smoke testing, the full workspace suite, and the pre-fix revision.

AI use

T3 Code / Codex (gpt-6.2-sol) verified the PR head, ran the two CPU tests, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7151101612 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2060#issuecomment-7151101612). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T02:43:35Z. --- # PR #2060 ordinary compatibility verification Verified the open head `1933324629a73931a2a52dbf4fff5bf3472a1412` before and after testing. The assigned detached checkout was clean. GitHub showed zero conversation comments, submitted reviews, and inline review threads. [PR #2060](https://github.com/xcl-dev/xcl/pull/2060) **Tested** Windows 11 Enterprise Evaluation 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 with driver 32.0.101.9175, Rust 1.100.0 (`0ef1bc386`, `x86_64-pc-windows-msvc`), DXC and DXIL 1.9.2609.5. These tests execute on the CPU. The unoptimized Cargo test profile used two build jobs, `CARGO_INCREMENTAL=0`, `CARGO_PROFILE_DEV_DEBUG=0`, and `CARGO_PROFILE_TEST_DEBUG=0`. The run set `CARGO_TARGET_DIR=L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target`, `TEMP=TMP=L:/XclTooling/pr2060`, `XCL_ADAPTER=A770`, and `XCL_DXC_DIR=%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64` for the test process. ```text cargo test -j 2 -p xcl --lib --no-run cargo test -j 2 -p xcl --lib gpu::dxil::lower_image::heap_bounds_tests::direct_image_gather4h_and_8h_are_rejected -- --exact --nocapture cargo test -j 2 -p xcl --lib gpu::recomp::tests::image_gather4h_is_unsupported -- --exact --nocapture ``` - Prebuild completed in 57.847 s wall time with exit code 0. - Direct DXIL passed in 4.043 s wall time (0.02 s in the test harness). All nine rejection assertions passed for `IMAGE_GATHER4H`, `IMAGE_GATHER4H_PCK`, and `IMAGE_GATHER8H_PCK` across wave32 compute, wave64 compute, and pixel translation. Each error contained `image_gather4h`. The standard `IMAGE_GATHER4` control translated and passed the DXC validator. The log confirmed DXC and DXIL 1.9.2609.5 and recorded zero validation skips. - HLSL passed in 0.177 s wall time (0.00 s in the test harness). Translation was incomplete for all three horizontal instructions and included the expected `<lowercase opcode>: image_gather4h` diagnostic keys. - Total: 2 passed, 0 failed, 0 ignored, 0 skipped. Each exact command selected one test and filtered out 1,119. Raw logs are `prebuild.log`, `direct.log`, and `hlsl.log` alongside this report. **Not tested** GPU execution, retail title smoke testing, the full workspace suite, and the pre-fix revision. **AI use** T3 Code / Codex (gpt-6.2-sol) verified the PR head, ran the two CPU tests, and wrote this report.
DavidM1911 commented 2026-11-25 05:08:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T04:55:10Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7153282508 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2060#issuecomment-7153282508). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T04:55:10Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
oni-swr commented 2026-11-25 15:08:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-25T14:49:25Z.


amd-win test report for head 1933324629a73931a2a52dbf4fff5bf3472a1412

Setup

  • AMD Radeon RX 7800 XT (driver 32.0.31035.1003), Ryzen 7 5700X3D, Windows 11 (build 26200), rustc 1.100.0, debug build for tests, release for smoke
  • Tested as a local merge of the PR head onto main 06c9f5505f63f10c5ec49ef932d75b2c28177324 (merge commit db1626790d66bce3423abe19951332eea4beaecc; it merged without conflicts). That is not the PR head itself, so the smoke block below names the merge commit.

Tests

  • cargo build --workspace then cargo test --workspace --no-fail-fast -- --test-threads=4: 1265 passed, 1 failed, 46 ignored, 7 SKIPPED lines (f16/f32 per-lane form, no heap windows)
  • The 1 failure is gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722: res[30] GPU 0x1 vs CPU 0x7fffffff). It fails the same way on main (1264 passed, 1 failed, 46 ignored), so it is not caused by this PR.
  • The PR's new test gpu::dxil::lower_image::heap_bounds_tests::direct_image_gather4h_and_8h_are_rejected passes.

Regression run (60 s, same title, networking off; main first, then the merge)

xcl-smoke v1  main 06c9f5505f63f10c5ec49ef932d75b2c28177324
frames shown: 1540, presents per 2 s (last 3): 60 60 60, device removals: 0, crashes: 0, peak commit: 16495 MB
xcl-smoke v1  merge db1626790d66bce3423abe19951332eea4beaecc
frames shown: 1492, presents per 2 s (last 3): 60 60 60, device removals: 0, crashes: 0, peak commit: 16313 MB

Exit code 0x0 on both. The full xcl-smoke blocks are not pasted because of the merge-commit caveat above.

Not tested

  • The title was not checked to reach image_gather4h/8h, so the smoke run only shows no regression on the code paths it does reach.
  • NVIDIA, wave32-only GPUs.

AI use: this run and report were done by Claude Code (Claude Sonnet 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7165870436 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2060#issuecomment-7165870436). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-25T14:49:25Z. --- **amd-win test report** for head `1933324629a73931a2a52dbf4fff5bf3472a1412` **Setup** - AMD Radeon RX 7800 XT (driver 32.0.31035.1003), Ryzen 7 5700X3D, Windows 11 (build 26200), rustc 1.100.0, debug build for tests, release for smoke - Tested as a local merge of the PR head onto `main` `06c9f5505f63f10c5ec49ef932d75b2c28177324` (merge commit `db1626790d66bce3423abe19951332eea4beaecc`; it merged without conflicts). That is not the PR head itself, so the smoke block below names the merge commit. **Tests** - `cargo build --workspace` then `cargo test --workspace --no-fail-fast -- --test-threads=4`: **1265 passed, 1 failed, 46 ignored**, 7 `SKIPPED` lines (f16/f32 per-lane form, no heap windows) - The 1 failure is `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (seed 722: `res[30]` GPU 0x1 vs CPU 0x7fffffff). It fails the same way on `main` (1264 passed, 1 failed, 46 ignored), so it is not caused by this PR. - The PR's new test `gpu::dxil::lower_image::heap_bounds_tests::direct_image_gather4h_and_8h_are_rejected` passes. **Regression run** (60 s, same title, networking off; `main` first, then the merge) ``` xcl-smoke v1 main 06c9f5505f63f10c5ec49ef932d75b2c28177324 frames shown: 1540, presents per 2 s (last 3): 60 60 60, device removals: 0, crashes: 0, peak commit: 16495 MB xcl-smoke v1 merge db1626790d66bce3423abe19951332eea4beaecc frames shown: 1492, presents per 2 s (last 3): 60 60 60, device removals: 0, crashes: 0, peak commit: 16313 MB ``` Exit code 0x0 on both. The full `xcl-smoke` blocks are not pasted because of the merge-commit caveat above. **Not tested** - The title was not checked to reach `image_gather4h/8h`, so the smoke run only shows no regression on the code paths it does reach. - NVIDIA, wave32-only GPUs. **AI use:** this run and report were done by Claude Code (Claude Sonnet 5.5).
upipibi commented 2026-11-25 18:04:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-25T17:26:26Z.


NVIDIA test report for 1933324 (head as is, base 5ce558f), for #1607's NVIDIA list. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, after cargo build --workspace:

  • cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2: 1138 passed, 0 failed, 46 ignored. The end-to-end title tests pass.
  • main 0829441 on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests).
  • Skipped hle::xaudio2, because its tests fail or hang on this machine on main too. The PR doesn't touch it.
  • SKIPPED lines: 25: 20 no wave64 on this card, 3 f16/f32 forms the per-lane path refuses, 1 no heap windows, and 1 PSO measurement that needs Developer Mode to turn the driver cache off.

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

<!-- greyfinch-sync:ivall/xcl:comment:7169506148 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2060#issuecomment-7169506148). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-25T17:26:26Z. --- NVIDIA test report for `1933324` (head as is, base `5ce558f`), for #1607's NVIDIA list. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, after `cargo build --workspace`: - `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2`: **1138 passed, 0 failed, 46 ignored**. The end-to-end title tests pass. - `main` `0829441` on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests). - Skipped `hle::xaudio2`, because its tests fail or hang on this machine on `main` too. The PR doesn't touch it. - SKIPPED lines: 25: 20 `no wave64` on this card, 3 f16/f32 forms the per-lane path refuses, 1 no heap windows, and 1 PSO measurement that needs Developer Mode to turn the driver cache off. AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.
tiagonleal commented 2026-11-27 18:36:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-27T18:36:15Z.


merge-check
base: 6089122a1c
head: 1933324629
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1462 passed, 4 failed, 47 ignored; failing: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0 to _3 (CreateComputePipelineState E_OUTOFMEMORY). They fail the same way on this machine without this PR (five suite runs today on branches based on main f9a0cb80) and pass with #1919 merged, so they are not this PR's. The new direct_image_gather4h_and_8h_are_rejected passes. 25 SKIPPED lines (no wave64, no heap windows, three recompiler forms refused as unsupported).
review: no blocking finding; whole diff read (gpu/dxil/lower_image.rs, +30/-0). One thing whoever merges should know: this is a rejection with no working fallback. The HLSL path already refuses the same instructions (recomp/emit.rs, tested by image_gather4h_is_unsupported), so a shader with image_gather4h, image_gather4h_pck or image_gather8h_pck goes from a direct-DXIL translation that reads the wrong texels (a 2x2 Gather) to unsupported on both paths. That matches the description and the HLSL behaviour; I did not check what a title shows when such a pipeline is missing, or whether any title uses these instructions. The check runs before the gather4 prefix handling, so gather4, gather4_c and the rest are not affected (the test's control case covers plain image_gather4). The control calls validate::validate without the validator_supported() guard other tests use, so it may fail on a host without the DXIL validator; it passes here. build.rs hashes gpu/dxil, so cached translations made with the old behaviour are not reused.
performance: reasoned, not measured. Two prefix checks per image instruction at translation time; no frame time or memory. A shader that uses these instructions no longer builds on the direct path. I did not run a title on the merge result.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42, 32-lane waves), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, rustc 1.100.0, debug. Claude Code with Claude Fable 5.2 ran the merge, build and suite on my machine and wrote this; a Claude Opus 5.5 subagent reviewed the diff and Fable read it in full as well.

<!-- greyfinch-sync:ivall/xcl:comment:7225664883 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2060#issuecomment-7225664883). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-27T18:36:15Z. --- merge-check base: 6089122a1c96dff16e93b6fdf04c8ed20cfb6102 head: 1933324629a73931a2a52dbf4fff5bf3472a1412 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1462 passed, 4 failed, 47 ignored; failing: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0` to `_3` (`CreateComputePipelineState` E_OUTOFMEMORY). They fail the same way on this machine without this PR (five suite runs today on branches based on `main` `f9a0cb80`) and pass with #1919 merged, so they are not this PR's. The new `direct_image_gather4h_and_8h_are_rejected` passes. 25 `SKIPPED` lines (no wave64, no heap windows, three recompiler forms refused as unsupported). review: no blocking finding; whole diff read (`gpu/dxil/lower_image.rs`, +30/-0). One thing whoever merges should know: this is a rejection with no working fallback. The HLSL path already refuses the same instructions (`recomp/emit.rs`, tested by `image_gather4h_is_unsupported`), so a shader with `image_gather4h`, `image_gather4h_pck` or `image_gather8h_pck` goes from a direct-DXIL translation that reads the wrong texels (a 2x2 Gather) to unsupported on both paths. That matches the description and the HLSL behaviour; I did not check what a title shows when such a pipeline is missing, or whether any title uses these instructions. The check runs before the `gather4` prefix handling, so `gather4`, `gather4_c` and the rest are not affected (the test's control case covers plain `image_gather4`). The control calls `validate::validate` without the `validator_supported()` guard other tests use, so it may fail on a host without the DXIL validator; it passes here. `build.rs` hashes `gpu/dxil`, so cached translations made with the old behaviour are not reused. performance: reasoned, not measured. Two prefix checks per image instruction at translation time; no frame time or memory. A shader that uses these instructions no longer builds on the direct path. I did not run a title on the merge result. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42, 32-lane waves), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, rustc 1.100.0, debug. Claude Code with Claude Fable 5.2 ran the merge, build and suite on my machine and wrote this; a Claude Opus 5.5 subagent reviewed the diff and Fable read it in full as well.
throny commented 2026-11-27 20:01:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T20:01:16Z.


merge-check claim
head: 1933324629

<!-- greyfinch-sync:ivall/xcl:comment:7227096047 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2060#issuecomment-7227096047). Originally posted by [throny](https://github.com/throny) on 2026-11-27T20:01:16Z. --- merge-check claim head: 1933324629a73931a2a52dbf4fff5bf3472a1412
throny commented 2026-11-27 20:17:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T20:17:14Z.


merge-check
base: 6089122a
head: 1933324629
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1465 passed, 0 failed, 47 ignored
review: none blocking. The check sits before the gather4 prefix parsing, so the other gather forms are unaffected; it matches the rejection the HLSL path already has. The test fails without the change. Note from the thread: a shader using these instructions goes from wrong texels to unsupported, with no fallback.
performance: it changes a translator source: a one-time re-translate for every tester; no runtime cost (reasoned).
verdict: safe to merge
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:7227356078 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2060#issuecomment-7227356078). Originally posted by [throny](https://github.com/throny) on 2026-11-27T20:17:14Z. --- merge-check base: 6089122a head: 1933324629a73931a2a52dbf4fff5bf3472a1412 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1465 passed, 0 failed, 47 ignored review: none blocking. The check sits before the gather4 prefix parsing, so the other gather forms are unaffected; it matches the rejection the HLSL path already has. The test fails without the change. Note from the thread: a shader using these instructions goes from wrong texels to unsupported, with no fallback. performance: it changes a translator source: a one-time re-translate for every tester; no runtime cost (reasoned). verdict: safe to merge 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).
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!2050
No description provided.