yum-mirror/glslang

git clone https://git.yummers.dev/yum-mirror/glslang

Sven van HaastregtAdd GL_ARM_tensorse9d166cd

main
599 B18 linesraw
1#version 450
2#extension GL_ARM_tensors : require
3#extension GL_EXT_shader_explicit_arithmetic_types : require
4
5layout(location = 0) out vec4 outColor;
6
7layout(set=0, binding=0) uniform tensorARM<uint8_t, 3> tens;
8
9void main() {
10    const uint size_d1 = tensorSizeARM(tens, 1);
11    const uint size_d2 = tensorSizeARM(tens, 2);
12    const uint coord_x = uint(gl_FragCoord.x) % size_d1;
13    const uint coord_y = uint(gl_FragCoord.y) % size_d2;
14
15    uint8_t tensorValue = uint8_t(0);
16    tensorReadARM(tens, uint[](coord_y, coord_x, 1), tensorValue);
17    outColor = vec4(0.0, tensorValue, 0.0, 255.0);
18}