Skip to content

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 into
ProjectLeonida:mainfrom
Tauwni:fix/texture-test-array-kind
Closed

Tauwni wants to merge 1 commit into
ProjectLeonida:mainfrom
Tauwni:fix/texture-test-array-kind

Conversation

@Tauwni

@Tauwni Tauwni commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

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

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:

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

… (2D and 2D array)

Since ProjectLeonida#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 <noreply@anthropic.com>
@aslan2142

Copy link
Copy Markdown
Collaborator

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 added a commit that referenced this pull request Nov 26, 2026
vk_texture_test: tag index 1 as bound in both sampled arrays it fills (TEST-TEXTURE-ARRAY-KIND, carries #2169)
@aslan2142

Copy link
Copy Markdown
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants