Repository navigation
fix(agc): sample a 2D instruction over a 2D array texture through its first layer - #181
Merged
boykopovar merged 1 commit intoOct 1, 2026
Conversation
This was referenced Sep 30, 2026
oneandonlydean
force-pushed
the
fix/agc-sample-2d-over-array
branch
from
September 30, 2026 19:48
3da5558 to
05dba97
Compare
… first layer A shader sampling with MIMG DIM 2D over a T# of type 2D array was refused: "guest texture dimension disagrees with the shader's declared image shape (shape 1, dimension 2)". The access carries no slice coordinate, so the hardware samples slice 0 of the resource view, the BASE_ARRAY layer, as it does for the storage access of the previous commit. A 2D array Texture now also makes a 2D view of that layer (Texture::FirstLayerView), whether it holds its own snapshot or views the surface's storage image, and the sampled binding uses it for such an access. Every other shape/dimension mismatch still throws.
oneandonlydean
force-pushed
the
fix/agc-sample-2d-over-array
branch
from
October 1, 2026 07:58
05dba97 to
74abc7a
Compare
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.
What
Follow-up to #131 (merged); rebased onto current
main, so this branch is now the one commit on top of it.#131 binds a 2D storage access to a 2D array surface as the surface's first layer. The sampled path had the same gap: a shader sampling with MIMG DIM 2D over a T# of type 2D array was refused with "guest texture dimension disagrees with the shader's declared image shape (shape 1, dimension 2)". The access carries no slice coordinate, so the hardware samples slice 0 of the resource view, the BASE_ARRAY layer.
A 2D array
Texturenow also makes a 2D view of that layer (Texture::FirstLayerView), both for a texture that holds its own snapshot and for one that views the surface's storage image. The view is created with the full view and released with it.resolveImageBindingaccepts exactly this case (2D shape over a 2D array dimension) and binds the first-layer view; every other shape/dimension mismatch still throws.In PPSA21564 a compute shader samples a 2D array texture this way from the intro's warp effect on; the dispatch was skipped every time.
If #130 (MIN_LOD) merges first, the first-layer view picks up its
VkImageViewMinLodCreateInfoEXTthrough the copied create info, since it is created while the full view's chain is still alive.Tested
firstLayerViewTestsinagc_driver_recorder_tests(from fix(agc): bind a 2D storage access to a 2D array surface as its first layer #131) now also samples a 2D array snapshot texture and a sampled view of a 2D array storage image throughFirstLayerView()and checks both read the BASE_ARRAY layer, and checks that a 2D texture has no first-layer view. Without the view creation the test fails with "a sampled 2D array texture has no first-layer view"; on fix(agc): bind a 2D storage access to a 2D array surface as its first layer #131 alone it does not build (noTexture::FirstLayerView).ctest: 85/85 pass on current main with this branch.agc_driver_recorder_testsandagc_driver_graphics_testspass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository