Repository navigation
Conversation
…vh and hash indexes
One shader that spirv-val refuses aborts its whole shard, translate() saw a non-zero exit and the
shaders stage died there. Everything the stage writes after the translation was lost with it:
fspx/, bvh/, native_hashes.txt, which slot 67, slot 57 and the runtime's lookup need. I hit it on
1.0.2.1: three shards of 24 failed on a single module each ("Invalid decoration 'NoContraction'"),
and the only way to get a runnable corpus was to re-translate those shards by hand with
--no-validate, run fspx_shaders/bvh_shaders by hand and merge index.json with a script.
Now the failed shards are named once and run again with --no-validate, so the module is kept (and
the log says so), the rest of the corpus stays validated, and the stage goes on to the optional
indexes and the hash list. If a shard fails without validation too, nothing can be merged and that
is still a hard stop with the index dropped, as before.
Tests: the shard harness in test_make_game_resume.py never implemented poll(), so the file had 12
failures on main before this change; it now polls, and the two legacy tests that pin the hard-stop
behaviour drive the retry as well.
|
Tested
The 12 on One thing for the merge order: this branch already carries the two test fixes that #8642 ( No Approved by @fortkolbast1. AI-assisted. |
|
I tested the validation and shard paths independently on macOS 27.0, Python 3.14.8, SPIRV-Tools v2026.4. The comparison used forge One of two shaders was assembled with a zero local size so the actual A separate negative control used a valid input with I also ran the real validator rejection on #9244 ( The original |
|
checked: #9455 at Some concerns from reading the code, before this goes in:
Suggestion: if a real shard exit is reproduced, handle that class in AI-assisted (Claude Code). No game data. |
One shader that
spirv-valrefuses aborts its whole shard;translate()saw a non-zero exit and the shaders stage died there. Everything the stage writes after the translation was lost with it:fspx/,bvh/,native_hashes.txt— the indexes slot 67, slot 57 and the runtime's lookup need.I hit it on 1.0.2.1: three shards of 24 failed on a single module each (
Invalid decoration 'NoContraction'), and the only way to get a runnable corpus was to re-translate those shards by hand with--no-validate, runfspx_shaders/bvh_shadersby hand and mergeindex.jsonwith a script. That is the cost this removes.What changes
--no-validate, so the module is kept and the log says so. The rest of the corpus stays validated.fspx_shaders(),bvh_shaders()and the hash list.Tests
tests/test_make_game_resume.pynow covers both new paths: a shard with a refused module is retried with--no-validateand the run completes, and a shard that fails without validation still stops.While there: that file's shard harness never implemented
poll(), which is whattranslate()has used for a while, so the file had 12 failures onmainbefore this change. It polls now, and the two legacy tests that pin the hard-stop behaviour drive the retry too.uvx pytest -q tests/test_make_game_*.py→ 415 passed, 4 skipped, 116 subtests.Claimed as A48 in #8851. No game data in the diff: the test fixtures are synthetic.