File: spv.replicatespec.comp

package info (click to toggle)
glslang 16.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,084 kB
  • sloc: cpp: 90,714; yacc: 4,243; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (43 lines) | stat: -rw-r--r-- 1,253 bytes parent folder | download | duplicates (6)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#version 450 core
#extension GL_KHR_memory_scope_semantics : enable
#extension GL_KHR_cooperative_matrix : enable
#extension GL_EXT_spec_constant_composites : enable

#pragma use_replicated_composites

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

layout(constant_id = 1) const int csix = 6;
struct S { int a; int b; int c; };
struct SS { S s1; S s2; };
const S cs = S(csix, csix, csix);
const SS css = SS(cs, cs);

layout(constant_id = 2) const float spec_float = 3;
const vec4 cv = vec4(spec_float);
const mat4 cm = mat4(cv,cv,cv,cv);

layout(constant_id = 0) const int cfive = 5;
const int carr[3] = {cfive, cfive, cfive};
const int carr2[3][3] = {carr, carr, carr};

const coopmat<float, gl_ScopeSubgroup, 16, 16, gl_MatrixUseA> ccoop = coopmat<float, gl_ScopeSubgroup, 16, 16, gl_MatrixUseA>(spec_float);

void main()
{
    coopmat<float, gl_ScopeSubgroup, 16, 16, gl_MatrixUseA> coop = coopmat<float, gl_ScopeSubgroup, 16, 16, gl_MatrixUseA>(1.0);

    float a = 2.0;
    vec4 v = vec4(a);
    v = cv;
    mat4 m = mat4(v,v,v,v);

    int five = 5;
    int six = 6;
    int arr[3] = {five, five, five};
    int arr2[3][3] = {arr, arr, arr};
    arr2 = carr2;

    S s2 = S(six, six, six);
    SS ss = SS(s2, s2);
}