Repository navigation
gpuav: Use Pointer type size for coopmat stride - #13276
Merged
spencer-lunarg merged 1 commit intoOct 1, 2026
Merged
Conversation
Collaborator
|
Author apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build. |
Stride and the element index of OpCooperativeMatrixLoadKHR and OpCooperativeMatrixStoreKHR are in units of the type Pointer points to, not the matrix component type. GPU-AV used the component size in the 08986 alignment check and the 06936 bounds check, so a uint8 matrix loaded from a uvec4 array reported a false 08986, and a uint32 matrix loaded from a uint8 array hid real misalignment.
spencer-lunarg
force-pushed
the
gpuav-coopmat-align-units
branch
from
October 1, 2026 16:19
fc1b91e to
8764b12
Compare
Collaborator
|
Author apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build. |
Collaborator
|
CI Vulkan-ValidationLayers build queued with queue ID 139710. |
spencer-lunarg
approved these changes
Oct 1, 2026
Collaborator
|
CI Vulkan-ValidationLayers build # 24759 running. |
Collaborator
|
CI Vulkan-ValidationLayers build # 24759 passed. |
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.
Ran into this on RADV. Per SPV_KHR_cooperative_matrix Issue 8, coopmat Stride and element index are in units of the pointed-to type, but GPU-AV was using the matrix component size in both the 08986 alignment check and the 06936 bounds check.
That's what was breaking two tests on RADV:
NegativeGpuAVDescriptorClassGeneralBufferCoopMat.ElementSizegot a false 08986 (uint8 matrix atuvec4[]element 33 is byte 528, not 33)..Load's shader is actually misaligned, and the wrong units were hiding it.While in there, I noticed
GetLastByte's runtime-stride path was overwritingsum_idand dropping the access chain offset, so I fixed that too.Now Stride and the element index use the pointee size, and everything else still uses the component size. Untyped pointers keep the old behavior.
I updated
Load,DynamicStride, andDynamicElementto match, and addedPositiveGpuAVShaderSanitizer.CoopMatAlignedVectorElement. On RADV, the full*GpuAV*run only changes those two tests plus the new one. I haven't looked atvec3arrays (ArrayStride 16 vs size 12) yet.