Fix issues of the interaction between cooperative_matrix and spirv_intrinsics
coopmat<> type definition allows type parameters. To make it accept types defined by spirv_type directive, we add spirvType info to the type parameters. This change is to support this case. And a test is added to show the missing usage.
This commit is contained in:
parent
10ee92feb0
commit
022aea431c
7 changed files with 1136 additions and 1022 deletions
20
Test/spv.intrinsicsInteractWithCoopMat.comp
Normal file
20
Test/spv.intrinsicsInteractWithCoopMat.comp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#version 450 core
|
||||
#pragma use_vulkan_memory_model
|
||||
|
||||
#extension GL_KHR_memory_scope_semantics : enable
|
||||
#extension GL_KHR_cooperative_matrix : enable
|
||||
#extension GL_EXT_spirv_intrinsics : enable
|
||||
|
||||
layout(local_size_x = 32, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set=0, binding=0, std430) buffer Buf { uvec4 x[]; } buf;
|
||||
|
||||
#define ELT_SIZE 16
|
||||
#define half spirv_type(capabilities=[9], id = 22, 16)
|
||||
|
||||
coopmat<half, gl_ScopeSubgroup, 16, 16, gl_MatrixUseA> A;
|
||||
|
||||
void main() {
|
||||
coopMatLoad(A, buf.x, 0, ELT_SIZE / 8, 0);
|
||||
coopMatStore(A, buf.x, 64, 4, 0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue