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

Closed
opened 2026-12-02 21:53:59 +00:00 by github-bot · 0 comments
Owner

@⁠lukaslw-lab on GitHub · 2026-12-02 21:53 UTC · original

The back-edge scan that #3709 (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 (#3709).
  • 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 #3709, 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 #3705. AI-assisted.

**@⁠lukaslw-lab** on GitHub · 2026-12-02 21:53 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3892) The back-edge scan that #3709 (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` (#3709). - 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 #3709, 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 #3705. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 21:54:00 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#3894
No description provided.