[PR #624] [MERGED] vk_subgroup_info: per_vertex_inputs needs VK_KHR_fragment_shader_barycentric listed (OLD-10045) #667

Closed
opened 2026-11-26 20:18:38 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/624
Author: @jarvixaiassistant-glitch
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142

Base: main ← Head: fix/old-10045-vk-barycentric-ext


📝 Commits (2)

  • de286bf vk_subgroup_info: per_vertex_inputs needs VK_KHR_fragment_shader_barycentric listed
  • 95fb20d vk_subgroup_info: reuse Vulkan 1.2 extensions and defer 1.3 query until chosen

📊 Changes

3 files changed (+59 additions, -9 deletions)

View changed files

📝 docs/testing.md (+6 -2)
📝 tests/test_vk_subgroup_info.py (+39 -5)
📝 tools/vk_subgroup_info.py (+14 -2)

📄 Description

Claimed in the coordination issue as: OLD-10045

What and why

Carries forward old-pr/10045 (draft #311) onto main (21625bca8), preserving Matheus Fermiano's original commit verbatim per CONTRIBUTING.md and adding one focused hardening commit on top:

  1. Original commit (Matheus Fermiano): Updates tools/vk_subgroup_info.py so per_vertex_inputs requires VK_KHR_fragment_shader_barycentric to be listed in the device's extension list (in addition to fragmentShaderBarycentric and non-MoltenVK), preventing false positives on drivers like RADV (Mesa 26.2.6) on gfx90c Vega 8 (PCI 1002:15E7) that set the feature bit without exposing the extension; adds unit tests in tests/test_vk_subgroup_info.py and documents the measurement in docs/testing.md.
  2. Hardening commit (JARVIX): Avoids redundant vkEnumerateDeviceExtensionProperties calls during query():
    • Reuses the extensions set already enumerated for Vulkan 1.2 eligibility (VULKAN_12_REQUIRED_EXTENSIONS) instead of calling device_extensions(vk, d) a second time on the same device.
    • Defers the Vulkan 1.3 device_extensions() call until after the highest-ranked winning device is selected (avoiding extension enumeration on lower-ranked Vulkan 1.3 devices superseded later in the loop).
    • Adds test_per_vertex_inputs_reuses_vulkan12_extensions_and_defers_vulkan13 covering Vulkan 1.2 single-enumeration reuse (with and without VK_KHR_fragment_shader_barycentric) and Vulkan 1.3 deferred enumeration when an integrated GPU precedes a discrete GPU.

Tested

All synthetic unit/docs/CI checks and live dual-GPU Vulkan queries on Windows 11 x64, Python 3.12.14, Node v24.19.0 (no game files):

  • python -I tests/test_vk_subgroup_info.py -v — 55/55 passed
  • python -I tools/vk_subgroup_info.py (NVIDIA GeForce RTX 3090, driver 621.01, Vulkan 1.4.357): per_vertex_inputs: true, barycentric_fallback: false, max_push_constants_size: 256
  • LEONIDA_VK_DEVICE=AMD python -I tools/vk_subgroup_info.py (AMD Radeon(TM) Graphics gfx90c Cezanne 0x1638, driver 26.5.2, Vulkan 1.3.260): per_vertex_inputs: true, barycentric_fallback: true, max_push_constants_size: 128
  • python -I tests/test_ci_registration.py — 15/15 passed
  • python -I tests/test_runtime_paths.py — 5/5 passed
  • python -I scripts/check_no_game_data.py — passed (0 forbidden tracked extensions)
  • python -m compileall -q make_game.py tools tests — passed
  • python -I tests/test_text_write_line_endings.py, tests/test_report_paths.py, tests/test_i18n_index.py, and all tests/test_docs_*.py — passed
  • node --test tests/test_viewer_streaming.cjs — passed

GPUs tested: NVIDIA GeForce RTX 3090 (Windows 11, driver 621.01, Vulkan 1.4.357) and AMD Radeon(TM) Graphics gfx90c 0x1638 (Windows 11, driver 26.5.2, Vulkan 1.3.260) via tools/vk_subgroup_info.py

AI-assisted: yes (JARVIX multi-model team: Antigravity + DeepSeek-V4-Pro + NVIDIA NIM Nemotron-3-Ultra-550B)

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. (N/A — Vulkan physical-device capability query only; no shader-translator rule changed.)

🔄 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/624 **Author:** [@jarvixaiassistant-glitch](https://github.com/jarvixaiassistant-glitch) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `fix/old-10045-vk-barycentric-ext` --- ### 📝 Commits (2) - [`de286bf`](https://github.com/ubiquitarianism/leonida/commit/de286bf79167ebc15a60199ba22aeef1dcedf0db) vk_subgroup_info: per_vertex_inputs needs VK_KHR_fragment_shader_barycentric listed - [`95fb20d`](https://github.com/ubiquitarianism/leonida/commit/95fb20df043e9ca33f9f836ab81785d1771336d0) vk_subgroup_info: reuse Vulkan 1.2 extensions and defer 1.3 query until chosen ### 📊 Changes **3 files changed** (+59 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `docs/testing.md` (+6 -2) 📝 `tests/test_vk_subgroup_info.py` (+39 -5) 📝 `tools/vk_subgroup_info.py` (+14 -2) </details> ### 📄 Description Claimed in the coordination issue as: OLD-10045 ### What and why Carries forward `old-pr/10045` (draft #311) onto `main` (`21625bca8`), preserving `Matheus Fermiano`'s original commit verbatim per `CONTRIBUTING.md` and adding one focused hardening commit on top: 1. **Original commit (`Matheus Fermiano`):** Updates `tools/vk_subgroup_info.py` so `per_vertex_inputs` requires `VK_KHR_fragment_shader_barycentric` to be listed in the device's extension list (in addition to `fragmentShaderBarycentric` and non-MoltenVK), preventing false positives on drivers like RADV (Mesa 26.2.6) on gfx90c Vega 8 (`PCI 1002:15E7`) that set the feature bit without exposing the extension; adds unit tests in `tests/test_vk_subgroup_info.py` and documents the measurement in `docs/testing.md`. 2. **Hardening commit (`JARVIX`):** Avoids redundant `vkEnumerateDeviceExtensionProperties` calls during `query()`: - Reuses the `extensions` set already enumerated for Vulkan 1.2 eligibility (`VULKAN_12_REQUIRED_EXTENSIONS`) instead of calling `device_extensions(vk, d)` a second time on the same device. - Defers the Vulkan 1.3 `device_extensions()` call until after the highest-ranked winning device is selected (avoiding extension enumeration on lower-ranked Vulkan 1.3 devices superseded later in the loop). - Adds `test_per_vertex_inputs_reuses_vulkan12_extensions_and_defers_vulkan13` covering Vulkan 1.2 single-enumeration reuse (with and without `VK_KHR_fragment_shader_barycentric`) and Vulkan 1.3 deferred enumeration when an integrated GPU precedes a discrete GPU. ### Tested All synthetic unit/docs/CI checks and live dual-GPU Vulkan queries on Windows 11 x64, Python 3.12.14, Node v24.19.0 (no game files): - `python -I tests/test_vk_subgroup_info.py -v` — 55/55 passed - `python -I tools/vk_subgroup_info.py` (NVIDIA GeForce RTX 3090, driver 621.01, Vulkan 1.4.357): `per_vertex_inputs: true`, `barycentric_fallback: false`, `max_push_constants_size: 256` - `LEONIDA_VK_DEVICE=AMD python -I tools/vk_subgroup_info.py` (AMD Radeon(TM) Graphics gfx90c Cezanne `0x1638`, driver 26.5.2, Vulkan 1.3.260): `per_vertex_inputs: true`, `barycentric_fallback: true`, `max_push_constants_size: 128` - `python -I tests/test_ci_registration.py` — 15/15 passed - `python -I tests/test_runtime_paths.py` — 5/5 passed - `python -I scripts/check_no_game_data.py` — passed (0 forbidden tracked extensions) - `python -m compileall -q make_game.py tools tests` — passed - `python -I tests/test_text_write_line_endings.py`, `tests/test_report_paths.py`, `tests/test_i18n_index.py`, and all `tests/test_docs_*.py` — passed - `node --test tests/test_viewer_streaming.cjs` — passed GPUs tested: NVIDIA GeForce RTX 3090 (Windows 11, driver 621.01, Vulkan 1.4.357) and AMD Radeon(TM) Graphics gfx90c `0x1638` (Windows 11, driver 26.5.2, Vulkan 1.3.260) via `tools/vk_subgroup_info.py` AI-assisted: yes (JARVIX multi-model team: Antigravity + DeepSeek-V4-Pro + NVIDIA NIM Nemotron-3-Ultra-550B) ### 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. *(N/A — Vulkan physical-device capability query only; no shader-translator rule changed.)* --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:38 +01:00
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#667
No description provided.