shader: lower gfx1030 2D comparison gathers #1562
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1562
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1562/head"
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?
@stan495 on GitHub · 2026-11-24 14:04 UTC · original
stan495:codex/gfx1030-mimg-compare-gather-upstream→main· +309 −17 · 7 files · 1 commits · merged 2026-11-24 14:25 UTCSummary
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.@Makto94 on GitHub · 2026-11-24 15:14 UTC · original
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.