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
Tauwni wants to merge 1 commit from upstream-pr/2169 into main
Tauwni commented 2026-11-26 01:21:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-26T01:21:14Z.


Claimed in the coordination issue as: TEST-TEXTURE-ARRAY-KIND (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7179684580)

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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5502188631 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2169). Originally posted by [Tauwni](https://github.com/Tauwni) on 2026-11-26T01:21:14Z. --- Claimed in the coordination issue as: TEST-TEXTURE-ARRAY-KIND (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7179684580) ### 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)
aslan2142 commented 2026-11-26 02:20:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-26T02:20:46Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7180714627 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2169#issuecomment-7180714627). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-26T02:20:46Z. --- 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 commented 2026-11-26 02:27:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-26T02:27:14Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7180818213 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2169#issuecomment-7180818213). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-26T02:27:14Z. --- 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

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