OLD-2528: mesh_compute_vs: read output address from %pc_tail when pc_tail_address_dwords is set #765
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/765"
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 ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-24T13:35:05Z.
Restores my open PR from the original repository (OLD-2528), rebased onto current
main(2d73c242f).Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133003627
Summary
index.json'smesh_computelayout carriespc_tail_address_dwords(as emitted byrdna2spirv.py --mesh-compute --pc-tail-ubo),tools/mesh_compute_vs.pyreads the output-buffer address from the set-1 binding-0Uniformblock%pc_tail(%PcTail) instead of a 152-bytePushConstantblock, omittingPushConstantcompletely so the vertex shader fits 128-byte push-constant devices.pc_tail_address_dwords, the emitted SPIR-V assembly is byte-identical to before.tests/test_mesh_compute_vs.pyandtests/test_mesh_compute.py.Verification (rebased on
2d73c242f)py -3.14 -m compileall -q tools/mesh_compute_vs.py tests/test_mesh_compute.py tests/test_mesh_compute_vs.py— cleanLLVM_MC="wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc" py -3.14 -m pytest tests/test_mesh_compute_vs.py tests/test_mesh_compute.py -q -p no:cacheprovider— 44 passed, 13 subtests passedpy -3.14 -I tests/test_text_write_line_endings.py— 3 passedAI-assisted (Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-24T19:34:36Z.
Reviewed cbc75b95: ran
python3 -I tests/test_mesh_compute_vs.py -v(13 passed, 3 skipped—spirv-as/spirv-valunavailable on this host;pytestalso unavailable fortests/test_mesh_compute.py),py_compile,check_no_game_data.py, and a probe comparingorigin/mainvs PR. Output withoutpc_tail_address_dwordsis byte-identical, and the%pc_tail/%PcTail(set 1, binding 0) interface matchesrdna2spirv.py --pc-tail-ubowithPushConstantomitted. Minor nit:_pc_tail_dwordsaccepts duplicate ([4, 4]) or unboundedly large indices ([70000, 70001]emits a 70,002-memberOpTypeStruct). No blocking bugs found. AI-assisted review.Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-24T19:36:49Z.
Thanks for the review and catch, @PierreEbele! Hardened
_pc_tail_dwordsin783ac2a4dto reject duplicate indices (lo == hi) and indices>= PC_TAIL_MAX_DWORDS(64), with unit tests covering[4, 4],[64, 65], and[70000, 70001](test_mesh_compute_vs.py+test_mesh_compute.py: 44 passed, 16 subtests passed withllvm-mcandspirv-as/spirv-val).Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T20:59:38Z.
Rebased cleanly onto current main (
db1a22d29) as4bbeddd5a; no conflicts. The branch is unchanged: mesh_compute_vs reads the output address from%pc_tailand rejects duplicate/out-of-rangepc_tail_address_dwordsindices. AI-assisted with Devin.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T14:27:47Z.
Red/green: classified READY by cloud-1 (red on main
09c153948, green on head merged with main); head4bbeddd5abunchanged since 2026-11-25, before that run.Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
d48a957bbin GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)