shader: stop the mesh back-edge scan at an unknown word #3893
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3893"
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 lukaslw-lab on 2026-12-02T21:53:40Z.
Change
The mesh back-edge scan from #3707 decodes the whole code blob and throws at a word without a known opcode, before the forward pass reaches the stage's first refusal. The scan now stops at that word. The forward pass still refuses the word if it reaches it, and any back edge the scan did not record (
unsupported mesh scalar branch destination).Fixes #3892. Part of #3703.
Verification
Commit
38652459eon mainc01afe21f, Windows 10 19045, release and dev.ctest -R '^native_direct_mesh$': passes in both. Withsrc/gfx1013_direct_mesh.inlreverted it fails in dev at the newtrailing-datacase:unknown gfx1013 opcode 0 at byte 76.ctest -R mesh -j 4: 244 tests in each build: 128 passed, 86 skipped, 30 failed.*_hardwarefailures, seen on this host (RTX 3080 Ti, 32.0.16.1047) before this change too.startup_mesh86_translate_hardware(CreatePipelineState failed 0x80070057) andstartup_mesh86_present_warp(request pass exited 77: no mesh shaders on this WARP): both fail the same way in dev without the fix.25f8ebec5(6,685 distinct programs; local capture, counts only), the same scan change before a comment rewording:unknown gfx1013 opcodeEvidence and follow-up
trailing-dataandscalar-loop-trailing-dataintests/native_direct_mesh_check.pyare source-built: zero words afters_endpgm, without and with a scalar loop.docs/experiments/native-mesh-scalar-loop.mdstates the stop rule.Checklist
AI-assisted.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T22:05:47Z.
Review: APPROVED
Reviewed
38652459e. The pre-scan stops at the unknown word. The forward pass still decodes reached instructions and requires a recorded back edge. On Windows MSVC Debug, I builtcompile_dxilfrom the PR head and ranctest --preset dev --no-tests=error -j 1 --output-on-failure -R '^native_direct_mesh$'(1 passed). Restoring only the old scanner locally while keeping the new tests reproducedtrailing-datafailing withunknown gfx1013 opcode 0 at byte 76. The trial merge withmainat606027a1was clean. Windows, Linux Python, and gfx1013 fixture CI are green on this head.