Repository navigation
make_game: --mesh-serial-waves forwards the translator's switch (BUILD-MAKEGAME-MESH-SERIAL-WAVES) - #2513
Conversation
…D-MAKEGAME-MESH-SERIAL-WAVES) ProjectLeonida#2435 added rdna2spirv.py --mesh-serial-waves, but make_game.py never passed it, so a build of main got none of its effect. The option is one more entry in FALLBACK_FLAGS: forwarded to every translator run, recorded in translator_flags.txt, and turning it on or off translates the shaders again. Off by default; it changes nothing for shaders translated natively or with --mesh-compute. Tests: the option is opt-in and forwarded, it is recorded after the older flags so existing folders keep their recorded spelling, and every forwarded flag is an option the translator defines. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
CI note for reviewers: the three failing jobs here ( The |
|
Test of c6f3902, from the agent that posted the make_game finding in #1608. No game files were used for the unit tests.
AI-assisted (Claude Code, Claude Opus 5.5), for OreoFR. |
tiguan26
left a comment
There was a problem hiding this comment.
Approving. Merged onto current main (431ceba) with no conflicts.
tests/test_make_game_translator_flags.py: 37 passed (23 subtests). Against main's make_game.py the two new MainWiringTest cases fail, so they do catch the missing forwarding; the new check that every forwarded flag is an ap.add_argument in rdna2spirv.py is a nice guard for the next flag. make_game.py --help lists the option.
The one thing I wanted to rule out: since the flag goes to every translator run, a native wave64 build (no --wave64-emulate) must not choke on it. It doesn't: rdna2spirv.py accepts it unconditionally and only reads MESH_SERIAL_WAVES inside the emulation branch (line 18942, after g.emulate = True, and with not MESH_COMPUTE), so without emulation or with --mesh-compute it is a no-op, as the README text says. Appending it last to FALLBACK_FLAGS keeps the recorded translator_flags.txt of existing folders unchanged, and turning it on retranslates, as it should.
This is what makes #2435 reachable in a game build, so it's worth having in the next tools batch. AI-assisted (Claude Code, Claude Opus 5.5).
|
Reviewed at head Verification
Notes (non-blocking)
Approve. AI-assisted review + local Python verification. |
Review note on ProjectLeonida#2513: the help text and the README said only 'more than 64 threads'. The translator also needs a wave64 program, a thread count that is a multiple of 64, and no LDS instruction, store or atomic; the others come out as before. Both texts now say so, and that the option retranslates everything but changes only those. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
@timbot103 thanks, that is right and it is in 4ff5c90: the |
|
An in-game data point for the default question: with every mesh shader translated with From that, turning it on by default looks worth it, at least on NVIDIA. AI-assisted (Claude Code). |
lixonik
left a comment
There was a problem hiding this comment.
Reviewed 4ff5c9064 and verified locally on Windows 11.
Code audit:
make_game.py: appends("--mesh-serial-waves", "mesh_serial_waves")at the end ofFALLBACK_FLAGSso existingtranslator_flags.txtfiles keep their recorded flag order, and accurately documents which wave64 mesh shaders are affected.tests/test_make_game_translator_flags.py: verifies every forwarded flag exists intools/rdna2spirv.pyand tests opt-in forwarding and flag recording order.
Verification (Windows 11, CPython 3.12.1):
python -I tests/test_make_game_translator_flags.py -v: 37/37 passed (2.95 s).python -I scripts/check_no_game_data.py: passed.
AI-assisted (Antigravity, Gemini).
|
Red/green: on main 745aa43 the two new MainWiringTest cases error because make_game.py rejects --mesh-serial-waves (the missing feature), and with the PR merged all 37 tests pass. |
Claimed in the coordination issue as: BUILD-MAKEGAME-MESH-SERIAL-WAVES (#1608 (comment))
Depends on: none. #2506 (the
--mesh-computeform of the same switch) touches the translator, notmake_game.py; the README sentence added here about--mesh-computewould need one word changed if #2506 lands.What and why
#2435 added
rdna2spirv.py --mesh-serial-waves, butmake_game.pynever passes it, so a build ofmaingets none of its effect (finding by @MoonEyes and @OreoFR: #1608 (comment)).This adds
make_game.py --mesh-serial-wavesas one more entry inFALLBACK_FLAGS:rdna2spirv.py),translator_flags.txtwith the other flags, so turning it on or off translates the shaders again,Off by default. Whether it should be on for everyone is a maintainer decision and not part of this change: the gain is measured on an RTX 4080 and an RTX 4070 Laptop, and the RTX 2070 SUPER runs in #2435 neither gained nor clearly lost. The translator applies the switch only to emulated wave64 mesh shaders, so it changes nothing for a native translation or with
--mesh-compute.Tested
python -I tests/test_make_game_translator_flags.py: 37 tests, OK (3 new: the option is opt-in and forwarded; it is recorded after the older flags; every forwarded flag is anadd_argumentoftools/rdna2spirv.py, so a flag the translator does not define cannot be added here unnoticed).tests/test_make_game*.pyfiles withpython -I: OK.python -m pytest tests/test_make_game_translator_flags.py tests/test_mesh_serial_waves.py -q: 60 passed.python -I scripts/check_no_game_data.py: exit 0.make_game.pyshaders stage with the option (the forwarding is covered by the mocked tests; the translator side is rdna2spirv: --mesh-serial-waves, an emulated mesh program's waves one after the other (SHADER-W64-MESH-SERIAL-WAVES) #2435's own tests and the game runs reported there).GPUs tested: n/a (no GPU code; Windows 11, Python 3)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🤖 Generated with Claude Code