Repository navigation
Conversation
…ack-edge writes any(w for w in ws ...) dropped index 0 (falsy) and the search was seeded with the site's own block, so a write after the site brought round by a loop never counted. Both left a computed I/J pair classified as pristine.
|
Tested d7c0d4b on Windows 11 Pro build 26300, Python 3.14 (CPU only): pass
|
|
Closing in favour of @Vonsek's #3287 (SHADER-616): it was his finding with first refusal, and his PR came first. Sorry for the duplicate. If anything here is useful to #3287, for example the two cases in |
|
Added two GPU fixtures, drawn like ps_ij_computed:
Note for the fixtures: a register that only a v_interp reads (v1 in the zero case, v0/v1 in the loop) is not seeded with the hardware barycentric, it reads 0, so each fixture also does a plain v_mov of it to seed it (explained in the .asm headers). That is a separate gap from this PR. The GPU agrees with the interpreter. AI-assisted. |
Fixes the finding #3232 (comment) (Vonsek).
What broke.
interp_ij_analysis::reaching_writetested predecessor blocks withany(w for w in ws if blk[w] == p), so a write at instruction index 0 (falsy) never counted. It also seeded the search withseen = {b}, so a write later in the site's own block that a loop back-edge brings round was never seen. In both cases a program that overwrites v0/v1 before av_interp_p1/p2pair was treated as pristine instead of computed. Repro: av_mov_b32 v0, ...at index 0, thens_branchto a block holding the interp pair;interp_ij_analysisreturned no per-vertex attributes (expected{0}).Fix. Test membership (
blk[w] == p) instead of truthiness, and start the search with an emptyseenso the site block is reached again through a back-edge.Tests. New
tests/semantic/test_interp_reaching_write.py(hand-built instruction lists, no game data): write at index 0, write at index 1 (control), no write (stays pristine), loop back-edge write after the site. Python 3.12.16, Linux (WSL2): new file 4/4 OK;-p "test_interp*.py"161 tests OK. Negative control: withtools/rdna2spirv.pyreverted, 2 of the 4 fail (index 0 and back-edge).AI-assisted.