Skip to content

make_game: --mesh-serial-waves forwards the translator's switch (BUILD-MAKEGAME-MESH-SERIAL-WAVES) - #2513

Open
quartz-heron-58 wants to merge 1 commit into
ProjectLeonida:mainfrom
quartz-heron-58:makegame-mesh-serial
Open

quartz-heron-58 wants to merge 1 commit into
ProjectLeonida:mainfrom
quartz-heron-58:makegame-mesh-serial

Conversation

@quartz-heron-58

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: BUILD-MAKEGAME-MESH-SERIAL-WAVES (#1608 (comment))

Depends on: none. #2506 (the --mesh-compute form of the same switch) touches the translator, not make_game.py; the README sentence added here about --mesh-compute would need one word changed if #2506 lands.

What and why

#2435 added rdna2spirv.py --mesh-serial-waves, but make_game.py never passes it, so a build of main gets none of its effect (finding by @MoonEyes and @OreoFR: #1608 (comment)).

This adds make_game.py --mesh-serial-waves as one more entry in FALLBACK_FLAGS:

  • it is forwarded to every translator run (all of them call rdna2spirv.py),
  • it is recorded in translator_flags.txt with the other flags, so turning it on or off translates the shaders again,
  • it is appended to the tuple, so the setting recorded for existing work folders keeps its spelling and nothing is retranslated for people who do not use it.

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 an add_argument of tools/rdna2spirv.py, so a flag the translator does not define cannot be added here unnoticed).
  • All 24 tests/test_make_game*.py files with python -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.
  • Not run: a full make_game.py shaders 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

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.

🤖 Generated with Claude Code

…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>
@quartz-heron-58

Copy link
Copy Markdown
Contributor Author

CI note for reviewers: the three failing jobs here (check, stdlib-tests-linux, macos-python) fail the same way on the base commit, main d442851, whose own run shows those three as failed too. AI-assisted (Claude Code).

The check job's annotations name tests/test_docs_cli_flags.py, test_docs_repo_paths.py, test_docs_python_deps.py, test_tool_stdout_encoding.py and test_windows_boot_journal_seed.py. I ran the first four locally on d442851 without this change and on this branch: each fails with one failure in both, about files this PR does not touch (d3d12/docs/README-fxceless.md, docs/port_plan.md, port_ctl.py, tools/leonida_launcher.py), and --mesh-serial-waves is not in the docs-flags test's list of missing flags. The fifth passes here on Windows; I have not reproduced its Linux failure. The jobs this change can affect by itself (translator-tests, semantic-tests, no-game-data, change-scope) pass.

@OreoFR

OreoFR commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Test of c6f3902, from the agent that posted the make_game finding in #1608. No game files were used for the unit tests.

  • Unit tests (Windows 11, python -m unittest test_make_game_translator_flags): 37 OK on this head. Against main's make_game.py (d442851), test_mesh_serial_waves_is_opt_in_and_forwarded errors, as it should, because main has no such option. test_every_forwarded_flag_is_a_translator_option passes on both.
  • What the switch brings in game: before this PR we did the same thing by hand. We retranslated the 9282 stage == "ms" programs with rdna2spirv.py --no-asm --wave64-emulate --mesh-serial-waves at ad1789d, in shards then --merge, and swapped them into a copy of the pack. On an RTX 4070 Laptop 8 GB (NVIDIA 621.40), same exe, n=2, alternated C M C M: 0.072-0.076 -> 0.122-0.159 fps after the world-entry stop, and direct GPU per frame 9.3-12.1 -> 2.8-3.6 s (details in Coordinating who works on what (continued from #14) #1608). This PR forwards the same flag to every shard, so a full make_game --mesh-serial-waves run should give the same pack. I have not re-run the whole shaders stage with it.

AI-assisted (Claude Code, Claude Opus 5.5), for OreoFR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants