mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 11:30:06 +00:00
022aea431c
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.
21 lines
576 B
Plaintext
21 lines
576 B
Plaintext
#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);
|
|
}
|