File: spv.tensorARM.declare.comp

package info (click to toggle)
glslang 16.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,720 kB
  • sloc: cpp: 92,305; yacc: 4,320; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (28 lines) | stat: -rw-r--r-- 884 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#version 460 core

#extension GL_ARM_tensors : enable
#extension GL_EXT_shader_explicit_arithmetic_types : enable

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);
}