Repository navigation
make_game: forward the translator's fallback flags (--no-float-controls and the three fallbacks), recorded beside the translation - #1267
Conversation
…side the translation - `translate()` takes `fallbacks` (the --no-float-controls/--bary-fallback/--texel-offset-fallback/--mesh-compute flags), keeps them in the shard plan, and passes them to every shard; shards finished under other flags restart. - `shaders()` records the flags in spirv/translator_flags.txt like wave64_emulate.txt and re-translates when they change; `shader_outputs_reusable()` and `preflight()` count a folder with other flags as not reusable. - New `--no-float-controls`, `--bary-fallback`, `--texel-offset-fallback` and `--mesh-compute` options; `fallback_flags()` maps them in a stable order. - Tests: 13 new in tests/test_make_game_translator_flags.py (all 13 fail on main 426023a as the negative control); mocks in the resume/argparse suites take the new keyword.
Keep both sides: preflight/main() take fallbacks and jobs; argparse mock asserts fallbacks=() and jobs=6 together.
|
Merge round against main (re-merged Conflicts (2 files, all keep-both):
README auto-merged cleanly (main's i18n line and Linux text kept; our fallback-flags paragraph added; no token lines reintroduced — Flag semantics intact: forwarded per shard ( Tests (CPU, mocked): Branch is maintained against main; it will re-merge on request or when #664 lands — no need to flag each hourly round. AI-assisted (omp orchestrator) |
whattheflop
left a comment
There was a problem hiding this comment.
Independently tested c91b571031275c8f9e13350df54b6bdc3d635bd6 on Windows 11 x64 with uv-managed CPython 3.12.13 and SPIRV-Tools 2026.4. CPU-side translation and SPIR-V validation, with no GPU execution. AI-assisted.
- Called
make_game.shaders()over pre-staged, source-built synthetic listings in a disposable work folder. Only the LLVM signature was substituted. Both translator shards, the merge, the assembler and the validator ran as real subprocesses. - All four fixtures passed
spirv-valwith defaults and with--bary-fallback --texel-offset-fallback --mesh-compute. The enabled run recorded the barycentric input location, removed the texel fixture’s maintenance8 requirement, and emitted a compute entry point with mesh layout metadata. The unaffected pixel shader stayed byte-identical. - Checked
translator_flags.txt,shards.jsonand the preflight reuse predicate. An identical rerun launched zero translator subprocesses. With the merged index and one shard removed, the same flags reused the surviving shard and rebuilt only the missing one. Changing flags rebuilt both shards. Switching back to defaults reproduced all four binaries and the merged index byte-for-byte. Default outputs also matched both direct parents (f5a07321,e7584c52) and the feature commit’s parent (426023a5). - 153 focused tests passed, including CLI forwarding, resume, wave64 and the preflight disk-space boundary. #664 is still open and the pinned translator lacks
--no-float-controls, so that flag was verified at the mocked routing boundary. The barycentric and mesh results cover translation; their runtime integration remains the follow-up documented indocs/design.md.
|
Tested c91b571 on Linux (WSL2 Ubuntu), Python 3.12, CPU only: pass.
|
claim: claiming comment 7076987811 — new BUILD item from @WHOISJARDAS's finding 7076922626 (SHADER-99 follow-up to #664, first raised by @matheuskshn in #664).
Depends on: #664 for
--no-float-controls; the other three flags work on today'smain.What
make_game.py's translation step only ever passed--wave64-emulatetordna2spirv.py, so a player whose device lacksshaderSignedZeroInfNanPreserveFloat32(orVK_KHR_fragment_shader_barycentric,VK_KHR_maintenance8,VK_EXT_mesh_shader) could not ask the build for the translator's fallback at all.--no-float-controls,--bary-fallback,--texel-offset-fallback,--mesh-compute(all off by default: a default build translates exactly as before).translate()forwards the flags to every shard and records them in the shard plan, so shards finished under other flags restart.shaders()records the chosen flags inspirv/translator_flags.txtbeside the translation, likewave64_emulate.txt; a work folder translated with other flags is translated again, andshader_outputs_reusable()(the preflight disk-space estimate) honours it. A folder from before the file existed reads as "no flags", so it stays reusable until flags are asked for.--wave64-emulate.Tests
python -I tests/test_make_game_translator_flags.py— 13/13 pass on this branch, and all 13 error on pristinemain426023a5(negative control: the flags, the recording and the re-translate are all absent there). They cover:fallback_flags()mapping/order;translate()putting the flags in every shard argv, keeping finished shards when the flags are unchanged and discarding them when they change;shaders()recordingtranslator_flags.txt, re-translating on a flag change, and treating a pre-file folder as unflagged;main()handing the same tuple topreflight()andshaders().Existing suites re-run green with the mocks updated for the new keyword:
test_make_game_resume(18),test_shader_stage_resume(39),test_make_game_wave64,test_make_game_dry_run,test_make_game_argparse(35) — all OK.No game data
No game files or game-derived data: synthetic tests only, mocked
vulkaninfo/translator. AI-assisted (omp orchestrator), Windows 10, Python 3.12.