#version 460 core #extension GL_ARM_tensors : enable uniform tensorARM t; void main() { // Type checking should render these accesses invalid int i = 33; float w = 1.5; tensorWriteARM(t, uint[](0,0), i); tensorWriteARM(t, uint[](0,0), w); float r; tensorReadARM(t, uint[](0,0), i); tensorReadARM(t, uint[](0,0), r); // Signed vs unsigned. uint u = 34; tensorReadARM(t, uint[](0), u); tensorWriteARM(t, uint[](0), u); // OutOfBounds value is only valid with tensorReadARM. tensorWriteARM(t, uint[](1), i, gl_TensorOperandsOutOfBoundsValueARM, 14); // OutOfBounds value must be provided. tensorReadARM(t, uint[](1), i, gl_TensorOperandsOutOfBoundsValueARM); // OutOfBounds value must be constant. tensorReadARM(t, uint[](2), i, gl_TensorOperandsOutOfBoundsValueARM, i); // OutOfBounds value type must match tensor element type. tensorReadARM(t, uint[](3), i, gl_TensorOperandsOutOfBoundsValueARM, 3.14); // OutOfBounds value type must match tensor element type. tensorReadARM(t, uint[](3), i, gl_TensorOperandsOutOfBoundsValueARM, 3u); }