Direct DXIL: reject image_gather4h/8h instead of translating as 2x2 Gather #2060
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2060
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2060"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Decodere on GitHub · 2026-11-25 02:22 UTC · original
Decodere:fix-1269-dxil-reject-gather4h→main· +30 −0 · 1 files · 1 commits · openBrings direct DXIL
Lw::mimg(crates/xcl/src/gpu/dxil/lower_image.rs) into parity with merged PR #437 (recomp/emit.rs) by rejectingIMAGE_GATHER4H,IMAGE_GATHER4H_PCK, andIMAGE_GATHER8H_PCKwithimage_gather4hinstead of silently miscompiling them as 2x2dx.op.textureGatheror falling through to non-sampling MIMG. Part of #1269.image_gather4h,image_gather4h_pck, andimage_gather8h_pckfetch a horizontal row of texels rather than a 2x2Gatherfootprint. Previously,Lw::mimgmatchedbase.starts_with("gather4"), causingIMAGE_GATHER4HandIMAGE_GATHER4H_PCKto emit 2x2dx.op.textureGathercalls (whileIMAGE_GATHER8H_PCKfell through to non-sampling MIMG).What is in it
crates/xcl/src/gpu/dxil/lower_image.rs:base.starts_with("gather4h") || base.starts_with("gather8h")at the top ofLw::mimgwitherr(d, "image_gather4h"), matchingrecomp/emit.rs(#437).direct_image_gather4h_and_8h_are_rejectedverifying all three instructions are rejected withimage_gather4hacross wave32 compute, wave64 compute, and pixel shaders, while standardIMAGE_GATHER4still translates and passes DXIL validation.Tested
0ef1bc386), DXC 1.9.2609.5 (01b62ad4), release build.direct_image_gather4h_and_8h_are_rejectedfails before the fix (IMAGE_GATHER4H wave64=false must be rejected: silently translated to DXBC).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.SKIPPEDGPU/runtime tests on this adapter (25 lines):no wave64subcases acrossgpu::recomp::lower::tests(4),gpu::recomp::lower_dxil::tests(14), andgpu::recomp::tests(2)#1426refusals (V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32) ingpu::recomp::lower_dxil::testsshaders::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 windowsRegression run
scripts/smoke.ps1onmain(5ce558f82a48c51d527f6035234dacbd29db3f05) and on this PR's head commit (1933324629a73931a2a52dbf4fff5bf3472a1412):Not tested
image_gather4h/image_gather8hhorizontal row fetches (this PR rejects them in direct DXIL for parity with HLSL#437).--release).AI use
Lw::mimgagainst 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 on GitHub · 2026-11-25 02:43 UTC · original
PR #2060 ordinary compatibility verification
Verified the open head
1933324629a73931a2a52dbf4fff5bf3472a1412before and after testing. The assigned detached checkout was clean. GitHub showed zero conversation comments, submitted reviews, and inline review threads. PR #2060Tested
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, andCARGO_PROFILE_TEST_DEBUG=0. The run setCARGO_TARGET_DIR=L:/XclTooling/pr1844-71f2ceb-t3-737e5ee5/target,TEMP=TMP=L:/XclTooling/pr2060,XCL_ADAPTER=A770, andXCL_DXC_DIR=%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64for the test process.IMAGE_GATHER4H,IMAGE_GATHER4H_PCK, andIMAGE_GATHER8H_PCKacross wave32 compute, wave64 compute, and pixel translation. Each error containedimage_gather4h. The standardIMAGE_GATHER4control translated and passed the DXC validator. The log confirmed DXC and DXIL 1.9.2609.5 and recorded zero validation skips.<lowercase opcode>: image_gather4hdiagnostic keys.prebuild.log,direct.log, andhlsl.logalongside 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 on GitHub · 2026-11-25 04:55 UTC · original
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 on GitHub · 2026-11-25 14:49 UTC · original
amd-win test report for head
1933324629a73931a2a52dbf4fff5bf3472a1412Setup
main06c9f5505f63f10c5ec49ef932d75b2c28177324(merge commitdb1626790d66bce3423abe19951332eea4beaecc; it merged without conflicts). That is not the PR head itself, so the smoke block below names the merge commit.Tests
cargo build --workspacethencargo test --workspace --no-fail-fast -- --test-threads=4: 1265 passed, 1 failed, 46 ignored, 7SKIPPEDlines (f16/f32 per-lane form, no heap windows)gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722:res[30]GPU 0x1 vs CPU 0x7fffffff). It fails the same way onmain(1264 passed, 1 failed, 46 ignored), so it is not caused by this PR.gpu::dxil::lower_image::heap_bounds_tests::direct_image_gather4h_and_8h_are_rejectedpasses.Regression run (60 s, same title, networking off;
mainfirst, then the merge)Exit code 0x0 on both. The full
xcl-smokeblocks are not pasted because of the merge-commit caveat above.Not tested
image_gather4h/8h, so the smoke run only shows no regression on the code paths it does reach.AI use: this run and report were done by Claude Code (Claude Sonnet 5.5).
@upipibi on GitHub · 2026-11-25 17:26 UTC · original
NVIDIA test report for
1933324(head as is, base5ce558f), for #1607's NVIDIA list. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, aftercargo 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.main0829441on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests).hle::xaudio2, because its tests fail or hang on this machine onmaintoo. The PR doesn't touch it.no wave64on 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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.