shader: the mesh back-edge scan refuses stages at words the forward pass never reaches #3892

Closed
opened 2026-12-02 21:53:37 +00:00 by lukaslw-lab · 0 comments
lukaslw-lab commented 2026-12-02 21:53:37 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-12-02T21:53:37Z.


The back-edge scan that #3707 (mine) added to lower_mesh decodes the code blob linearly with gfx1013::instruction, which throws on a word without a known opcode. The scan runs before the forward pass, so such a word refuses the stage even when the forward pass stops earlier or never reaches it. The stage's real first refusal is hidden.

Main 25f8ebec5, 6,685 distinct mesh programs from a local capture Programs
Refused with unknown gfx1013 opcode 257
Same, with the scan stopping at that word 0
Translate, without / with 1,890 / 1,890
  • Eight sampled programs show the normal refusal at e143824c8 and unknown gfx1013 opcode 0 at 7c9f26398 (#3707).
  • No program that translated before is lost. The 257 cannot benefit from later fixes while the scan throws. They now show refusals such as v_readfirstlane_b32 and the heap-slot provenance one.
  • First-refusal counts for mesh on main since #3707, including my recent per-PR ones, are affected.

Proposal: end the scan at a word without a known opcode. The forward pass still refuses that word if it reaches it, and refuses any back edge the scan did not record. The PR follows.

Part of #3703. AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6755317821 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3892). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-12-02T21:53:37Z. --- The back-edge scan that #3707 (mine) added to `lower_mesh` decodes the code blob linearly with `gfx1013::instruction`, which throws on a word without a known opcode. The scan runs before the forward pass, so such a word refuses the stage even when the forward pass stops earlier or never reaches it. The stage's real first refusal is hidden. | Main `25f8ebec5`, 6,685 distinct mesh programs from a local capture | Programs | |---|---:| | Refused with `unknown gfx1013 opcode` | 257 | | Same, with the scan stopping at that word | 0 | | Translate, without / with | 1,890 / 1,890 | - Eight sampled programs show the normal refusal at `e143824c8` and `unknown gfx1013 opcode 0` at `7c9f26398` (#3707). - No program that translated before is lost. The 257 cannot benefit from later fixes while the scan throws. They now show refusals such as `v_readfirstlane_b32` and the heap-slot provenance one. - First-refusal counts for mesh on main since #3707, including my recent per-PR ones, are affected. Proposal: end the scan at a word without a known opcode. The forward pass still refuses that word if it reaches it, and refuses any back edge the scan did not record. The PR follows. Part of #3703. AI-assisted.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#3892
No description provided.