yum-mirror/glslang

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

Sven van HaastregtAdd GL_ARM_tensorse9d166cd

main
1.1 KiB35 linesraw
1#version 460 core
2
3#extension GL_ARM_tensors : enable
4
5readonly layout(set=0, binding=1) uniform tensorARM<int, 2> roTens;
6writeonly layout(set=0, binding=0) uniform tensorARM<int, 2> woTens;
7readonly writeonly layout(set=0, binding=1) uniform tensorARM<int, 2> rowoTens;
8layout(set=0, binding=2) uniform tensorARM<int, 2> rwTens;
9shared uint x;
10
11void main() {
12  // tensorSizeARM should be callable with any tensor regardless of access qualifiers.
13  x = 0;
14  x += tensorSizeARM(roTens, 0);
15  x += tensorSizeARM(woTens, 0);
16  x += tensorSizeARM(rowoTens, 1);
17  x += tensorSizeARM(rwTens, 1);
18
19  int d = 4;
20  // Valid tensorWriteARM calls.
21  tensorWriteARM(woTens, uint[](0, 0), d);
22  tensorWriteARM(rwTens, uint[](0, 0), d);
23
24  // Invalid tensorWriteARM calls.
25  tensorWriteARM(rowoTens, uint[](0, 0), d);
26  tensorWriteARM(roTens, uint[](0, 0), d);
27
28  // Valid tensorReadARM calls.
29  tensorReadARM(roTens, uint[](0, 0), d);
30  tensorReadARM(rwTens, uint[](0, 0), d);
31
32  // Invalid tensorReadARM calls.
33  tensorReadARM(rowoTens, uint[](0, 0), d);
34  tensorReadARM(woTens, uint[](0, 0), d);
35}