#version 450 core #extension GL_KHR_memory_scope_semantics : enable #extension GL_KHR_cooperative_matrix : enable #extension GL_EXT_shader_explicit_arithmetic_types : enable #extension GL_NV_cooperative_matrix2 : enable layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in; layout(constant_id = 0) const uint32_t Clamp = gl_CooperativeMatrixClampModeConstantNV; uint32_t dim; void main() { // The arguments become the type parameters of the result type, so they // must be constants or specialization constants. createTensorLayoutNV(dim); createTensorLayoutNV(dim, gl_CooperativeMatrixClampModeConstantNV); createTensorLayoutNV(2, dim); createTensorViewNV(dim); createTensorViewNV(2, dim == 0, 1, 0); // a specialization constant expression is accepted, as in a declaration createTensorLayoutNV(2, Clamp + 1); }