shader: lower gfx1030 2D comparison gathers #1555
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1562"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-24T14:04:43Z.
Summary
Lower
image_gather4_c,_c_o,_c_lz,_c_lz_o,_c_land_c_l_ofor the existing gfx1030 2D gather profile. The comparison forms require reddmask:0x1, normalized clamp, contiguous addresses and finite depth and reference values in[0, 1]. Implicit LOD requires a single visible mip. Fixed LOD zero and known integral explicit LOD support a multi-mip view. Each of the four taps comparesreference OP texelusing the native sampler's comparison function. Offset forms accept the existing signed XY encoding.Refs #1513
Verification
Tested clean head
af72b13dff0d5603ff0620f7278096db6ef6c6afon upstream maina3633d4df879a46bd07d941ce8295e23ec3400a1.CTest reported 22 passed, 0 failed and 0 skipped. Both comparison gather tests recorded all six forms. Thirteen translated draws and independent desktop HLSL
GatherCmpReddraws on the selected mip agreed with the CPU reference on both adapters. Reversing the predicate first differed at(0,0), channel 1, with expected1and actual0. Wrong reference, tap order, mip and offset controls also differed as intended. The fixture checks rejections for unsupported sampler and address combinations.Windows 11 build
26300.9974, Intel Arc B390 driver32.0.101.8509, Microsoft WARP10.0.26100.9818. The debug layer was unavailable.All four LLVM 15 container checks and all three Python checks passed. The six new forms assembled, disassembled and lowered through the synthetic archive CLI.
git diff --check origin/main...HEADandgit merge-tree --write-tree origin/main HEADpassed.Imported from R0Y00/Xbox2Windows. Originally posted by Makto94 on 2026-11-24T15:14:32Z.
Hardware check of this PR (head of pr-1562, clean worktree build).
ctest --preset dev --no-tests=error -R '^pixel_aot_(compare_gather|gather|compare)_(warp|hardware)$' -j1No capability skips. The binary LLVM round-trip (
--binary) was not run here (no local gfx1030 LLVM).Code read: moving
check_gather_samplerinto the gather match is safe, sincelower()already refuses a sampler that is not four 32-bit words (and--sampler-wordstakesnargs=4). The comparison path requires red DMASK and adds the reference register to the address width as expected.