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

Closed
github-bot wants to merge 1 commit from gh-pr/311/head into gh-pr/311/base
Owner

@⁠Andretuta on GitHub · 2026-11-24 03:06 UTC · original
ubiquitarianism:old-pr/10045 → main · +28 −10 · 3 files · 1 commits · closed without merging

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

**@⁠Andretuta** on GitHub · 2026-11-24 03:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/311) `ubiquitarianism:old-pr/10045` → `main` · +28 −10 · 3 files · 1 commits · closed without merging > 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)
RADV (Mesa 26.2.6) sets fragmentShaderBarycentric on a gfx90c iGPU (Vega 8,
PCI 1002:15E7) that doesn't list VK_KHR_fragment_shader_barycentric, so
per_vertex_inputs read true there. run_gpu_tests.py then didn't turn on
--f16-interp-fallback and ps_interp_f16_high skipped; make_game.py reads the
same field and would keep PerVertexKHR inputs the device can't run.

The feature now counts only with its extension in the device's list. The
gfx90c/RADV measurement goes into docs/testing.md.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:52:57 +00:00
github-bot closed this pull request 2026-11-26 08:52:57 +00:00
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-24 19:19 UTC · original

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).

**@⁠aslan2142** on GitHub · 2026-11-24 19:19 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/311#issuecomment-7141926670) 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

This discussion has been locked. Commenting is limited to contributors.
No description provided.