startup: accept mesh parameter exports and pixel reads up to param31 #2796
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2796
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2796/head"
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?
@tedin7 on GitHub · 2026-11-26 10:08 UTC · original
tedin7:x2w-mesh-param-31→main· +102 −19 · 5 files · 1 commits · closed without mergingPart of #2413
What this unblocks: mesh shaders that export sparse high parameter indices (param18, param28) now reach the pixel pairing instead of stopping at the repository's own cap of 12.
What changed
MAX_PARAMintools/mesh_param_link.pygoes from 12 to 31: the RDNA 2 ISA (section 10.2, EXP targets) encodesparam0..param31as target 32 + N. The mesh export recognizer intools/mesh_entry_aot.pyaccepts the same range (it spelledparam0..12in its pattern).MeshPixelStagetakes its range fromMAX_PARAM.param30is the last index that fits beside the position;param31is a valid index that the budget refuses (needs 33 vectors).Tests
tests/mesh_param_link_check.py(also run by the existingmesh_param_linkCTest entries on WARP and hardware):param0,param18andparam28, with a pixel shader readingattr0,attr18,attr28(words recorded and decoded back to the expected assembly; reassembled bybinary <llvm-mc>).param30(accepted) andparam31(refused by the vector budget).0..31invalidate_linkageandMeshPixelStage, and an export ofparam32is still an unsupported export.What stays open
The mesh stage still refuses other forms before the pixel pairing for the programs that export these indices; this only moves them past the parameter-range wall.
Verification:
python3 -B tests/mesh_param_link_check.pyandpython3 -B tests/mesh_param_link_check.py binary llvm-mc-19: pass.tests/*check.pysweep againstorigin/main: no script changes result.AI-assisted; commands listed were executed locally.
@tedin7 on GitHub · 2026-11-26 10:13 UTC · original
Withdrawn: shader translation is moving to the native C++ frontend (see #870), so we are not continuing this change to the Python translator. The branch stays available if any part is useful later. Thank you to everyone who reviewed and tested it.
Pull request closed