Repository navigation
Conversation
A cube binds as the 6-layer 2D-array view cube_coords already builds for image_sample: the query takes the projected s - 1 and t - 1 (the 2D-array u and v) and does not read the third word (8 * slice + face). a16 packs the three coordinates differently, so a16 cube stays Unsupported. No corpus shader uses cube image_get_lod (705 in the 26,503-shader set: 702 2D, 3 2D array), so no title output changes; a 2,651-shader shard translates to byte-identical .spv before and after. Confirmed by the RDNA2 ISA MIMG GET_LOD form and the existing cube sample mapping (docs/design.md). Tests: tests/semantic/test_image_get_lod_cube.py 5/5 (shape, source VGPRs, face word unread, refusals, spirv-val); full tests/semantic 6,317 tests pass. AI-assisted.
Contributor
|
Tested
The counts are identical to AI-assisted (Claude Code). No game data. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A cube binds as the 6-layer 2D-array view
cube_coordsalready builds forimage_sample: the query takes the projecteds - 1andt - 1(the 2D-array u and v) and does not read the third word (8 * slice + face).a16packs the three coordinates differently, so a16 cube staysUnsupported.No corpus shader uses cube
image_get_lod(705 in the 26,503-shader set: 702 2D, 3 2D array), so no title output changes; a 2,651-shader shard translates to byte-identical.spvbefore and after. Confirmed by the RDNA2 ISA MIMG GET_LOD form and the existing cube sample mapping (docs/design.md).Claimed in the coordination issue as:
IMAGE-GET-LOD-CUBE(#1608).What and why
tools/rdna2spirv.pyrefusedimage_get_lodon every dimension but 2D and 2D array. A cube is the same 6-layer 2D-array viewcube_coordsuses: the hardwaresandtare the projected coordinates in [1, 2] and the third word is 8 * slice + face; the LOD comes from the s/t derivatives, so the translator queriesOpImageQueryLodon%simg2daat(s - 1, t - 1)and does not read the face word. This translation is byte-identical for the existing 2D and 2D-array uses.a16cube remains refused because a16 packs the three coordinates differently.Tested
tests/semantic/test_image_get_lod_cube.py: 5/5 (SPIR-V shape, source VGPRs, face word unread, refusals,spirv-as/spirv-val).tests/semantic: 6,317 tests pass.image_get_lodin the 26,503-shader set (702 2D, 3 2D array); a 2,651-shader shard translated to byte-identical.spvbefore and after.GPUs tested: n/a (translator-only; CPU and
spirv-as/spirv-val, no GPU needed).AI-assisted: yes.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.