Repository navigation
fix(agc): bind a 2D storage access to a 2D array surface as its first layer - #131
Merged
boykopovar merged 1 commit intoOct 1, 2026
Merged
Conversation
8 of 9 tasks
oneandonlydean
force-pushed
the
fix/agc-2d-over-array-storage
branch
from
September 30, 2026 11:12
cb53c42 to
443309e
Compare
This was referenced Sep 30, 2026
9 tasks done
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
oneandonlydean
force-pushed
the
fix/agc-2d-over-array-storage
branch
from
September 30, 2026 19:48
443309e to
fbe9ad0
Compare
… layer
A compute shader addressing an image with MIMG DIM 2D over a T# of type 2D
array was refused ("guest storage texture dimension disagrees with the
shader's declared image shape"). Such an access carries no slice
coordinate, so the hardware reads and writes slice 0 of the resource view,
which is the BASE_ARRAY layer of the surface.
The storage element is now bound through a 2D view of that layer of the
surface's shared storage image (StorageTexture::FirstLayerView, created on
demand per mip and released with the image). Every other shape/dimension
mismatch still throws, and both mismatch messages now name the shape and
the dimension.
The recorder test device sets formatProperties, which storage images need
to pick their Vulkan format.
boykopovar
force-pushed
the
fix/agc-2d-over-array-storage
branch
from
October 1, 2026 07:36
fbe9ad0 to
edb1358
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
A compute shader that addresses an image with MIMG DIM 2D over a T# of type 2D array was refused with "guest storage texture dimension disagrees with the shader's declared image shape". That access has no slice coordinate, so the hardware reads and writes slice 0 of the resource view, which is the surface's BASE_ARRAY layer.
The storage element is now bound through a 2D view of that one layer of the surface's shared storage image.
StorageTexture::FirstLayerViewcreates it on demand for each mip, caches it, and releases it with the image. The storage image cache key already includes BASE_ARRAY and the dimension, so the layer is always the descriptor's own. Every other shape/dimension mismatch, sampled or storage, still throws. Both messages now name the shape and the dimension.The recorder test device now sets
formatProperties, which aStorageTextureneeds to pick its Vulkan format. No test on main had built one yet.This PR and the MIN_LOD PR (feat/agc-texture-min-lod) add the same
SampleLod.comptest shader, the same CMake rule and the sameSampleProgramtest helper. Whichever merges second hits a small conflict intests/Recorder.cppnext to the helper, where the two test functions sit side by side.Tested
agc_driver_recorder_testsgetsfirstLayerViewTests. It fills three layers of a linear 2D array surface with different values, builds its storage image with BASE_ARRAY 1, samplesFirstLayerView(0)and checks it reads layer 1. It also checks the view is reused. Main has no such view, so the test doesn't build there.ctest: 57/57 pass.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