blob: d23edcbb89a16fe26a4302d99fcc178a77d7a25a [file] [edit]
#version 460 core
#extension GL_ARM_tensors : enable
#extension GL_EXT_shader_explicit_arithmetic_types : enable
#if !defined GL_ARM_tensors
# error GL_ARM_tensors is not defined
#elif GL_ARM_tensors != 1
# error GL_ARM_tensors is not equal to 1
#endif
#if !defined GL_ARM_tensors_bfloat16
# error GL_ARM_tensors_bfloat16 is not defined
#elif GL_ARM_tensors_bfloat16 != 1
# error GL_ARM_tensors_bfloat16 is not equal to 1
#endif
#if !defined GL_ARM_tensors_float_e5m2
# error GL_ARM_tensors_float_e5m2 is not defined
#elif GL_ARM_tensors_float_e5m2 != 1
# error GL_ARM_tensors_float_e5m2 is not equal to 1
#endif
#if !defined GL_ARM_tensors_float_e4m3
# error GL_ARM_tensors_float_e4m3 is not defined
#elif GL_ARM_tensors_float_e4m3 != 1
# error GL_ARM_tensors_float_e4m3 is not equal to 1
#endif
layout(binding = 0) uniform tensorARM<int32_t, 4> t;
layout(set = 0, binding = 1) uniform tensorARM<bool, 2> tb;
void main()
{
bool b;
bool barr[4];
int32_t i32;
int32_t vec[2];
int32_t vecthree[3];
int32_t vecfour[4];
tensorReadARM(tb, uint[](0, 0), b);
tensorReadARM(tb, uint[](0, 0), barr);
tensorReadARM(t, uint[](0,0,0,0), i32, gl_TensorOperandsOutOfBoundsValueARM, 33);
tensorReadARM(t, uint[](1,2,3,4), vec);
tensorReadARM(t, uint[](3,2,1,0), vecthree);
tensorReadARM(t, uint[](99,99,99,99), vecfour);
tensorWriteARM(tb, uint[](0, 0), b);
tensorWriteARM(tb, uint[](0, 0), barr);
tensorWriteARM(t, uint[](4,3,2,1), i32);
tensorWriteARM(t, uint[](0,0,0,0), vec, gl_TensorOperandsNonTemporalARM);
}