Repository navigation
gpuav: Allow a runtime coopmat stride in the data race pass - #13104
Merged
spencer-lunarg merged 1 commit intoSep 16, 2026
Merged
Conversation
The Stride operand of OpCooperativeMatrixLoadKHR and OpCooperativeMatrixStoreKHR can be any integer value, but the shared memory data race pass passed it to GetConstantUInt32FromId, which dereferences a null constant when the stride is not a constant. Pipeline creation then crashed for a coopmat load or store on shared memory with a runtime stride. Use the constant path only when the stride is a constant, and otherwise pass the runtime value to the instrumentation function as a uint32. Fixes KhronosGroup#13098
Collaborator
|
Author apollo-2006 not on autobuild list. Waiting for curator authorization before starting CI build. |
spencer-lunarg
approved these changes
Sep 15, 2026
spencer-lunarg
left a comment
Contributor
There was a problem hiding this comment.
If CI is happy and @jeffbolznv is happy, this seems reasonable to me
apollo-2006
marked this pull request as ready for review
September 15, 2026 18:46
Collaborator
|
CI Vulkan-ValidationLayers build queued with queue ID 119586. |
Collaborator
|
CI Vulkan-ValidationLayers build # 24505 running. |
jeffbolznv
approved these changes
Sep 15, 2026
Collaborator
|
CI Vulkan-ValidationLayers build # 24505 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.
Fixes #13098.
SharedMemoryDataRacePasstreated the Stride operand of coopmat load/store as a constant, so a stride computed at runtime madeGetConstantUInt32FromIddereference null and crashvkCreateComputePipelines. SPIR-V only requires MemoryLayout to be a constant; Stride can be any integer.The stride now goes through the existing constant path when it is a constant. Otherwise the runtime value is passed straight to the instrumentation call, with an
OpBitcast(signed 32-bit) orOpUConvert(other widths) to get auint32, the same wayDebugPrintfPasshandles integer arguments.Tests:
StoreBarrierCoopMatLoadRuntimeStrideandCoopMatStoreBarrierLoadRuntimeStrideare copies of the existing coopmat positive tests with a runtime stride. Both crash without this change and pass with it on RADV (RX 9070 XT, Mesa 26.2.2). The rest of*GpuAVSharedMemoryDataRace*is unaffected there (71 passed, 6 skipped, 0 failed).