[PR #2169] [CLOSED] 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) #2171

Closed
opened 2026-11-26 21:20:17 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2169
Author: @Tauwni
Created: 11/26/2026
Status: ❌ Closed

Base: main ← Head: fix/texture-test-array-kind


📝 Commits (1)

  • 6246f5a vk_texture_test: tag index 1 as bound in both sampled arrays it fills (2D and 2D array)

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 runtime/test/vk_texture_test.cpp (+4 -1)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2169 **Author:** [@Tauwni](https://github.com/Tauwni) **Created:** 11/26/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/texture-test-array-kind` --- ### 📝 Commits (1) - [`6246f5a`](https://github.com/ubiquitarianism/leonida/commit/6246f5a3126f9ef5c97e89afe09def45194c12ce) vk_texture_test: tag index 1 as bound in both sampled arrays it fills (2D and 2D array) ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/vk_texture_test.cpp` (+4 -1) </details> ### 📄 Description 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 21:20:17 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#2171
No description provided.