vk_subgroup_info: take the barycentric fallback on a Raphael iGPU under AMD's 23.20.44 Windows driver (SHADER-BARY-RAPHAEL-OLD-AMD, TEST-RAPHAEL-7700-OLD-AMD) #986

Open
github-bot wants to merge 3 commits from github-bot/gh-986 into main AGit
Owner

@⁠Snooozs on GitHub · 2026-11-24 16:27 UTC · original
Snooozs:bary-raphael-old-amd → main · +92 −7 · 4 files · 3 commits · open

Claimed in the coordination issue as: SHADER-BARY-RAPHAEL-OLD-AMD, TEST-RAPHAEL-7700-OLD-AMD (#14)

What and why

On a Ryzen 7 7700 iGPU (Raphael, RDNA2, PCI 1002:164E) with AMD's old Windows driver 31.0.22044.1 (compiler 23.20.44, Vulkan driverVersion 2.0.283), ps_bary reads a wrong third BaryCoordKHR component: 0.992 where 0.0039 is expected. It is the symptom already handled for gfx90c, and the barycentric fallback is correct here too, but barycentric_fallback() covered gfx90c only.

  • tools/vk_subgroup_info.py: the fallback is also selected for 1002:164E under AMD's proprietary driver up to the measured driverVersion 2.0.283. Newer or unknown versions, other RDNA2 IDs and RADV are unchanged. LEONIDA_BARY_FALLBACK=0 still turns it off. make_game.py, run_gpu_tests.py, build.py and check.py read the answer from this tool.
  • tests/test_vk_subgroup_info.py: the bound, the neighbours, and the query path that reads driverVersion.
  • docs/testing.md: the GPU, driver and bound.
  • gpu-test-results/Raphael-R7-7700-AMD-23.20.44.txt: the full result.

The bound is the one driver I could measure; I do not know which later driver fixed it.

Possible textual conflict with #624 and #311, which edit the same file for another rule.

Tested

run_gpu_tests.py --disasm-dir tests/semantic/fixtures/disasm with LEONIDA_PC_TAIL_UBO=1 (the device has 128 push-constant bytes), test programs and scripts from cf4c00cba:

passed ps_bary
main cf4c00cba 96/97 FAIL, third component 0.9921875 for 0.00390625
this change 97/97 PASS, 4096/4096
this change, LEONIDA_BARY_FALLBACK=0 96/97 FAIL, same values

Only the fixtures with a committed listing ran (no llvm-mc); ps_persp_bary and ps_ij_computed are not among them. 100 shaders translate and pass spirv-val in all three runs.

vk_subgroup_info.py answers barycentric_fallback: true for the iGPU and false for the RTX 5060 Ti. tests/test_vk_subgroup_info.py: 56 OK (the new cases fail without the rule). test_make_game_wave64, test_make_game_translator_flags, test_run_gpu_tests, test_shader_build_fallbacks and the test_docs* files pass. check_no_game_data.py on the changed files: clean.

GPUs tested: AMD Radeon(TM) Graphics (Ryzen 7 7700 iGPU), AMD 31.0.22044.1, Windows 10 22H2; NVIDIA RTX 5060 Ti 621.01 (tool answer only)

AI-assisted: yes. Claude Code (a Haiku 5.5 subagent wrote the rule and its tests, Claude Opus 5.5 reviewed it and ran the GPU tests).

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: no translator rule)

🤖 Generated with Claude Code

