ShaderOpMult.comp 582 Bytes
Newer Older
mashun1's avatar
v1  
mashun1 committed
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 450

layout(set = 0, binding = 0) buffer tensorLhs {
   float valuesLhs[ ];
};

layout(set = 0, binding = 1) buffer tensorRhs {
   float valuesRhs[ ];
};

layout(set = 0, binding = 2) buffer tensorOutput {
   float valuesOutput[ ];
};

layout (constant_id = 0) const uint LEN_LHS = 0;
layout (constant_id = 1) const uint LEN_RHS = 0;
layout (constant_id = 2) const uint LEN_OUT = 0;

layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

void main() 
{
	uint index = gl_GlobalInvocationID.x;

    valuesOutput[index] = valuesLhs[index] * valuesRhs[index];
}