vk_subgroup_info: per_vertex_inputs needs VK_KHR_fragment_shader_barycentric listed (RADV on gfx90c) #311

Closed
Andretuta wants to merge 1 commit from upstream-pr/311 into main
Andretuta commented 2026-11-24 03:06:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T03:06:46Z.


Carried over from old PR 10045 by matheusfermiano-source in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/10045, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
matheusfermiano-source: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Claimed in #9677 (claim), new item. Resubmits the fix of #8102, which was closed in the PR cleanup together with #8068 (the other PR that gated the same field); neither was merged, and main a8b7ddb still has the bug.

Depends on: none.

What and why

tools/vk_subgroup_info.py reads per_vertex_inputs from the fragmentShaderBarycentric feature alone. RADV (Mesa 26.2.6) fills that feature with a one on a gfx90c iGPU (Vega 8, PCI 1002:15E7) that doesn't list VK_KHR_fragment_shader_barycentric: vulkaninfo shows no such extension, and vk_harness refuses the barycentric shaders with "the device has no VK_KHR_fragment_shader_barycentric". So:

  • run_gpu_tests.py doesn't turn --f16-interp-fallback on by itself, and ps_interp_f16_high skips instead of running through the fallback;
  • make_game.py reads the same field (runtime_gpu_per_vertex, and #9784 adds another reader), so a build for this GPU would keep PerVertexKHR inputs the device can't run.

The feature now counts only where the extension is listed too, the rule vk_harness already uses. device_extensions() is called only when the feature bit is set and the driver isn't MoltenVK; an enumeration failure gives an empty set, so the answer is false and the f16 fallback is used. docs/testing.md gets the gfx90c/RADV measurement in place of "RADV and other GCN 5 GPUs are not covered".

Tested

AMD Radeon Vega 8 (Ryzen 7 5825U, gfx90c, GCN 5), RADV Mesa 26.2.6, CachyOS Linux, on main a8b7ddb:

  • python -I tools/vk_subgroup_info.py: per_vertex_inputs true on main, false here.
  • python -I scripts/run_gpu_tests.py: 193/248 passed, 52 skipped on main; 194/248 passed, 51 skipped here. The one change is ps_interp_f16_high SKIP → PASS ("f16 low/high halves and f32 control within 2e-3"); ps_ij_computed is then not translated (254/255), as with LEONIDA_BARY_FALLBACK=1 on main (the translator refuses computed I/J pairs under the fallbacks; the test skips either way). The three failures on this GPU (cs_imgload_tfe, cs_imgload_d16_tfe, cs_w64_exec_computed) are the same on main and with this change.
  • python -I tests/test_vk_subgroup_info.py: OK. The two new cases (feature without the extension, as RADV on gfx90c; feature with other extensions only) fail with main's tool and pass here; FakeDevice now lists the extension by default, as a driver with barycentrics does.
  • tests/test_run_gpu_tests.py, tests/test_make_game_translator_flags.py, tests/test_docs_design_rows.py: OK. python -m compileall -q make_game.py tools tests clean; scripts/check_no_game_data.py on the three files clean.

No game files. AI-assisted (Claude Code, Claude Opus 5.5).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5465319239 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/311). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T03:06:46Z. --- > Carried over from **old PR 10045** by `matheusfermiano-source` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/10045`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `matheusfermiano-source`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Claimed in `#9677` ([claim](https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7117046603)), new item. Resubmits the fix of `#8102`, which was closed in the PR cleanup together with `#8068` (the other PR that gated the same field); neither was merged, and `main` `a8b7ddb` still has the bug. Depends on: none. ## What and why `tools/vk_subgroup_info.py` reads `per_vertex_inputs` from the `fragmentShaderBarycentric` feature alone. RADV (Mesa 26.2.6) fills that feature with a one on a gfx90c iGPU (Vega 8, PCI 1002:15E7) that doesn't list `VK_KHR_fragment_shader_barycentric`: vulkaninfo shows no such extension, and `vk_harness` refuses the barycentric shaders with "the device has no VK_KHR_fragment_shader_barycentric". So: - `run_gpu_tests.py` doesn't turn `--f16-interp-fallback` on by itself, and `ps_interp_f16_high` skips instead of running through the fallback; - `make_game.py` reads the same field (`runtime_gpu_per_vertex`, and `#9784` adds another reader), so a build for this GPU would keep `PerVertexKHR` inputs the device can't run. The feature now counts only where the extension is listed too, the rule `vk_harness` already uses. `device_extensions()` is called only when the feature bit is set and the driver isn't MoltenVK; an enumeration failure gives an empty set, so the answer is false and the f16 fallback is used. `docs/testing.md` gets the gfx90c/RADV measurement in place of "RADV and other GCN 5 GPUs are not covered". ## Tested AMD Radeon Vega 8 (Ryzen 7 5825U, gfx90c, GCN 5), RADV Mesa 26.2.6, CachyOS Linux, on `main` `a8b7ddb`: - `python -I tools/vk_subgroup_info.py`: `per_vertex_inputs` `true` on `main`, `false` here. - `python -I scripts/run_gpu_tests.py`: 193/248 passed, 52 skipped on `main`; 194/248 passed, 51 skipped here. The one change is `ps_interp_f16_high` SKIP → PASS ("f16 low/high halves and f32 control within 2e-3"); `ps_ij_computed` is then not translated (254/255), as with `LEONIDA_BARY_FALLBACK=1` on `main` (the translator refuses computed I/J pairs under the fallbacks; the test skips either way). The three failures on this GPU (`cs_imgload_tfe`, `cs_imgload_d16_tfe`, `cs_w64_exec_computed`) are the same on `main` and with this change. - `python -I tests/test_vk_subgroup_info.py`: OK. The two new cases (feature without the extension, as RADV on gfx90c; feature with other extensions only) fail with `main`'s tool and pass here; `FakeDevice` now lists the extension by default, as a driver with barycentrics does. - `tests/test_run_gpu_tests.py`, `tests/test_make_game_translator_flags.py`, `tests/test_docs_design_rows.py`: OK. `python -m compileall -q make_game.py tools tests` clean; `scripts/check_no_game_data.py` on the three files clean. No game files. AI-assisted (Claude Code, Claude Opus 5.5). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
aslan2142 commented 2026-11-24 19:19:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-24T19:19:24Z.


This carry-over of old upstream PR 10045 has been taken over in #624, so I'm closing this draft as #17 describes. The branch old-pr/10045 stays.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7141926670 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/311#issuecomment-7141926670). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-24T19:19:24Z. --- This carry-over of old upstream PR 10045 has been taken over in #624, so I'm closing this draft as #17 describes. The branch `old-pr/10045` stays. AI-assisted (Claude Code, Claude Opus 5.5).

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!311
No description provided.