**@⁠Snooozs** on GitHub · 2026-11-24 16:27 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/986) `Snooozs:bary-raphael-old-amd` → `main` · +92 −7 · 4 files · 3 commits · open Claimed in the coordination issue as: SHADER-BARY-RAPHAEL-OLD-AMD, TEST-RAPHAEL-7700-OLD-AMD (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why On a Ryzen 7 7700 iGPU (Raphael, RDNA2, PCI 1002:164E) with AMD's old Windows driver 31.0.22044.1 (compiler 23.20.44, Vulkan driverVersion 2.0.283), `ps_bary` reads a wrong third `BaryCoordKHR` component: 0.992 where 0.0039 is expected. It is the symptom already handled for gfx90c, and the barycentric fallback is correct here too, but `barycentric_fallback()` covered gfx90c only. - `tools/vk_subgroup_info.py`: the fallback is also selected for 1002:164E under AMD's proprietary driver up to the measured driverVersion 2.0.283. Newer or unknown versions, other RDNA2 IDs and RADV are unchanged. `LEONIDA_BARY_FALLBACK=0` still turns it off. `make_game.py`, `run_gpu_tests.py`, `build.py` and `check.py` read the answer from this tool. - `tests/test_vk_subgroup_info.py`: the bound, the neighbours, and the query path that reads driverVersion. - `docs/testing.md`: the GPU, driver and bound. - `gpu-test-results/Raphael-R7-7700-AMD-23.20.44.txt`: the full result. The bound is the one driver I could measure; I do not know which later driver fixed it. Possible textual conflict with #624 and #311, which edit the same file for another rule. ### Tested `run_gpu_tests.py --disasm-dir tests/semantic/fixtures/disasm` with `LEONIDA_PC_TAIL_UBO=1` (the device has 128 push-constant bytes), test programs and scripts from cf4c00cba: | | passed | `ps_bary` | |---|---|---| | `main` cf4c00cba | 96/97 | FAIL, third component 0.9921875 for 0.00390625 | | this change | 97/97 | PASS, 4096/4096 | | this change, `LEONIDA_BARY_FALLBACK=0` | 96/97 | FAIL, same values | Only the fixtures with a committed listing ran (no llvm-mc); `ps_persp_bary` and `ps_ij_computed` are not among them. 100 shaders translate and pass spirv-val in all three runs. `vk_subgroup_info.py` answers `barycentric_fallback: true` for the iGPU and `false` for the RTX 5060 Ti. `tests/test_vk_subgroup_info.py`: 56 OK (the new cases fail without the rule). `test_make_game_wave64`, `test_make_game_translator_flags`, `test_run_gpu_tests`, `test_shader_build_fallbacks` and the `test_docs*` files pass. `check_no_game_data.py` on the changed files: clean. GPUs tested: AMD Radeon(TM) Graphics (Ryzen 7 7700 iGPU), AMD 31.0.22044.1, Windows 10 22H2; NVIDIA RTX 5060 Ti 621.01 (tool answer only) AI-assisted: yes. Claude Code (a Haiku 5.5 subagent wrote the rule and its tests, Claude Opus 5.5 reviewed it and ran the GPU tests). ### 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: no translator rule) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On a Raphael RDNA2 iGPU (Ryzen 7 7700, PCI 1002:164E) under AMD's proprietary Windows driver 31.0.22044.1 (Vulkan driverVersion 2.0.283, driver info and compiler 23.20.44), the GPU test ps_bary reads a wrong third BaryCoordKHR component (0.992 where 0.0039 is expected), and it passes with LEONIDA_BARY_FALLBACK=1. barycentric_fallback now returns true for that PCI ID under VK_DRIVER_ID_AMD_PROPRIETARY only while driverVersion is at most VK_MAKE_VERSION(2, 0, 283); newer drivers, other RDNA2 devices and RADV keep native barycentrics. query() reads driverVersion from VkPhysicalDeviceProperties and passes it on; an unreported version (0) takes no fallback from this rule. LEONIDA_BARY_FALLBACK=0 turns it off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
96 of the 97 tests with a committed listing pass with LEONIDA_PC_TAIL_UBO=1; ps_bary
fails and passes with the barycentric fallback.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:32:03 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 22:10 UTC · original

Reviewed abf92dff: I ran tests/test_vk_subgroup_info.py on the PR tree (56 OK) and on main (54 OK); with the PR's test file copied onto main the new tests fail there, so they cover the new rule. compileall and tests/test_make_game_wave64.py pass on the PR tree. A barycentric_fallback probe on both trees shows the pre-existing cases identical after the change, and the new Raphael rule fires only at/below driverVersion 2.0.283 with the exact device+driver ID, never on None/0; query() JSON keys unchanged. No GPU run was possible; the hardware evidence is the committed results file. No finding. AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 22:10 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/986#issuecomment-7176023566) Reviewed abf92dff: I ran tests/test_vk_subgroup_info.py on the PR tree (56 OK) and on main (54 OK); with the PR's test file copied onto main the new tests fail there, so they cover the new rule. compileall and tests/test_make_game_wave64.py pass on the PR tree. A barycentric_fallback probe on both trees shows the pre-existing cases identical after the change, and the new Raphael rule fires only at/below driverVersion 2.0.283 with the exact device+driver ID, never on None/0; query() JSON keys unchanged. No GPU run was possible; the hardware evidence is the committed results file. No finding. AI-assisted review. **Recommendation:** Merge
tools/vk_subgroup_info.py: main now confirms the per-vertex feature by its extension after a device is chosen; this branch adds the chosen driver version to the same tuple. Both kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠Snooozs on GitHub · 2026-11-26 10:27 UTC · original

Merged main (a73a57e13) into the branch (a90ae5171, no force push) to clear the conflict in tools/vk_subgroup_info.py: main now checks the per-vertex barycentric feature against its extension once a device is chosen, and this branch adds the chosen driver version to the same tuple. Both are kept. tests/test_vk_subgroup_info.py (57 OK), tests/test_make_game_wave64.py and make_game.py --help pass on the merged tree. No GPU run after the merge. AI-assisted (Claude Code).

**@⁠Snooozs** on GitHub · 2026-11-26 10:27 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/986#issuecomment-7189390533) Merged `main` (a73a57e13) into the branch (a90ae5171, no force push) to clear the conflict in `tools/vk_subgroup_info.py`: `main` now checks the per-vertex barycentric feature against its extension once a device is chosen, and this branch adds the chosen driver version to the same tuple. Both are kept. `tests/test_vk_subgroup_info.py` (57 OK), `tests/test_make_game_wave64.py` and `make_game.py --help` pass on the merged tree. No GPU run after the merge. AI-assisted (Claude Code).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/986/head:github-bot/gh-986'
git switch 'github-bot/gh-986'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-986'
git switch 'github-bot/gh-986'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-986'
git switch 'github-bot/gh-986'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-986'
git switch 'main'
git merge --squash 'github-bot/gh-986'
git switch 'main'
git merge --ff-only 'github-bot/gh-986'
git switch 'main'
git merge 'github-bot/gh-986'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.