test: refuse a gather destination that runs past v255 #1946
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1953"
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 ChazY11 on 2026-11-24T22:05:03Z.
What
op_image_gather4_lzrequires four contiguous destination registers:The fixture in #1927 covers the address-register and
nsacases but not this one, so the guard is unpinned. Two bases thatdecode to a destination running past the file make it observable:
Change
tests/startup_image_gather_lz_check.pyonly:shader()gains adst=4parameter (the base sits in bits 8–15 of the seconddword, which the existing
highmasking already leaves clear), and two refusal cases next to thensaone:No production change, no new file, no CMake change.
Tested
Fail-first, with the guard reduced to
if not dst or dst[0] != 'v':and reverted afterwards:and with the guard restored,
exit 0. The accepted form emitsv256/v257under the mutation, which is what the case prevents.Scope note
This is the second half of the follow-up I posted on #1927 (
pull/1927#issuecomment-7145688618). The first half — thecheck_gather_sampler(words, 1, …)argument — I retracted there:(mips - 1) << 8is vacuous for both1and0becausew1 >> 12is non-negative, so that mutation is equivalent and there is nothing to test.Notes
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T22:09:45Z.
Review: COMMENTED
Review of head
fd9999528c442187519f9396a0da9e92be6ad2f4.The change touches only
tests/startup_image_gather_lz_check.py. It adds adstparameter to theshader()helper and two refusal controls: destination bases0xfeand0xffmust be refused with "four destination registers". The defaultdst=4encodes the same bytes as before (0x00c40400). No CMake change and no new files. Clean-room: no external code.Commands executed locally:
git merge-tree --write-tree --name-only origin/main HEAD: clean, no conflictspython3 -B tests/startup_image_gather_lz_check.py: PASSpython3 tests/docs_links_check.py: PASS (18 files, 386 links)python3 tests/bidi_controls_check.py: PASSgit diff --check origin/main...HEAD: cleanpython3 x2w_pipe.py win2025 1953 --wait 900: Debug and Release /O2,startup_image_gather_lzandstartup_image_gather_lz_warp2/2 passed in eachgh pr checks 1953: Windows, Linux and gfx1013 fixtures passMutation killed: in
tools/startup/gfx2hlsl.pyI removed theor dst[2] > 255bound from the gather destination check. The test now fails withGather accepted an unsupported form: four destination registers. The file was restored withgit checkout -- ..P1: 0. P2: 0.
AI-assisted; commands listed were executed locally.