Bump github/codeql-action from 3.27.1 to 3.27.4
[glslang.git] / Test / glsl.450.subgroupQuad.comp
blob223a7cdacc21a7dfb643ee3773debc811028c599
1 #version 450\r
2 \r
3 #extension GL_KHR_shader_subgroup_quad: enable\r
4 \r
5 layout (local_size_x = 8) in;\r
6 \r
7 layout(binding = 0) buffer Buffers\r
8 {\r
9     vec4  f4;\r
10     ivec4 i4;\r
11     uvec4 u4;\r
12     dvec4 d4;\r
13 } data[4];\r
15 void main()\r
16 {\r
17     uint invocation = (gl_SubgroupInvocationID + gl_SubgroupSize) % 4;\r
19     data[invocation].f4.x   = subgroupQuadBroadcast(data[0].f4.x, 1);\r
20     data[invocation].f4.xy  = subgroupQuadBroadcast(data[1].f4.xy, 1);\r
21     data[invocation].f4.xyz = subgroupQuadBroadcast(data[2].f4.xyz, 1);\r
22     data[invocation].f4     = subgroupQuadBroadcast(data[3].f4, 1);\r
24     data[invocation].i4.x   = subgroupQuadBroadcast(data[0].i4.x, 1);\r
25     data[invocation].i4.xy  = subgroupQuadBroadcast(data[1].i4.xy, 1);\r
26     data[invocation].i4.xyz = subgroupQuadBroadcast(data[2].i4.xyz, 1);\r
27     data[invocation].i4     = subgroupQuadBroadcast(data[3].i4, 1);\r
29     data[invocation].u4.x   = subgroupQuadBroadcast(data[0].u4.x, 1);\r
30     data[invocation].u4.xy  = subgroupQuadBroadcast(data[1].u4.xy, 1);\r
31     data[invocation].u4.xyz = subgroupQuadBroadcast(data[2].u4.xyz, 1);\r
32     data[invocation].u4     = subgroupQuadBroadcast(data[3].u4, 1);\r
34     data[invocation].d4.x   = subgroupQuadBroadcast(data[0].d4.x, 1);\r
35     data[invocation].d4.xy  = subgroupQuadBroadcast(data[1].d4.xy, 1);\r
36     data[invocation].d4.xyz = subgroupQuadBroadcast(data[2].d4.xyz, 1);\r
37     data[invocation].d4     = subgroupQuadBroadcast(data[3].d4, 1);\r
39     data[invocation].i4.x   =   int(subgroupQuadBroadcast(data[0].i4.x < 0, 1));\r
40     data[invocation].i4.xy  = ivec2(subgroupQuadBroadcast(lessThan(data[1].i4.xy, ivec2(0)), 1));\r
41     data[invocation].i4.xyz = ivec3(subgroupQuadBroadcast(lessThan(data[1].i4.xyz, ivec3(0)), 1));\r
42     data[invocation].i4     = ivec4(subgroupQuadBroadcast(lessThan(data[1].i4, ivec4(0)), 1));\r
44     data[invocation].f4.x   = subgroupQuadSwapHorizontal(data[0].f4.x);\r
45     data[invocation].f4.xy  = subgroupQuadSwapHorizontal(data[1].f4.xy);\r
46     data[invocation].f4.xyz = subgroupQuadSwapHorizontal(data[2].f4.xyz);\r
47     data[invocation].f4     = subgroupQuadSwapHorizontal(data[3].f4);\r
49     data[invocation].i4.x   = subgroupQuadSwapHorizontal(data[0].i4.x);\r
50     data[invocation].i4.xy  = subgroupQuadSwapHorizontal(data[1].i4.xy);\r
51     data[invocation].i4.xyz = subgroupQuadSwapHorizontal(data[2].i4.xyz);\r
52     data[invocation].i4     = subgroupQuadSwapHorizontal(data[3].i4);\r
54     data[invocation].u4.x   = subgroupQuadSwapHorizontal(data[0].u4.x);\r
55     data[invocation].u4.xy  = subgroupQuadSwapHorizontal(data[1].u4.xy);\r
56     data[invocation].u4.xyz = subgroupQuadSwapHorizontal(data[2].u4.xyz);\r
57     data[invocation].u4     = subgroupQuadSwapHorizontal(data[3].u4);\r
59     data[invocation].d4.x   = subgroupQuadSwapHorizontal(data[0].d4.x);\r
60     data[invocation].d4.xy  = subgroupQuadSwapHorizontal(data[1].d4.xy);\r
61     data[invocation].d4.xyz = subgroupQuadSwapHorizontal(data[2].d4.xyz);\r
62     data[invocation].d4     = subgroupQuadSwapHorizontal(data[3].d4);\r
64     data[invocation].i4.x   =   int(subgroupQuadSwapHorizontal(data[0].i4.x < 0));\r
65     data[invocation].i4.xy  = ivec2(subgroupQuadSwapHorizontal(lessThan(data[1].i4.xy, ivec2(0))));\r
66     data[invocation].i4.xyz = ivec3(subgroupQuadSwapHorizontal(lessThan(data[1].i4.xyz, ivec3(0))));\r
67     data[invocation].i4     = ivec4(subgroupQuadSwapHorizontal(lessThan(data[1].i4, ivec4(0))));\r
69     data[invocation].f4.x   = subgroupQuadSwapVertical(data[0].f4.x);\r
70     data[invocation].f4.xy  = subgroupQuadSwapVertical(data[1].f4.xy);\r
71     data[invocation].f4.xyz = subgroupQuadSwapVertical(data[2].f4.xyz);\r
72     data[invocation].f4     = subgroupQuadSwapVertical(data[3].f4);\r
74     data[invocation].i4.x   = subgroupQuadSwapVertical(data[0].i4.x);\r
75     data[invocation].i4.xy  = subgroupQuadSwapVertical(data[1].i4.xy);\r
76     data[invocation].i4.xyz = subgroupQuadSwapVertical(data[2].i4.xyz);\r
77     data[invocation].i4     = subgroupQuadSwapVertical(data[3].i4);\r
79     data[invocation].u4.x   = subgroupQuadSwapVertical(data[0].u4.x);\r
80     data[invocation].u4.xy  = subgroupQuadSwapVertical(data[1].u4.xy);\r
81     data[invocation].u4.xyz = subgroupQuadSwapVertical(data[2].u4.xyz);\r
82     data[invocation].u4     = subgroupQuadSwapVertical(data[3].u4);\r
84     data[invocation].d4.x   = subgroupQuadSwapVertical(data[0].d4.x);\r
85     data[invocation].d4.xy  = subgroupQuadSwapVertical(data[1].d4.xy);\r
86     data[invocation].d4.xyz = subgroupQuadSwapVertical(data[2].d4.xyz);\r
87     data[invocation].d4     = subgroupQuadSwapVertical(data[3].d4);\r
89     data[invocation].i4.x   =   int(subgroupQuadSwapVertical(data[0].i4.x < 0));\r
90     data[invocation].i4.xy  = ivec2(subgroupQuadSwapVertical(lessThan(data[1].i4.xy, ivec2(0))));\r
91     data[invocation].i4.xyz = ivec3(subgroupQuadSwapVertical(lessThan(data[1].i4.xyz, ivec3(0))));\r
92     data[invocation].i4     = ivec4(subgroupQuadSwapVertical(lessThan(data[1].i4, ivec4(0))));\r
94     data[invocation].f4.x   = subgroupQuadSwapDiagonal(data[0].f4.x);\r
95     data[invocation].f4.xy  = subgroupQuadSwapDiagonal(data[1].f4.xy);\r
96     data[invocation].f4.xyz = subgroupQuadSwapDiagonal(data[2].f4.xyz);\r
97     data[invocation].f4     = subgroupQuadSwapDiagonal(data[3].f4);\r
99     data[invocation].i4.x   = subgroupQuadSwapDiagonal(data[0].i4.x);\r
100     data[invocation].i4.xy  = subgroupQuadSwapDiagonal(data[1].i4.xy);\r
101     data[invocation].i4.xyz = subgroupQuadSwapDiagonal(data[2].i4.xyz);\r
102     data[invocation].i4     = subgroupQuadSwapDiagonal(data[3].i4);\r
104     data[invocation].u4.x   = subgroupQuadSwapDiagonal(data[0].u4.x);\r
105     data[invocation].u4.xy  = subgroupQuadSwapDiagonal(data[1].u4.xy);\r
106     data[invocation].u4.xyz = subgroupQuadSwapDiagonal(data[2].u4.xyz);\r
107     data[invocation].u4     = subgroupQuadSwapDiagonal(data[3].u4);\r
109     data[invocation].d4.x   = subgroupQuadSwapDiagonal(data[0].d4.x);\r
110     data[invocation].d4.xy  = subgroupQuadSwapDiagonal(data[1].d4.xy);\r
111     data[invocation].d4.xyz = subgroupQuadSwapDiagonal(data[2].d4.xyz);\r
112     data[invocation].d4     = subgroupQuadSwapDiagonal(data[3].d4);\r
114     data[invocation].i4.x   =   int(subgroupQuadSwapDiagonal(data[0].i4.x < 0));\r
115     data[invocation].i4.xy  = ivec2(subgroupQuadSwapDiagonal(lessThan(data[1].i4.xy, ivec2(0))));\r
116     data[invocation].i4.xyz = ivec3(subgroupQuadSwapDiagonal(lessThan(data[1].i4.xyz, ivec3(0))));\r
117     data[invocation].i4     = ivec4(subgroupQuadSwapDiagonal(lessThan(data[1].i4, ivec4(0))));\r