make_game: --gpu-info FILE decides the shaders stage for the PC that will run the port (OLD-9784) #1307

Closed
ambroseautomation wants to merge 1 commit from upstream-pr/1307 into main
ambroseautomation commented 2026-11-24 21:38:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ambroseautomation on 2026-11-24T21:38:44Z.


Summary

Coordination item: OLD-9784 (carry-forward of draft #61 / old-pr/9784, preserving original author Simone Beduzzi).

Problem & Root Cause

make_game.py's shaders stage probes the build machine's GPU (tools/vk_subgroup_info.py) to decide wave64 emulation and fallback flags (--f16-interp-fallback, --pc-tail-ubo, --bary-fallback, --mesh-compute). When building on a machine whose GPU differs from the target PC (for example, WSL2 exposing 8-wide llvmpipe without PerVertexKHR when building for an RDNA2/Windows target), the shaders stage selects wrong emulation/fallback flags for the target GPU.

Implementation

  • Adds --gpu-info FILE to make_game.py so every GPU probe question is answered from JSON previously saved by python -I tools/vk_subgroup_info.py on the target PC, without invoking vk_subgroup_info.py or vulkaninfo on the build host.
  • Fails fast with a clear error when --gpu-info FILE is missing, unreadable, contains no JSON object on its last line, or holds an error record.
  • Routes runtime_gpu_per_vertex() through runtime_gpu_info() consistently with the other probe helpers.
  • Documents --gpu-info FILE in README.md and adds GpuInfoFileTest in tests/test_make_game_wave64.py.

Tests Run

Environment: Windows 11 Pro 64-bit, Python 3.12.10, synthetic fixtures only (no game data).

  • python -I -m py_compile make_game.py tests/test_make_game_wave64.py — PASS
  • pytest tests/test_make_game_wave64.py tests/test_make_game_pipelines.py tests/test_docs_links.py tests/test_text_write_line_endings.py -v — 80/80 PASS (exact count verified below)
  • python -I scripts/check_no_game_data.py README.md make_game.py tests/test_make_game_wave64.py — PASS

Disclosure

AI-assisted: yes (carry-forward, rebase onto current main, and local verification; original implementation by Simone Beduzzi).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5480771628 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1307). Originally posted by [ambroseautomation](https://github.com/ambroseautomation) on 2026-11-24T21:38:44Z. --- ## Summary Coordination item: `OLD-9784` (carry-forward of draft #61 / `old-pr/9784`, preserving original author `Simone Beduzzi`). ### Problem & Root Cause `make_game.py`'s shaders stage probes the build machine's GPU (`tools/vk_subgroup_info.py`) to decide wave64 emulation and fallback flags (`--f16-interp-fallback`, `--pc-tail-ubo`, `--bary-fallback`, `--mesh-compute`). When building on a machine whose GPU differs from the target PC (for example, WSL2 exposing 8-wide `llvmpipe` without `PerVertexKHR` when building for an RDNA2/Windows target), the shaders stage selects wrong emulation/fallback flags for the target GPU. ### Implementation - Adds `--gpu-info FILE` to `make_game.py` so every GPU probe question is answered from JSON previously saved by `python -I tools/vk_subgroup_info.py` on the target PC, without invoking `vk_subgroup_info.py` or `vulkaninfo` on the build host. - Fails fast with a clear error when `--gpu-info FILE` is missing, unreadable, contains no JSON object on its last line, or holds an error record. - Routes `runtime_gpu_per_vertex()` through `runtime_gpu_info()` consistently with the other probe helpers. - Documents `--gpu-info FILE` in `README.md` and adds `GpuInfoFileTest` in `tests/test_make_game_wave64.py`. ## Tests Run Environment: Windows 11 Pro 64-bit, Python 3.12.10, synthetic fixtures only (no game data). - `python -I -m py_compile make_game.py tests/test_make_game_wave64.py` — PASS - `pytest tests/test_make_game_wave64.py tests/test_make_game_pipelines.py tests/test_docs_links.py tests/test_text_write_line_endings.py -v` — 80/80 PASS (exact count verified below) - `python -I scripts/check_no_game_data.py README.md make_game.py tests/test_make_game_wave64.py` — PASS ## Disclosure AI-assisted: yes (carry-forward, rebase onto current `main`, and local verification; original implementation by Simone Beduzzi).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1307
No description provided.