blob: d6d370aea72749210c37929efbfcfb671c782f23 [file] [log] [blame]
Rex Xu430ef402016-10-14 17:22:23 +08001#version 450
2
3#extension GL_ARB_gpu_shader_int64: enable
4#extension GL_AMD_gpu_shader_half_float: enable
5#extension GL_AMD_shader_ballot: enable
6
7layout (local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
8
9layout(binding = 0) buffer Buffers
10{
11 int i;
12 uvec2 uv;
13 vec3 fv;
14 dvec4 dv;
15 int64_t i64;
16 u64vec2 u64v;
17 f16vec3 f16v;
18};
19
20void main()
21{
22 i = minInvocationsAMD(i);
23 uv = minInvocationsAMD(uv);
24 fv = minInvocationsAMD(fv);
25 dv = minInvocationsAMD(dv);
26 i64 = minInvocationsAMD(i64);
27 u64v = minInvocationsAMD(u64v);
28 f16v = minInvocationsAMD(f16v);
29
30 i = maxInvocationsAMD(i);
31 uv = maxInvocationsAMD(uv);
32 fv = maxInvocationsAMD(fv);
33 dv = maxInvocationsAMD(dv);
34 i64 = maxInvocationsAMD(i64);
35 u64v = maxInvocationsAMD(u64v);
36 f16v = maxInvocationsAMD(f16v);
37
38 i = addInvocationsAMD(i);
39 uv = addInvocationsAMD(uv);
40 fv = addInvocationsAMD(fv);
41 dv = addInvocationsAMD(dv);
42 i64 = addInvocationsAMD(i64);
43 u64v = addInvocationsAMD(u64v);
44 f16v = addInvocationsAMD(f16v);
45
46 i = minInvocationsNonUniformAMD(i);
47 uv = minInvocationsNonUniformAMD(uv);
48 fv = minInvocationsNonUniformAMD(fv);
49 dv = minInvocationsNonUniformAMD(dv);
50 i64 = minInvocationsNonUniformAMD(i64);
51 u64v = minInvocationsNonUniformAMD(u64v);
52 f16v = minInvocationsNonUniformAMD(f16v);
53
54 i = maxInvocationsNonUniformAMD(i);
55 uv = maxInvocationsNonUniformAMD(uv);
56 fv = maxInvocationsNonUniformAMD(fv);
57 dv = maxInvocationsNonUniformAMD(dv);
58 i64 = maxInvocationsNonUniformAMD(i64);
59 u64v = maxInvocationsNonUniformAMD(u64v);
60 f16v = maxInvocationsNonUniformAMD(f16v);
61
62 i = addInvocationsNonUniformAMD(i);
63 uv = addInvocationsNonUniformAMD(uv);
64 fv = addInvocationsNonUniformAMD(fv);
65 dv = addInvocationsNonUniformAMD(dv);
66 i64 = addInvocationsNonUniformAMD(i64);
67 u64v = addInvocationsNonUniformAMD(u64v);
68 f16v = addInvocationsNonUniformAMD(f16v);
69
70 i = minInvocationsInclusiveScanAMD(i);
71 uv = minInvocationsInclusiveScanAMD(uv);
72 fv = minInvocationsInclusiveScanAMD(fv);
73 dv = minInvocationsInclusiveScanAMD(dv);
74 i64 = minInvocationsInclusiveScanAMD(i64);
75 u64v = minInvocationsInclusiveScanAMD(u64v);
76 f16v = minInvocationsInclusiveScanAMD(f16v);
77
78 i = maxInvocationsInclusiveScanAMD(i);
79 uv = maxInvocationsInclusiveScanAMD(uv);
80 fv = maxInvocationsInclusiveScanAMD(fv);
81 dv = maxInvocationsInclusiveScanAMD(dv);
82 i64 = maxInvocationsInclusiveScanAMD(i64);
83 u64v = maxInvocationsInclusiveScanAMD(u64v);
84 f16v = maxInvocationsInclusiveScanAMD(f16v);
85
86 i = addInvocationsInclusiveScanAMD(i);
87 uv = addInvocationsInclusiveScanAMD(uv);
88 fv = addInvocationsInclusiveScanAMD(fv);
89 dv = addInvocationsInclusiveScanAMD(dv);
90 i64 = addInvocationsInclusiveScanAMD(i64);
91 u64v = addInvocationsInclusiveScanAMD(u64v);
92 f16v = addInvocationsInclusiveScanAMD(f16v);
93
94 i = minInvocationsExclusiveScanAMD(i);
95 uv = minInvocationsExclusiveScanAMD(uv);
96 fv = minInvocationsExclusiveScanAMD(fv);
97 dv = minInvocationsExclusiveScanAMD(dv);
98 i64 = minInvocationsExclusiveScanAMD(i64);
99 u64v = minInvocationsExclusiveScanAMD(u64v);
100 f16v = minInvocationsExclusiveScanAMD(f16v);
101
102 i = maxInvocationsExclusiveScanAMD(i);
103 uv = maxInvocationsExclusiveScanAMD(uv);
104 fv = maxInvocationsExclusiveScanAMD(fv);
105 dv = maxInvocationsExclusiveScanAMD(dv);
106 i64 = maxInvocationsExclusiveScanAMD(i64);
107 u64v = maxInvocationsExclusiveScanAMD(u64v);
108 f16v = maxInvocationsExclusiveScanAMD(f16v);
109
110 i = addInvocationsExclusiveScanAMD(i);
111 uv = addInvocationsExclusiveScanAMD(uv);
112 fv = addInvocationsExclusiveScanAMD(fv);
113 dv = addInvocationsExclusiveScanAMD(dv);
114 i64 = addInvocationsExclusiveScanAMD(i64);
115 u64v = addInvocationsExclusiveScanAMD(u64v);
116 f16v = addInvocationsExclusiveScanAMD(f16v);
117
118 i = minInvocationsInclusiveScanNonUniformAMD(i);
119 uv = minInvocationsInclusiveScanNonUniformAMD(uv);
120 fv = minInvocationsInclusiveScanNonUniformAMD(fv);
121 dv = minInvocationsInclusiveScanNonUniformAMD(dv);
122 i64 = minInvocationsInclusiveScanNonUniformAMD(i64);
123 u64v = minInvocationsInclusiveScanNonUniformAMD(u64v);
124 f16v = minInvocationsInclusiveScanNonUniformAMD(f16v);
125
126 i = maxInvocationsInclusiveScanNonUniformAMD(i);
127 uv = maxInvocationsInclusiveScanNonUniformAMD(uv);
128 fv = maxInvocationsInclusiveScanNonUniformAMD(fv);
129 dv = maxInvocationsInclusiveScanNonUniformAMD(dv);
130 i64 = maxInvocationsInclusiveScanNonUniformAMD(i64);
131 u64v = maxInvocationsInclusiveScanNonUniformAMD(u64v);
132 f16v = maxInvocationsInclusiveScanNonUniformAMD(f16v);
133
134 i = addInvocationsInclusiveScanNonUniformAMD(i);
135 uv = addInvocationsInclusiveScanNonUniformAMD(uv);
136 fv = addInvocationsInclusiveScanNonUniformAMD(fv);
137 dv = addInvocationsInclusiveScanNonUniformAMD(dv);
138 i64 = addInvocationsInclusiveScanNonUniformAMD(i64);
139 u64v = addInvocationsInclusiveScanNonUniformAMD(u64v);
140 f16v = addInvocationsInclusiveScanNonUniformAMD(f16v);
141
142 i = minInvocationsExclusiveScanNonUniformAMD(i);
143 uv = minInvocationsExclusiveScanNonUniformAMD(uv);
144 fv = minInvocationsExclusiveScanNonUniformAMD(fv);
145 dv = minInvocationsExclusiveScanNonUniformAMD(dv);
146 i64 = minInvocationsExclusiveScanNonUniformAMD(i64);
147 u64v = minInvocationsExclusiveScanNonUniformAMD(u64v);
148 f16v = minInvocationsExclusiveScanNonUniformAMD(f16v);
149
150 i = maxInvocationsExclusiveScanNonUniformAMD(i);
151 uv = maxInvocationsExclusiveScanNonUniformAMD(uv);
152 fv = maxInvocationsExclusiveScanNonUniformAMD(fv);
153 dv = maxInvocationsExclusiveScanNonUniformAMD(dv);
154 i64 = maxInvocationsExclusiveScanNonUniformAMD(i64);
155 u64v = maxInvocationsExclusiveScanNonUniformAMD(u64v);
156 f16v = maxInvocationsExclusiveScanNonUniformAMD(f16v);
157
158 i = addInvocationsExclusiveScanNonUniformAMD(i);
159 uv = addInvocationsExclusiveScanNonUniformAMD(uv);
160 fv = addInvocationsExclusiveScanNonUniformAMD(fv);
161 dv = addInvocationsExclusiveScanNonUniformAMD(dv);
162 i64 = addInvocationsExclusiveScanNonUniformAMD(i64);
163 u64v = addInvocationsExclusiveScanNonUniformAMD(u64v);
164 f16v = addInvocationsExclusiveScanNonUniformAMD(f16v);
165}