You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
make_game: rebuild BVH shader modules the Windows runtime cannot read - #8387
The BVH build stage can report all programs translated even when an indexed module is zero bytes. With a matching build stamp, every later run reuses it. The native compute pipeline then rejects the module in read_spirv_words; the builder constructor gives up on the first failed pipeline. I reproduced the build/runtime disagreement with synthetic inputs.
Check each indexed BVH module against the runtime's inexpensive framing rules before accepting either cached or freshly translated output. A bad cache triggers a rebuild. A bad fresh result names the module and leaves no published index or completion marker. This reads only the magic word and file size. Instruction and device-capability validation stay with their existing validators.
Verification
Windows 10 x64, Python 3.13.9. All four cache-damage cases and the fresh-publication case failed before the fix. Afterward, the BVH stage passed 15/15, the FSPX stage 22/22, and shader-stage resume 46/46.
Ran the real extraction, unpacking, disassembly wrapper and translator on three synthetic programs, with a stand-in disassembler, the in-process assembler and external validation disabled. After shortening one module, rerunning restored all three byte-for-byte. The native C++ reader accepted all three and a second rerun reused them.
In a separate headless Vulkan check on a GeForce RTX 2060 SUPER (576.02), the same C++ reader rejected all four malformed inputs. The build restored the hand-assembled compute module each time and vkCreateComputePipelines succeeded with a restored module. No retail boot was attempted.
Verified commit d499b577ad9df8bae6638975cbbd9957e2d67620. All 15 BVH shader-stage tests passed on Windows with synthetic staged files. The focused cases cover missing or unreadable cached modules and an index entry the runtime cannot resolve. This was validation of the build/resume path, without a retail executable or a GPU run.
Tested d499b577 on Linux, CPython 3.14, CPU only, synthetic inputs, merged onto main46492b02: pass
python -I tests/test_bvh_shaders_stage.py: Ran 15 tests, OK. With only the non-test files reverted to main: FAILED (failures=5), so the new tests exercise the change.
compileall and scripts/check_no_game_data.py on the changed files: clean.
Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting; claimed in #8047.
Tested d499b57 on Windows 11 (CPU only, no GPU needed): pass
Windows 11 Pro, Python 3.14.7, no GPU or game files involved; pytest/numpy/Pillow pinned from tests/requirements.txt in a fresh venv. Method: PR head merged onto maind9aa42a, the PR's test files run with python -m pytest before and after the merge, plus python -m compileall -q on the changed files (clean).
tests/test_bvh_shaders_stage.py: main 13 passed; with the PR 15 passed, 4 subtests passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination thread. No dependency.
The BVH build stage can report all programs translated even when an indexed module is zero bytes. With a matching build stamp, every later run reuses it. The native compute pipeline then rejects the module in
read_spirv_words; the builder constructor gives up on the first failed pipeline. I reproduced the build/runtime disagreement with synthetic inputs.Check each indexed BVH module against the runtime's inexpensive framing rules before accepting either cached or freshly translated output. A bad cache triggers a rebuild. A bad fresh result names the module and leaves no published index or completion marker. This reads only the magic word and file size. Instruction and device-capability validation stay with their existing validators.
Verification
vkCreateComputePipelinessucceeded with a restored module. No retail boot was attempted.AI-assisted (Codex).