shader: name the missing implicit mip level for gather4 #2727
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2735"
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 RonLogic on 2026-11-26T04:33:35Z.
Change
Refs #1802. Plain
image_gather4now reports that it requires the guest implicit mip level. That makes a missing mip-selection proof distinguishable from a generic unsupported opcode. Sending this form through the fixed-mip path could select the first mip of the bound view when the guest would select another mip.The existing synthetic instruction test requires the new reason. The surrounding fixed-mip, explicit-LOD and comparison gather cases still exercise GPU readback.
Verification
Windows
26300.10075, MSVC x64 Release, SDK DXC1.9.2602.17, commit0998b82ebased on1226f02e.14/14 passed, zero skips. The ten GPU runs covered in-box WARP (
10.0.26100.10068) and RTX 4070 (32.0.16.2124).startup_gfx2hlsl_join_symbols_check.py,startup_tools_lint_check.py,docs_links_check.py,bidi_controls_check.pyandgit diff --checkpassed. Removing the new handler in memory makes the existing encoded gather fixture fail on the old generic message.git merge-tree --write-treefound no conflicts against343dc04f.I used Codex to prepare the change and ran the verification locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:42:06Z.
Review: COMMENTED
Review of head
0998b82e(comment only).Scope:
op_image_gather4now raisesUnsupported('image_gather4 requires the guest implicit mip level')instead of the generic unsupported-opcode message. No new lowering, so the plain gather still cannot reach the fixed-mip path. The doc note matches the code. The sibling gathers (_lz,_l,_c*,_b,_o) are untouched and keep their own refusal tests.Commands run (worktree on this head):
git diff --check origin/main...HEAD-> cleanpython3 tests/docs_links_check.py-> ok (524 links)python3 tests/bidi_controls_check.py-> okpython3 tests/startup_image_gather_lz_check.py-> passesop_image_gather4-> the same test fails withAssertionError: image_gather4(the new reason string is guarded).No blocking findings. No GPU lowering changes here, so no readback test is needed for this slice.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T04:44:52Z.
Review: APPROVED
The handler only names the missing guest implicit mip proof. I verified that the merge update leaves the translator and test unchanged. The encoded refusal and the fixed-mip GPU checks passed locally on WARP and RTX 4060 Laptop, including a wrong-mip difference at the first pixel. #1802 remains open for mip selection itself.