[PR #2192] make_game, vk_subgroup_info: auto-enable --bary-fallback without VK_KHR_fragment_shader_barycentric #2198

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

📋 Pull Request Information

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

Base: main ← Head: feat/make-game-bary-fallback-no-ext


📝 Commits (2)

  • 5a82e80 make_game, vk_subgroup_info: auto-enable --mesh-compute without VK_EXT_mesh_shader
  • f1b4616 make_game, vk_subgroup_info: auto-enable --bary-fallback without VK_KHR_fragment_shader_barycentric

📊 Changes

9 files changed (+252 additions, -50 deletions)

View changed files

📝 README.md (+6 -3)
📝 docs/design.md (+2 -2)
📝 make_game.py (+45 -15)
📝 scripts/run_gpu_tests.py (+2 -1)
📝 tests/test_make_game_argparse.py (+1 -0)
📝 tests/test_make_game_translator_flags.py (+84 -7)
📝 tests/test_make_game_wave64.py (+1 -0)
📝 tests/test_vk_subgroup_info.py (+67 -1)
📝 tools/vk_subgroup_info.py (+44 -21)

📄 Description

Summary

Auto-enable --bary-fallback in make_game.py (and scripts/run_gpu_tests.py) when tools/vk_subgroup_info.py selects a GPU without VK_KHR_fragment_shader_barycentric (fragmentShaderBarycentric) that supports geometryShader (such as NVIDIA Pascal / GTX 1050 Ti, Intel Gen9.5, and older GCN):

  • Previously, vk_subgroup_info.py reported per_vertex_inputs: false on Pascal (turning on --f16-interp-fallback), while barycentric_fallback only checked for driver bugs on devices that do advertise VK_KHR_fragment_shader_barycentric (Mesa ANV and AMD Windows on gfx90c), returning false on Pascal and leaving raw BaryCoordKHR pixel shaders untranslated unless --bary-fallback or LEONIDA_BARY_FALLBACK=1 was passed manually.
  • Read VkPhysicalDeviceFeatures.geometryShader (offset 32 in the existing VkPhysicalDeviceFeatures2 query) alongside VK_KHR_fragment_shader_barycentric in tools/vk_subgroup_info.py, exposing "fragment_shader_barycentric" and "geometry_shader", and set "barycentric_fallback" to true when not fragment_shader_barycentric and geometry_shader (MoltenVK has geometry_shader == false and stays false).
  • Log the missing VK_KHR_fragment_shader_barycentric reason distinctly from the Mesa ANV / AMD gfx90c driver-bug message in make_game.py, preserving LEONIDA_BARY_FALLBACK=0/1, explicit --bary-fallback, and keep_recorded_fallback on transient probe failures.
  • Update CLI help, README.md, docs/design.md, and unit tests in tests/test_vk_subgroup_info.py and tests/test_make_game_translator_flags.py.

Validation

  • Live probe on NVIDIA GeForce GTX 1050 Ti (Pascal, Windows 10 19045, driver 582.28): python -I tools/vk_subgroup_info.py now reports "fragment_shader_barycentric": false, "geometry_shader": true, "per_vertex_inputs": false, "barycentric_fallback": true, "mesh_shader": false.
  • python -I tests/test_vk_subgroup_info.py, python -I tests/test_make_game_translator_flags.py, python -I tests/test_make_game_wave64.py, test_docs_*, test_text_write_line_endings.py (all OK).
  • python -I scripts/check_no_game_data.py (clean).

Depends on: #1885
Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7182727159
AI-assisted: yes (Antigravity, Gemini 4 Carbon)


🔄 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/2192 **Author:** [@robot00f](https://github.com/robot00f) **Created:** 11/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/make-game-bary-fallback-no-ext` --- ### 📝 Commits (2) - [`5a82e80`](https://github.com/ubiquitarianism/leonida/commit/5a82e80741bb292951095f2cb1f219e2eb6961f3) make_game, vk_subgroup_info: auto-enable --mesh-compute without VK_EXT_mesh_shader - [`f1b4616`](https://github.com/ubiquitarianism/leonida/commit/f1b46166cddd894cd3c01d440ef059dcf431687c) make_game, vk_subgroup_info: auto-enable --bary-fallback without VK_KHR_fragment_shader_barycentric ### 📊 Changes **9 files changed** (+252 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+6 -3) 📝 `docs/design.md` (+2 -2) 📝 `make_game.py` (+45 -15) 📝 `scripts/run_gpu_tests.py` (+2 -1) 📝 `tests/test_make_game_argparse.py` (+1 -0) 📝 `tests/test_make_game_translator_flags.py` (+84 -7) 📝 `tests/test_make_game_wave64.py` (+1 -0) 📝 `tests/test_vk_subgroup_info.py` (+67 -1) 📝 `tools/vk_subgroup_info.py` (+44 -21) </details> ### 📄 Description ## Summary Auto-enable `--bary-fallback` in `make_game.py` (and `scripts/run_gpu_tests.py`) when `tools/vk_subgroup_info.py` selects a GPU without `VK_KHR_fragment_shader_barycentric` (`fragmentShaderBarycentric`) that supports `geometryShader` (such as NVIDIA Pascal / GTX 1050 Ti, Intel Gen9.5, and older GCN): - Previously, `vk_subgroup_info.py` reported `per_vertex_inputs: false` on Pascal (turning on `--f16-interp-fallback`), while `barycentric_fallback` only checked for driver bugs on devices that *do* advertise `VK_KHR_fragment_shader_barycentric` (Mesa ANV and AMD Windows on `gfx90c`), returning `false` on Pascal and leaving raw `BaryCoordKHR` pixel shaders untranslated unless `--bary-fallback` or `LEONIDA_BARY_FALLBACK=1` was passed manually. - Read `VkPhysicalDeviceFeatures.geometryShader` (offset `32` in the existing `VkPhysicalDeviceFeatures2` query) alongside `VK_KHR_fragment_shader_barycentric` in `tools/vk_subgroup_info.py`, exposing `"fragment_shader_barycentric"` and `"geometry_shader"`, and set `"barycentric_fallback"` to `true` when `not fragment_shader_barycentric and geometry_shader` (MoltenVK has `geometry_shader == false` and stays `false`). - Log the missing `VK_KHR_fragment_shader_barycentric` reason distinctly from the Mesa ANV / AMD `gfx90c` driver-bug message in `make_game.py`, preserving `LEONIDA_BARY_FALLBACK=0/1`, explicit `--bary-fallback`, and `keep_recorded_fallback` on transient probe failures. - Update CLI help, `README.md`, `docs/design.md`, and unit tests in `tests/test_vk_subgroup_info.py` and `tests/test_make_game_translator_flags.py`. ## Validation - Live probe on **NVIDIA GeForce GTX 1050 Ti** (Pascal, Windows 10 `19045`, driver `582.28`): `python -I tools/vk_subgroup_info.py` now reports `"fragment_shader_barycentric": false, "geometry_shader": true, "per_vertex_inputs": false, "barycentric_fallback": true, "mesh_shader": false`. - `python -I tests/test_vk_subgroup_info.py`, `python -I tests/test_make_game_translator_flags.py`, `python -I tests/test_make_game_wave64.py`, `test_docs_*`, `test_text_write_line_endings.py` (all OK). - `python -I scripts/check_no_game_data.py` (clean). Depends on: #1885 Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7182727159 AI-assisted: yes (Antigravity, Gemini 4 Carbon) --- <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#2198
No description provided.