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

Merged
Snooozs merged 3 commits from upstream-pr/986 into main 2026-11-28 13:08:58 +00:00
Snooozs commented 2026-11-24 16:27:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Snooozs on 2026-11-24T16:27:04Z.


Claimed in the coordination issue as: SHADER-BARY-RAPHAEL-OLD-AMD, TEST-RAPHAEL-7700-OLD-AMD (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7137475906)

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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5476154103 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/986). Originally posted by [Snooozs](https://github.com/Snooozs) on 2026-11-24T16:27:04Z. --- Claimed in the coordination issue as: SHADER-BARY-RAPHAEL-OLD-AMD, TEST-RAPHAEL-7700-OLD-AMD (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7137475906) ### 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)
PierreEbele commented 2026-11-25 22:10:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T22:10:11Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7176023566 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/986#issuecomment-7176023566). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T22:10:11Z. --- 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
Snooozs commented 2026-11-26 10:27:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Snooozs on 2026-11-26T10:27:26Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7189390533 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/986#issuecomment-7189390533). Originally posted by [Snooozs](https://github.com/Snooozs) on 2026-11-26T10:27:26Z. --- 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).
MoonEyes commented 2026-11-28 13:08:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T13:08:54Z.


Red/green: tests/test_vk_subgroup_info.py 105 failed on main, 57 passed with the PR.
Targeted batch of 30 PRs (their tests, the tests importing the changed modules, the docs tests, the translator suite) on main a997a3c: no new failure, Windows 11 / Python.
AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7239727405 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/986#issuecomment-7239727405). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T13:08:54Z. --- Red/green: tests/test_vk_subgroup_info.py 105 failed on main, 57 passed with the PR. Targeted batch of 30 PRs (their tests, the tests importing the changed modules, the docs tests, the translator suite) on main a997a3c: no new failure, Windows 11 / Python. AI-assisted (Claude Code, Claude Opus 5.5)
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!986
No description provided.