-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExecutionMode.java
333 lines (327 loc) · 15.1 KB
/
ExecutionMode.java
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
package com.destranix.glslang;
public enum ExecutionMode {
ExecutionModeInvocations(Main.EXECUTION_MODE_INVOCATIONS),
ExecutionModeSpacingEqual(Main.EXECUTION_MODE_SPACING_EQUAL),
ExecutionModeSpacingFractionalEven(Main.EXECUTION_MODE_SPACING_FRACTIONAL_EVEN),
ExecutionModeSpacingFractionalOdd(Main.EXECUTION_MODE_SPACING_FRACTIONAL_ODD),
ExecutionModeVertexOrderCw(Main.EXECUTION_MODE_VERTEX_ORDER_CW),
ExecutionModeVertexOrderCcw(Main.EXECUTION_MODE_VERTEX_ORDER_CCW),
ExecutionModePixelCenterInteger(Main.EXECUTION_MODE_PIXEL_CENTER_INTEGER),
ExecutionModeOriginUpperLeft(Main.EXECUTION_MODE_ORIGIN_UPPER_LEFT),
ExecutionModeOriginLowerLeft(Main.EXECUTION_MODE_ORIGIN_LOWER_LEFT),
ExecutionModeEarlyFragmentTests(Main.EXECUTION_MODE_EARLY_FRAGMENT_TESTS),
ExecutionModePointMode(Main.EXECUTION_MODE_POINT_MODE),
ExecutionModeXfb(Main.EXECUTION_MODE_XFB),
ExecutionModeDepthReplacing(Main.EXECUTION_MODE_DEPTH_REPLACING),
ExecutionModeDepthGreater(Main.EXECUTION_MODE_DEPTH_GREATER),
ExecutionModeDepthLess(Main.EXECUTION_MODE_DEPTH_LESS),
ExecutionModeDepthUnchanged(Main.EXECUTION_MODE_DEPTH_UNCHANGED),
ExecutionModeLocalSize(Main.EXECUTION_MODE_LOCAL_SIZE),
ExecutionModeLocalSizeHint(Main.EXECUTION_MODE_LOCAL_SIZE_HINT),
ExecutionModeInputPoints(Main.EXECUTION_MODE_INPUT_POINTS),
ExecutionModeInputLines(Main.EXECUTION_MODE_INPUT_LINES),
ExecutionModeInputLinesAdjacency(Main.EXECUTION_MODE_INPUT_LINES_ADJACENCY),
ExecutionModeTriangles(Main.EXECUTION_MODE_TRIANGLES),
ExecutionModeInputTrianglesAdjacency(Main.EXECUTION_MODE_INPUT_TRIANGLES_ADJACENCY),
ExecutionModeQuads(Main.EXECUTION_MODE_QUADS),
ExecutionModeIsolines(Main.EXECUTION_MODE_ISOLINES),
ExecutionModeOutputVertices(Main.EXECUTION_MODE_OUTPUT_VERTICES),
ExecutionModeOutputPoints(Main.EXECUTION_MODE_OUTPUT_POINTS),
ExecutionModeOutputLineStrip(Main.EXECUTION_MODE_OUTPUT_LINE_STRIP),
ExecutionModeOutputTriangleStrip(Main.EXECUTION_MODE_OUTPUT_TRIANGLE_STRIP),
ExecutionModeVecTypeHint(Main.EXECUTION_MODE_VEC_TYPE_HINT),
ExecutionModeContractionOff(Main.EXECUTION_MODE_CONTRACTION_OFF),
ExecutionModeInitializer(Main.EXECUTION_MODE_INITIALIZER),
ExecutionModeFinalizer(Main.EXECUTION_MODE_FINALIZER),
ExecutionModeSubgroupSize(Main.EXECUTION_MODE_SUBGROUP_SIZE),
ExecutionModeSubgroupsPerWorkgroup(Main.EXECUTION_MODE_SUBGROUPS_PER_WORKGROUP),
ExecutionModeSubgroupsPerWorkgroupId(Main.EXECUTION_MODE_SUBGROUPS_PER_WORKGROUP_ID),
ExecutionModeLocalSizeId(Main.EXECUTION_MODE_LOCAL_SIZE_ID),
ExecutionModeLocalSizeHintId(Main.EXECUTION_MODE_LOCAL_SIZE_HINT_ID),
ExecutionModePostDepthCoverage(Main.EXECUTION_MODE_POST_DEPTH_COVERAGE),
ExecutionModeDenormPreserve(Main.EXECUTION_MODE_DENORM_PRESERVE),
ExecutionModeDenormFlushToZero(Main.EXECUTION_MODE_DENORM_FLUSH_TO_ZERO),
ExecutionModeSignedZeroInfNanPreserve(Main.EXECUTION_MODE_SIGNED_ZERO_INF_NAN_PRESERVE),
ExecutionModeRoundingModeRTE(Main.EXECUTION_MODE_ROUNDING_MODE_RTE),
ExecutionModeRoundingModeRTZ(Main.EXECUTION_MODE_ROUNDING_MODE_RTZ),
ExecutionModeStencilRefReplacingEXT(Main.EXECUTION_MODE_STENCIL_REF_REPLACING_EXT),
ExecutionModeOutputLinesNV(Main.EXECUTION_MODE_OUTPUT_LINES_NV),
ExecutionModeOutputPrimitivesNV(Main.EXECUTION_MODE_OUTPUT_PRIMITIVES_NV),
ExecutionModeDerivativeGroupQuadsNV(Main.EXECUTION_MODE_DERIVATIVE_GROUP_QUADS_NV),
ExecutionModeDerivativeGroupLinearNV(Main.EXECUTION_MODE_DERIVATIVE_GROUP_LINEAR_NV),
ExecutionModeOutputTrianglesNV(Main.EXECUTION_MODE_OUTPUT_TRIANGLES_NV),
ExecutionModePixelInterlockOrderedEXT(Main.EXECUTION_MODE_PIXEL_INTERLOCK_ORDERED_EXT),
ExecutionModePixelInterlockUnorderedEXT(Main.EXECUTION_MODE_PIXEL_INTERLOCK_UNORDERED_EXT),
ExecutionModeSampleInterlockOrderedEXT(Main.EXECUTION_MODE_SAMPLE_INTERLOCK_ORDERED_EXT),
ExecutionModeSampleInterlockUnorderedEXT(Main.EXECUTION_MODE_SAMPLE_INTERLOCK_UNORDERED_EXT),
ExecutionModeShadingRateInterlockOrderedEXT(Main.EXECUTION_MODE_SHADING_RATE_INTERLOCK_ORDERED_EXT),
ExecutionModeShadingRateInterlockUnorderedEXT(Main.EXECUTION_MODE_SHADING_RATE_INTERLOCK_UNORDERED_EXT),
ExecutionModeMaxWorkgroupSizeINTEL(Main.EXECUTION_MODE_MAX_WORKGROUP_SIZE_INTEL),
ExecutionModeMaxWorkDimINTEL(Main.EXECUTION_MODE_MAX_WORK_DIM_INTEL),
ExecutionModeNoGlobalOffsetINTEL(Main.EXECUTION_MODE_NO_GLOBAL_OFFSET_INTEL),
ExecutionModeNumSIMDWorkitemsINTEL(Main.EXECUTION_MODE_NUM_SIMD_WORKITEMS_INTEL),
ExecutionModeMax(Main.EXECUTION_MODE_MAX);
private final int value;
private ExecutionMode(int value) {
this.value = value;
}
public int getConstant() {
return this.value;
}
public static ExecutionMode valueByStr(String str) {
switch (str) {
case "ExecutionModeInvocations":
return ExecutionModeInvocations;
case "ExecutionModeSpacingEqual":
return ExecutionModeSpacingEqual;
case "ExecutionModeSpacingFractionalEven":
return ExecutionModeSpacingFractionalEven;
case "ExecutionModeSpacingFractionalOdd":
return ExecutionModeSpacingFractionalOdd;
case "ExecutionModeVertexOrderCw":
return ExecutionModeVertexOrderCw;
case "ExecutionModeVertexOrderCcw":
return ExecutionModeVertexOrderCcw;
case "ExecutionModePixelCenterInteger":
return ExecutionModePixelCenterInteger;
case "ExecutionModeOriginUpperLeft":
return ExecutionModeOriginUpperLeft;
case "ExecutionModeOriginLowerLeft":
return ExecutionModeOriginLowerLeft;
case "ExecutionModeEarlyFragmentTests":
return ExecutionModeEarlyFragmentTests;
case "ExecutionModePointMode":
return ExecutionModePointMode;
case "ExecutionModeXfb":
return ExecutionModeXfb;
case "ExecutionModeDepthReplacing":
return ExecutionModeDepthReplacing;
case "ExecutionModeDepthGreater":
return ExecutionModeDepthGreater;
case "ExecutionModeDepthLess":
return ExecutionModeDepthLess;
case "ExecutionModeDepthUnchanged":
return ExecutionModeDepthUnchanged;
case "ExecutionModeLocalSize":
return ExecutionModeLocalSize;
case "ExecutionModeLocalSizeHint":
return ExecutionModeLocalSizeHint;
case "ExecutionModeInputPoints":
return ExecutionModeInputPoints;
case "ExecutionModeInputLines":
return ExecutionModeInputLines;
case "ExecutionModeInputLinesAdjacency":
return ExecutionModeInputLinesAdjacency;
case "ExecutionModeTriangles":
return ExecutionModeTriangles;
case "ExecutionModeInputTrianglesAdjacency":
return ExecutionModeInputTrianglesAdjacency;
case "ExecutionModeQuads":
return ExecutionModeQuads;
case "ExecutionModeIsolines":
return ExecutionModeIsolines;
case "ExecutionModeOutputVertices":
return ExecutionModeOutputVertices;
case "ExecutionModeOutputPoints":
return ExecutionModeOutputPoints;
case "ExecutionModeOutputLineStrip":
return ExecutionModeOutputLineStrip;
case "ExecutionModeOutputTriangleStrip":
return ExecutionModeOutputTriangleStrip;
case "ExecutionModeVecTypeHint":
return ExecutionModeVecTypeHint;
case "ExecutionModeContractionOff":
return ExecutionModeContractionOff;
case "ExecutionModeInitializer":
return ExecutionModeInitializer;
case "ExecutionModeFinalizer":
return ExecutionModeFinalizer;
case "ExecutionModeSubgroupSize":
return ExecutionModeSubgroupSize;
case "ExecutionModeSubgroupsPerWorkgroup":
return ExecutionModeSubgroupsPerWorkgroup;
case "ExecutionModeSubgroupsPerWorkgroupId":
return ExecutionModeSubgroupsPerWorkgroupId;
case "ExecutionModeLocalSizeId":
return ExecutionModeLocalSizeId;
case "ExecutionModeLocalSizeHintId":
return ExecutionModeLocalSizeHintId;
case "ExecutionModePostDepthCoverage":
return ExecutionModePostDepthCoverage;
case "ExecutionModeDenormPreserve":
return ExecutionModeDenormPreserve;
case "ExecutionModeDenormFlushToZero":
return ExecutionModeDenormFlushToZero;
case "ExecutionModeSignedZeroInfNanPreserve":
return ExecutionModeSignedZeroInfNanPreserve;
case "ExecutionModeRoundingModeRTE":
return ExecutionModeRoundingModeRTE;
case "ExecutionModeRoundingModeRTZ":
return ExecutionModeRoundingModeRTZ;
case "ExecutionModeStencilRefReplacingEXT":
return ExecutionModeStencilRefReplacingEXT;
case "ExecutionModeOutputLinesNV":
return ExecutionModeOutputLinesNV;
case "ExecutionModeOutputPrimitivesNV":
return ExecutionModeOutputPrimitivesNV;
case "ExecutionModeDerivativeGroupQuadsNV":
return ExecutionModeDerivativeGroupQuadsNV;
case "ExecutionModeDerivativeGroupLinearNV":
return ExecutionModeDerivativeGroupLinearNV;
case "ExecutionModeOutputTrianglesNV":
return ExecutionModeOutputTrianglesNV;
case "ExecutionModePixelInterlockOrderedEXT":
return ExecutionModePixelInterlockOrderedEXT;
case "ExecutionModePixelInterlockUnorderedEXT":
return ExecutionModePixelInterlockUnorderedEXT;
case "ExecutionModeSampleInterlockOrderedEXT":
return ExecutionModeSampleInterlockOrderedEXT;
case "ExecutionModeSampleInterlockUnorderedEXT":
return ExecutionModeSampleInterlockUnorderedEXT;
case "ExecutionModeShadingRateInterlockOrderedEXT":
return ExecutionModeShadingRateInterlockOrderedEXT;
case "ExecutionModeShadingRateInterlockUnorderedEXT":
return ExecutionModeShadingRateInterlockUnorderedEXT;
case "ExecutionModeMaxWorkgroupSizeINTEL":
return ExecutionModeMaxWorkgroupSizeINTEL;
case "ExecutionModeMaxWorkDimINTEL":
return ExecutionModeMaxWorkDimINTEL;
case "ExecutionModeNoGlobalOffsetINTEL":
return ExecutionModeNoGlobalOffsetINTEL;
case "ExecutionModeNumSIMDWorkitemsINTEL":
return ExecutionModeNumSIMDWorkitemsINTEL;
case "ExecutionModeMax":
return ExecutionModeMax;
default:
throw new IllegalArgumentException("Cannot translate string into enum value!");
}
}
public static ExecutionMode valueByConstant(int constant) {
switch (constant) {
case Main.EXECUTION_MODE_INVOCATIONS:
return ExecutionModeInvocations;
case Main.EXECUTION_MODE_SPACING_EQUAL:
return ExecutionModeSpacingEqual;
case Main.EXECUTION_MODE_SPACING_FRACTIONAL_EVEN:
return ExecutionModeSpacingFractionalEven;
case Main.EXECUTION_MODE_SPACING_FRACTIONAL_ODD:
return ExecutionModeSpacingFractionalOdd;
case Main.EXECUTION_MODE_VERTEX_ORDER_CW:
return ExecutionModeVertexOrderCw;
case Main.EXECUTION_MODE_VERTEX_ORDER_CCW:
return ExecutionModeVertexOrderCcw;
case Main.EXECUTION_MODE_PIXEL_CENTER_INTEGER:
return ExecutionModePixelCenterInteger;
case Main.EXECUTION_MODE_ORIGIN_UPPER_LEFT:
return ExecutionModeOriginUpperLeft;
case Main.EXECUTION_MODE_ORIGIN_LOWER_LEFT:
return ExecutionModeOriginLowerLeft;
case Main.EXECUTION_MODE_EARLY_FRAGMENT_TESTS:
return ExecutionModeEarlyFragmentTests;
case Main.EXECUTION_MODE_POINT_MODE:
return ExecutionModePointMode;
case Main.EXECUTION_MODE_XFB:
return ExecutionModeXfb;
case Main.EXECUTION_MODE_DEPTH_REPLACING:
return ExecutionModeDepthReplacing;
case Main.EXECUTION_MODE_DEPTH_GREATER:
return ExecutionModeDepthGreater;
case Main.EXECUTION_MODE_DEPTH_LESS:
return ExecutionModeDepthLess;
case Main.EXECUTION_MODE_DEPTH_UNCHANGED:
return ExecutionModeDepthUnchanged;
case Main.EXECUTION_MODE_LOCAL_SIZE:
return ExecutionModeLocalSize;
case Main.EXECUTION_MODE_LOCAL_SIZE_HINT:
return ExecutionModeLocalSizeHint;
case Main.EXECUTION_MODE_INPUT_POINTS:
return ExecutionModeInputPoints;
case Main.EXECUTION_MODE_INPUT_LINES:
return ExecutionModeInputLines;
case Main.EXECUTION_MODE_INPUT_LINES_ADJACENCY:
return ExecutionModeInputLinesAdjacency;
case Main.EXECUTION_MODE_TRIANGLES:
return ExecutionModeTriangles;
case Main.EXECUTION_MODE_INPUT_TRIANGLES_ADJACENCY:
return ExecutionModeInputTrianglesAdjacency;
case Main.EXECUTION_MODE_QUADS:
return ExecutionModeQuads;
case Main.EXECUTION_MODE_ISOLINES:
return ExecutionModeIsolines;
case Main.EXECUTION_MODE_OUTPUT_VERTICES:
return ExecutionModeOutputVertices;
case Main.EXECUTION_MODE_OUTPUT_POINTS:
return ExecutionModeOutputPoints;
case Main.EXECUTION_MODE_OUTPUT_LINE_STRIP:
return ExecutionModeOutputLineStrip;
case Main.EXECUTION_MODE_OUTPUT_TRIANGLE_STRIP:
return ExecutionModeOutputTriangleStrip;
case Main.EXECUTION_MODE_VEC_TYPE_HINT:
return ExecutionModeVecTypeHint;
case Main.EXECUTION_MODE_CONTRACTION_OFF:
return ExecutionModeContractionOff;
case Main.EXECUTION_MODE_INITIALIZER:
return ExecutionModeInitializer;
case Main.EXECUTION_MODE_FINALIZER:
return ExecutionModeFinalizer;
case Main.EXECUTION_MODE_SUBGROUP_SIZE:
return ExecutionModeSubgroupSize;
case Main.EXECUTION_MODE_SUBGROUPS_PER_WORKGROUP:
return ExecutionModeSubgroupsPerWorkgroup;
case Main.EXECUTION_MODE_SUBGROUPS_PER_WORKGROUP_ID:
return ExecutionModeSubgroupsPerWorkgroupId;
case Main.EXECUTION_MODE_LOCAL_SIZE_ID:
return ExecutionModeLocalSizeId;
case Main.EXECUTION_MODE_LOCAL_SIZE_HINT_ID:
return ExecutionModeLocalSizeHintId;
case Main.EXECUTION_MODE_POST_DEPTH_COVERAGE:
return ExecutionModePostDepthCoverage;
case Main.EXECUTION_MODE_DENORM_PRESERVE:
return ExecutionModeDenormPreserve;
case Main.EXECUTION_MODE_DENORM_FLUSH_TO_ZERO:
return ExecutionModeDenormFlushToZero;
case Main.EXECUTION_MODE_SIGNED_ZERO_INF_NAN_PRESERVE:
return ExecutionModeSignedZeroInfNanPreserve;
case Main.EXECUTION_MODE_ROUNDING_MODE_RTE:
return ExecutionModeRoundingModeRTE;
case Main.EXECUTION_MODE_ROUNDING_MODE_RTZ:
return ExecutionModeRoundingModeRTZ;
case Main.EXECUTION_MODE_STENCIL_REF_REPLACING_EXT:
return ExecutionModeStencilRefReplacingEXT;
case Main.EXECUTION_MODE_OUTPUT_LINES_NV:
return ExecutionModeOutputLinesNV;
case Main.EXECUTION_MODE_OUTPUT_PRIMITIVES_NV:
return ExecutionModeOutputPrimitivesNV;
case Main.EXECUTION_MODE_DERIVATIVE_GROUP_QUADS_NV:
return ExecutionModeDerivativeGroupQuadsNV;
case Main.EXECUTION_MODE_DERIVATIVE_GROUP_LINEAR_NV:
return ExecutionModeDerivativeGroupLinearNV;
case Main.EXECUTION_MODE_OUTPUT_TRIANGLES_NV:
return ExecutionModeOutputTrianglesNV;
case Main.EXECUTION_MODE_PIXEL_INTERLOCK_ORDERED_EXT:
return ExecutionModePixelInterlockOrderedEXT;
case Main.EXECUTION_MODE_PIXEL_INTERLOCK_UNORDERED_EXT:
return ExecutionModePixelInterlockUnorderedEXT;
case Main.EXECUTION_MODE_SAMPLE_INTERLOCK_ORDERED_EXT:
return ExecutionModeSampleInterlockOrderedEXT;
case Main.EXECUTION_MODE_SAMPLE_INTERLOCK_UNORDERED_EXT:
return ExecutionModeSampleInterlockUnorderedEXT;
case Main.EXECUTION_MODE_SHADING_RATE_INTERLOCK_ORDERED_EXT:
return ExecutionModeShadingRateInterlockOrderedEXT;
case Main.EXECUTION_MODE_SHADING_RATE_INTERLOCK_UNORDERED_EXT:
return ExecutionModeShadingRateInterlockUnorderedEXT;
case Main.EXECUTION_MODE_MAX_WORKGROUP_SIZE_INTEL:
return ExecutionModeMaxWorkgroupSizeINTEL;
case Main.EXECUTION_MODE_MAX_WORK_DIM_INTEL:
return ExecutionModeMaxWorkDimINTEL;
case Main.EXECUTION_MODE_NO_GLOBAL_OFFSET_INTEL:
return ExecutionModeNoGlobalOffsetINTEL;
case Main.EXECUTION_MODE_NUM_SIMD_WORKITEMS_INTEL:
return ExecutionModeNumSIMDWorkitemsINTEL;
case Main.EXECUTION_MODE_MAX:
return ExecutionModeMax;
default:
throw new IllegalArgumentException("Cannot translate constant into enum value!");
}
}
}