vk_texture_test: tag index 1 as bound in both sampled arrays it fills; ps_array_resinfo and ps_get_lod_array pass again (TEST-TEXTURE-ARRAY-KIND) #2169

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

@⁠Tauwni on GitHub · 2026-11-26 01:21 UTC · original
Tauwni:fix/texture-test-array-kind → main · +4 −1 · 1 files · 1 commits · closed without merging

Claimed in the coordination issue as: TEST-TEXTURE-ARRAY-KIND (#1608)

What and why

Since #2098 (9f98dcc61), ps_array_resinfo and ps_get_lod_array fail on main on every driver I have:

FAIL  ps_array_resinfo   4096 pixels differ from (8.0, 8.0, 12.0, 1.0)
FAIL  ps_get_lod_array   S# word 1 c00000: 4096 of 4096 pixels differ from (0.0, 2.0, 0.0, -3.0); first at (0,0): got (0.0, -1.0, 0.0, -6.0)

git bisect between 21d3662ad (both pass) and f1afede5e lands on 9f98dcc61. With --descriptor-table tagged, now the default, a module reads its instruction's array only when the table entry's kind names it, and otherwise reads that array's fallback (a 1x1 image). vk_texture_test binds index 1 in two sampled arrays: images[1] at binding 0 (the 2D view) and the 2D-array images[1] at binding 3 (the view of the two cubes). But #2098 tagged its entry with one bit only: kind_sampled_bit(0), or kind_sampled_bit(1) in cube mode. So the dim:SQ_RSRC_IMG_2D_ARRAY reads of these two fixtures got the fallback.

The fix tags the entry with both bits, which is what the harness actually binds. This is a one-line change in runtime/test/vk_texture_test.cpp, plus a comment. The translator and runtime are unchanged.

Tested

Apple M3, macOS 26.5.1, main f1afede5e plus this commit, test programs rebuilt:

  • run_gpu_tests.py --filter ps_, on MoltenVK 1.4.2, KosmicKrisp and llvmpipe (Mesa 26.3.1): ps_array_resinfo, ps_get_lod_array and ps_cube_sample pass on all three. There is no new failure. The ones left are ps_ssharp on MoltenVK (#1774) and the canonical-NaN pair on KosmicKrisp (#2110).
  • ctest 106/106.

GPUs tested: Apple M3 (10-core GPU), MoltenVK 1.4.2 and KosmicKrisp (Mesa 26.3.1), macOS 26.5.1 (25F80); llvmpipe (Mesa 26.3.1)

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.

🤖 Generated with Claude Code

**@⁠Tauwni** on GitHub · 2026-11-26 01:21 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2169) `Tauwni:fix/texture-test-array-kind` → `main` · +4 −1 · 1 files · 1 commits · closed without merging Claimed in the coordination issue as: TEST-TEXTURE-ARRAY-KIND (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why Since #2098 (`9f98dcc61`), `ps_array_resinfo` and `ps_get_lod_array` fail on `main` on every driver I have: ``` FAIL ps_array_resinfo 4096 pixels differ from (8.0, 8.0, 12.0, 1.0) FAIL ps_get_lod_array S# word 1 c00000: 4096 of 4096 pixels differ from (0.0, 2.0, 0.0, -3.0); first at (0,0): got (0.0, -1.0, 0.0, -6.0) ``` `git bisect` between `21d3662ad` (both pass) and `f1afede5e` lands on `9f98dcc61`. With `--descriptor-table tagged`, now the default, a module reads its instruction's array only when the table entry's kind names it, and otherwise reads that array's fallback (a 1x1 image). `vk_texture_test` binds index 1 in two sampled arrays: `images[1]` at binding 0 (the 2D view) and the 2D-array `images[1]` at binding 3 (the view of the two cubes). But #2098 tagged its entry with one bit only: `kind_sampled_bit(0)`, or `kind_sampled_bit(1)` in `cube` mode. So the `dim:SQ_RSRC_IMG_2D_ARRAY` reads of these two fixtures got the fallback. The fix tags the entry with both bits, which is what the harness actually binds. This is a one-line change in `runtime/test/vk_texture_test.cpp`, plus a comment. The translator and runtime are unchanged. ### Tested Apple M3, macOS 26.5.1, `main` `f1afede5e` plus this commit, test programs rebuilt: - `run_gpu_tests.py --filter ps_`, on MoltenVK 1.4.2, KosmicKrisp and llvmpipe (Mesa 26.3.1): `ps_array_resinfo`, `ps_get_lod_array` and `ps_cube_sample` pass on all three. There is no new failure. The ones left are `ps_ssharp` on MoltenVK (#1774) and the canonical-NaN pair on KosmicKrisp (#2110). - ctest 106/106. GPUs tested: Apple M3 (10-core GPU), MoltenVK 1.4.2 and KosmicKrisp (Mesa 26.3.1), macOS 26.5.1 (25F80); llvmpipe (Mesa 26.3.1) AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Since #2098 a tagged module reads its instruction's array only when the table entry's kind names it. The harness
binds index 1 in images[1] (binding 0) and in the 2D-array images[1] (binding 3), but tagged it 2D only (2D array
in cube mode), so ps_array_resinfo and ps_get_lod_array read the 1x1 fallback on every driver.

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

@⁠aslan2142 on GitHub · 2026-11-26 02:20 UTC · original

Thanks @⁠Tauwni, this is the last of the three fixes for what #2098 broke on main, and your M3 run covers both ps_array_resinfo and ps_get_lod_array.

  • It's still a draft, so I haven't merged it. If nothing is pending on your side, please mark it ready for review and I'll merge it.

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

**@⁠aslan2142** on GitHub · 2026-11-26 02:20 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2169#issuecomment-7180714627) Thanks @⁠Tauwni, this is the last of the three fixes for what #2098 broke on `main`, and your M3 run covers both `ps_array_resinfo` and `ps_get_lod_array`. - It's still a draft, so I haven't merged it. If nothing is pending on your side, please mark it ready for review and I'll merge it. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-26 02:27 UTC · original

Thanks @⁠Tauwni! Your commit landed unchanged through #2177 (merged as 86dc3d86e, with you as its author), since a draft can't be merged and marking it ready wasn't possible from our side. Closing this one as included.

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

**@⁠aslan2142** on GitHub · 2026-11-26 02:27 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2169#issuecomment-7180818213) Thanks @⁠Tauwni! Your commit landed unchanged through #2177 (merged as `86dc3d86e`, with you as its author), since a draft can't be merged and marking it ready wasn't possible from our side. Closing this one as included. AI-assisted (Claude Code, Claude Opus 5.5).

Pull request closed

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