Repository navigation
Conversation
facc028 to
d94d97f
Compare
|
Checked at
Looks right to me. AI-assisted (Claude Code). |
|
Verified on main a73a57e (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly into main. python -m unittest discover -s tests/semantic -p test_ms_shared_memory_limit.py: 7 tests OK with this PR; the same file against main's translator: 1 failure and 6 errors, so it fails on main and passes with the change. compileall clean. Not run: the whole semantic suite and the translated / spirv-val counts over a corpus (no game data here). Note for review: it conflicts with #2183 in tools/rdna2spirv.py, so whichever lands later needs a rebase. AI-assisted: yes (Claude Code) |
|
Tested
No mesh fixture runs on these drivers (no AI-assisted (Claude Code). No game data. |
… memory (SHADER-MESH-SHARED-LIMIT) design.md listed mesh shaders against maxMeshSharedMemorySize as not covered. A MeshEXT module's Workgroup memory (the LDS array, the 4-byte %ms_counts and, under --wave64-emulate, %x_buf) can now be capped at translation with --max-mesh-shared-memory BYTES, refused with the needed and allowed byte counts. The default is 0 (no check), so every mesh shader that translated before still does; a --mesh-compute module keeps the compute cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RAL8MMXUuNpQAVa1iiyAMP
d94d97f to
c9a480e
Compare
Claimed in the coordination issue as: SHADER-MESH-SHARED-LIMIT (#1608)
What and why
docs/design.mdlisted "mesh shaders againstmaxMeshSharedMemorySize" as not covered. The translator already caps acompute shader's Workgroup memory (
--max-shared-memory); a MeshEXT module had no equivalent.--max-mesh-shared-memory BYTES(MAX_MESH_SHARED_BYTES): a MeshEXT module whose Workgroup memory (the LDSarray, the 4-byte
%ms_countsand, under--wave64-emulate,%x_buf, the same totallds_bytesrecords) is overit is refused (
Unsupported) with the needed and allowed byte counts, e.g.MS workgroup memory 32772 B (LDS 32768 B + %ms_counts 4 B) over maxMeshSharedMemorySize 28672 B.%ms_countsis already 65,540 B, so any non-zerodefault would refuse mesh shaders that translate today. Pass a device's limit (28,672 is the
VK_EXT_mesh_shaderminimum) to refuse at translation what that device can't run; the runtime keeps checkinglds_bytesagainst the device it runs on either way.--mesh-computemodule is GLCompute, so it keeps the compute cap.Tested
tests/semantic/test_ms_shared_memory_limit.py(new, 7 tests, hand-written fixturems_shared_limit.asm, PSV0written in the test): under the cap; over it with the byte counts; the exact boundary (32,772 passes, 32,771
refuses);
%x_bufcounted under--wave64-emulate;--mesh-computeuses the compute cap; the default refusesnothing (65,540 B translates and
lds_bytescarries it); the CLI flag end to end.python -I scripts/run_semantic_tests.py tests/semantic: 494 files, 6,325 tests, 0 failed.pytest tests/test_translate.py: 712 passed; the 2 failures arecs_dpp_cmp.asmwith LLVM 21, which fail on maintoo (tests: the pytest helper takes a text-only sample's lines as its listing, as run_gpu_tests.py does (TEST-TRANSLATE-TEXT-ONLY) #1375 fixes the helper).
python -m compileall -q tools tests: clean.GPUs tested: n/a (translator-side check; no GPU path changes)
AI-assisted: yes (Claude Code, with a Devin draft reviewed and changed: the default went from 28,672 to 0 after
the existing
test_ms_lds_need.pyshowed real mesh LDS sizes over the spec minimum)Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🤖 Generated with Claude Code
https://claude.ai/code/session_01RAL8MMXUuNpQAVa1iiyAMP