[PR #1885] make_game, vk_subgroup_info: auto-enable --mesh-compute without VK_EXT_mesh_shader (MAKE-GAME-MESH-COMPUTE-NO-EXT) #1898

Open
opened 2026-11-26 21:19:20 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1885
Author: @robot00f
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: feat/make-game-mesh-compute-no-ext


📝 Commits (1)

  • 5a82e80 make_game, vk_subgroup_info: auto-enable --mesh-compute without VK_EXT_mesh_shader

📊 Changes

8 files changed (+130 additions, -24 deletions)

View changed files

📝 README.md (+3 -2)
📝 docs/design.md (+1 -1)
📝 make_game.py (+24 -9)
📝 tests/test_make_game_argparse.py (+1 -0)
📝 tests/test_make_game_translator_flags.py (+44 -7)
📝 tests/test_make_game_wave64.py (+1 -0)
📝 tests/test_vk_subgroup_info.py (+37 -0)
📝 tools/vk_subgroup_info.py (+19 -5)

📄 Description

Claimed in the coordination issue as: MAKE-GAME-MESH-COMPUTE-NO-EXT (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7152196533; continued in #1608)

What and why

make_game.py previously turned on --mesh-compute automatically only on Intel's Windows Vulkan driver (BUILD-2202, runtime_gpu_mesh_draws_crash). Meanwhile, tools/vk_subgroup_info.py only reported mesh_in_supported_stages from VkPhysicalDeviceSubgroupProperties.supportedStages and skipped vkEnumerateDeviceExtensionProperties on Vulkan 1.3 devices (core13). On GPUs without VK_EXT_mesh_shader / VkPhysicalDeviceMeshShaderFeaturesEXT.meshShader (such as NVIDIA Pascal, AMD RDNA1/GCN, older Intel iGPUs, and MoltenVK), make_game.py left --mesh-compute off unless passed manually, translating native MeshEXT modules that the target GPU cannot create or execute.

  • tools/vk_subgroup_info.py: Enumerates device extensions on both Vulkan 1.2 and Vulkan 1.3 candidate devices, chains VkPhysicalDeviceMeshShaderFeaturesEXT (sType = 1000328000, 40 bytes on 64-bit, meshShader at byte offset 20 after taskShader) when VK_EXT_mesh_shader is advertised, and adds "mesh_shader" (bool) to the JSON output.
  • make_game.py: Adds runtime_gpu_mesh_shader() and automatically enables --mesh-compute during the shaders stage when mesh_shader is False (unless --native-mesh is passed), before wave64_settings and maxPushConstantsSize (152 B) are evaluated. When the GPU probe cannot answer (None), keep_recorded_fallback("--mesh-compute", work) preserves an existing --mesh-compute translation as it already does for BUILD-2202.
  • Docs & tests: Updates --mesh-compute / --native-mesh CLI help, README.md, docs/design.md, tests/test_vk_subgroup_info.py, and tests/test_make_game_translator_flags.py.

Tested

  • Host GPU probe (3/3 runs with VK_LOADER_LAYERS_DISABLE=~implicit~):
    • Before: tools/vk_subgroup_info.py omitted "mesh_shader" and make_game.py left --mesh-compute off on Pascal unless passed on the command line.
    • After: python -I tools/vk_subgroup_info.py deterministically reports "mesh_shader": false (3/3 runs) on GTX 1050 Ti, causing make_game.py to select --mesh-compute automatically.
  • Unit, CLI, and repository checks:
    • python -m compileall -q make_game.py tools tests — PASS
    • python -I make_game.py --help and python -I tools/vk_subgroup_info.py --help — PASS
    • python -I tests/test_vk_subgroup_info.py — 55/55 PASS (including Vulkan 1.2/1.3 VK_EXT_mesh_shader presence and taskShader=1, meshShader=0 offset verification)
    • python -I tests/test_make_game_translator_flags.py — 36/36 PASS (including mesh_shader=False, 144 B -> --pc-tail-ubo interaction, --native-mesh override, and keep_recorded_fallback)
    • All tests/test_make_game_*.py suites, tests/test_wave64_pipeline_audit.py, tests/test_docs_links.py, tests/test_docs_table_rows.py, tests/test_text_write_line_endings.py — 535/535 PASS
    • python -I scripts/check_no_game_data.py on all touched files — PASS
  • Not tested: Full retail shader corpus build (no game files used) and hardware WITH VK_EXT_mesh_shader (covered via FakeVulkan unit tests for both meshShader=1 and taskShader=1, meshShader=0).

GPUs tested: NVIDIA GeForce GTX 1050 Ti (Pascal, 4 GB), driver 582.28, Vulkan 1.4.312, Windows 10 Pro 10.0.19045

AI-assisted: yes (Antigravity)

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 (updated the --mesh-compute row in docs/design.md).

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1885 **Author:** [@robot00f](https://github.com/robot00f) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/make-game-mesh-compute-no-ext` --- ### 📝 Commits (1) - [`5a82e80`](https://github.com/ubiquitarianism/leonida/commit/5a82e80741bb292951095f2cb1f219e2eb6961f3) make_game, vk_subgroup_info: auto-enable --mesh-compute without VK_EXT_mesh_shader ### 📊 Changes **8 files changed** (+130 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+3 -2) 📝 `docs/design.md` (+1 -1) 📝 `make_game.py` (+24 -9) 📝 `tests/test_make_game_argparse.py` (+1 -0) 📝 `tests/test_make_game_translator_flags.py` (+44 -7) 📝 `tests/test_make_game_wave64.py` (+1 -0) 📝 `tests/test_vk_subgroup_info.py` (+37 -0) 📝 `tools/vk_subgroup_info.py` (+19 -5) </details> ### 📄 Description Claimed in the coordination issue as: `MAKE-GAME-MESH-COMPUTE-NO-EXT` (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7152196533; continued in #1608) ### What and why `make_game.py` previously turned on `--mesh-compute` automatically only on Intel's Windows Vulkan driver (`BUILD-2202`, `runtime_gpu_mesh_draws_crash`). Meanwhile, `tools/vk_subgroup_info.py` only reported `mesh_in_supported_stages` from `VkPhysicalDeviceSubgroupProperties.supportedStages` and skipped `vkEnumerateDeviceExtensionProperties` on Vulkan 1.3 devices (`core13`). On GPUs without `VK_EXT_mesh_shader` / `VkPhysicalDeviceMeshShaderFeaturesEXT.meshShader` (such as NVIDIA Pascal, AMD RDNA1/GCN, older Intel iGPUs, and MoltenVK), `make_game.py` left `--mesh-compute` off unless passed manually, translating native `MeshEXT` modules that the target GPU cannot create or execute. - **`tools/vk_subgroup_info.py`:** Enumerates device extensions on both Vulkan 1.2 and Vulkan 1.3 candidate devices, chains `VkPhysicalDeviceMeshShaderFeaturesEXT` (`sType = 1000328000`, 40 bytes on 64-bit, `meshShader` at byte offset 20 after `taskShader`) when `VK_EXT_mesh_shader` is advertised, and adds `"mesh_shader"` (`bool`) to the JSON output. - **`make_game.py`:** Adds `runtime_gpu_mesh_shader()` and automatically enables `--mesh-compute` during the `shaders` stage when `mesh_shader` is `False` (unless `--native-mesh` is passed), before `wave64_settings` and `maxPushConstantsSize` (152 B) are evaluated. When the GPU probe cannot answer (`None`), `keep_recorded_fallback("--mesh-compute", work)` preserves an existing `--mesh-compute` translation as it already does for `BUILD-2202`. - **Docs & tests:** Updates `--mesh-compute` / `--native-mesh` CLI help, `README.md`, `docs/design.md`, `tests/test_vk_subgroup_info.py`, and `tests/test_make_game_translator_flags.py`. ### Tested - **Host GPU probe (3/3 runs with `VK_LOADER_LAYERS_DISABLE=~implicit~`):** - Before: `tools/vk_subgroup_info.py` omitted `"mesh_shader"` and `make_game.py` left `--mesh-compute` off on Pascal unless passed on the command line. - After: `python -I tools/vk_subgroup_info.py` deterministically reports `"mesh_shader": false` (3/3 runs) on GTX 1050 Ti, causing `make_game.py` to select `--mesh-compute` automatically. - **Unit, CLI, and repository checks:** - `python -m compileall -q make_game.py tools tests` — PASS - `python -I make_game.py --help` and `python -I tools/vk_subgroup_info.py --help` — PASS - `python -I tests/test_vk_subgroup_info.py` — 55/55 PASS (including Vulkan 1.2/1.3 `VK_EXT_mesh_shader` presence and `taskShader=1, meshShader=0` offset verification) - `python -I tests/test_make_game_translator_flags.py` — 36/36 PASS (including `mesh_shader=False`, `144 B -> --pc-tail-ubo` interaction, `--native-mesh` override, and `keep_recorded_fallback`) - All `tests/test_make_game_*.py` suites, `tests/test_wave64_pipeline_audit.py`, `tests/test_docs_links.py`, `tests/test_docs_table_rows.py`, `tests/test_text_write_line_endings.py` — 535/535 PASS - `python -I scripts/check_no_game_data.py` on all touched files — PASS - **Not tested:** Full retail shader corpus build (no game files used) and hardware WITH `VK_EXT_mesh_shader` (covered via `FakeVulkan` unit tests for both `meshShader=1` and `taskShader=1, meshShader=0`). GPUs tested: NVIDIA GeForce GTX 1050 Ti (Pascal, 4 GB), driver 582.28, Vulkan 1.4.312, Windows 10 Pro 10.0.19045 AI-assisted: yes (Antigravity) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed (updated the `--mesh-compute` row in `docs/design.md`). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#1898
No description provided.