shader: probe gfx1030 2D gather instruction bias #1636
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1643"
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-24T15:40:37Z.
Behavior
Add a source-built discriminator for
image_gather4_b,image_gather4_b_o,image_gather4_c_b, andimage_gather4_c_b_o. It builds a biased shader and an explicit-LOD control for each form with positive bias, negative bias and magnification. It emits three distinguishable texture mips, a manifest, and a checker that identifies the mip and first differing tap in raw native readback.The standalone desktop model computes LOD from quad derivatives before adding instruction bias and selecting a mip. It draws through the existing offscreen fixture. This draft adds a probe. Native gfx1030 execution of the biased shader and its control is pending, and no MIMG coverage record is added. The first native discriminator is
image_gather4_b-magnify: the candidate predicts mip 1 and clamping the negative base LOD first predicts mip 2. The documentation specifies the native pipeline bindings and readback format.Verification
Tested commit
92204dfebbbc7ad05f54bccb38bfc37f136e7739.CPU footprint and controls passed for 12 cases. LLVM 15 round-tripped 24 source-built gfx1030 shaders and checked the opcode encodings for all four biased forms.
Both adapters matched 12 desktop cases and their 12 wrong-mip controls across all 64 RGBA pixels. All 12 mutants per adapter then failed against the original reference at the predicted first pixel. For ordinary magnification the first mismatch was pixel
(0,0), tap 0, expected4609(0x45900800) and actual8705(0x46080400). Windows 11 build26300.9974, Intel Arc B390 driver32.0.101.8509, Microsoft WARP driver10.0.26100.9818, D3D12 debug layer unavailable. The gather regressions passed 4/0/0 and recorded the existing 12 gfx1030 gather forms. The docs links, bidi controls and coverage-tool checks passed.Merge simulation passed against upstream
cb94b8caff25ed8d946e040167265263bc1cb8b5and the checked comparison, image-store, atomics and clamp branches.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T05:59:30Z.
Review: COMMENTED
Review of head
92204dfebbbc7ad05f54bccb38bfc37f136e7739(docs/experiments.md, tests/pixel_gather_bias_probe.py).Findings: 0 P1, 0 P2.
Clean-room / ISA check:
_b,_b_o,_c_b,_c_b_oopcodes and address order (offset, bias, reference, U, V) match the RDNA2 ISA text cited in the doc; only public ISA and LLVM round-trip bytes are used.Commands run locally on the exact head:
git diff --check origin/main...HEAD: cleanpython3 tests/docs_links_check.py: pass (16 files, 348 links)python3 tests/bidi_controls_check.py: pass (1266 files)python3 -B tests/pixel_gather_bias_probe.py: pass, 12 biased gather cases and all negative controlslod + case.biaschanged tolod - case.biasincpu_check: AssertionError, killedmax(math.hypot...)changed tomin(...)incpu_check: AssertionError, killedgit checkout -- ..CI:
Build and test on Windowsis SUCCESS. The Python-only fast path applies, because the PR touches only a .py file and a .md file.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-25T05:55:10Z.
Verified head
92204dfeon Windows x64 (devpreset, MSVC19.44.35228.0, SDK/DXC10.0.26100.0, Python 3.12):python -B tests/pixel_gather_bias_probe.py-> passed (CPU footprint and negative controls passed for 12 biased gather cases)python -B tests/pixel_gather_bias_probe.py --dxc <dxc.exe> --draw <offscreen_check.exe> warp-> passed (DXC compiled 12 standalone desktop shaders,warp matched 12 desktop draws and their wrong-mip controls;Microsoft Basic Render Driver, driver10.0.26100.9818,debug_layer=enabled,debug_errors=0 debug_warnings=0)python -B tests/pixel_gather_bias_probe.py --dxc <dxc.exe> --draw <offscreen_check.exe> hardware-> passed (DXC compiled 12 standalone desktop shaders,hardware matched 12 desktop draws and their wrong-mip controls;AMD Radeon RX 7900 XTX,vendor=1002 device=744c, driver32.0.32029.2010,debug_layer=enabled,debug_errors=0 debug_warnings=0)Native gfx1030 HIP execution remains pending on Linux; marking Ready for Review as a verified probe + desktop reference baseline (same scope as #1623).