Repository navigation
Conversation
Grimkeh
left a comment
There was a problem hiding this comment.
Independent Linux CPU review (eafb227a)
What changed: rdna2spirv rejects negative --max-shared-memory values.
Checked: focused tests 35 OK (2 skipped).
Looks correct; no game files.
|
Verified head
AI-assisted. |
|
Independent check on Windows (no game files, no GPU). The parser now rejects a negative cap as a usage error instead of passing it to the translator. Run on Windows 11 (10.0.26100), CPython 3.15.0,
The CLI cases check exit 2, a
AI-assisted review (OpenCode). |
--max-shared-memoryintools/rdna2spirv.pyused baretype=intwhile--limit,--shard, and--max-structured-depthvalidate their bounds with argparse type helpers. Passing a negative value like--max-shared-memory -1setMAX_SHARED_BYTES = -1, causing even a 0-byte compute shader to be rejected asUnsupportedwith exit 0 instead of failing argument parsing with exit 2.Add
_shared_memory_arg()requiring a nonnegative integer (modeled on_depth_arg()), wire it to--max-shared-memory, and add tests intests/test_rdna2spirv_cli.py.Claimed in #8504. AI-assisted; tested on Windows 11 / Python 3.12.10 with
python -I tests/test_rdna2spirv_cli.py,python -m compileall -q tools/rdna2spirv.py tests/test_rdna2spirv_cli.py, andpython -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/test_rdna2spirv_cli.py(no game files).