1 #ifndef MSP_GL_SL_SPIRVCONSTANTS_H_
2 #define MSP_GL_SL_SPIRVCONSTANTS_H_
10 SPIRV_MAGIC = 0x07230203,
11 SPIRV_MAGIC_REVERSED = 0x03022307,
12 SPIRV_GENERATOR_MSP = 29
20 OP_EXT_INST_IMPORT = 11,
24 OP_EXECUTION_MODE = 16,
33 OP_TYPE_SAMPLED_IMAGE = 27,
35 OP_TYPE_RUNTIME_ARRAY = 29,
38 OP_TYPE_FUNCTION = 33,
39 OP_CONSTANT_TRUE = 41,
40 OP_CONSTANT_FALSE = 42,
42 OP_CONSTANT_COMPOSITE = 44,
43 OP_SPEC_CONSTANT_TRUE = 48,
44 OP_SPEC_CONSTANT_FALSE = 49,
45 OP_SPEC_CONSTANT = 50,
46 OP_SPEC_CONSTANT_COMPOSITE = 51,
47 OP_SPEC_CONSTANT_OP = 52,
49 OP_FUNCTION_PARAMETER = 55,
51 OP_FUNCTION_CALL = 57,
57 OP_MEMBER_DECORATE = 72,
58 OP_VECTOR_SHUFFLE = 79,
59 OP_COMPOSITE_CONSTRUCT = 80,
60 OP_COMPOSITE_EXTRACT = 81,
62 OP_IMAGE_SAMPLE_IMPLICIT_LOD = 87,
63 OP_IMAGE_SAMPLE_EXPLICIT_LOD = 88,
64 OP_IMAGE_SAMPLE_DREF_IMPLICIT_LOD = 89,
65 OP_IMAGE_SAMPLE_DREF_EXPLICIT_LOD = 89,
70 OP_IMAGE_QUERY_SIZE_LOD = 103,
71 OP_IMAGE_QUERY_SIZE = 104,
72 OP_IMAGE_QUERY_LOD = 105,
73 OP_IMAGE_QUERY_LEVELS = 106,
74 OP_IMAGE_QUERY_SAMPLES = 107,
75 OP_CONVERT_F_TO_U = 109,
76 OP_CONVERT_F_TO_S = 110,
77 OP_CONVERT_S_TO_F = 111,
78 OP_CONVERT_U_TO_F = 112,
94 OP_VECTOR_TIMES_SCALAR = 142,
95 OP_MATRIX_TIMES_SCALAR = 143,
96 OP_VECTOR_TIMES_MATRIX = 144,
97 OP_MATRIX_TIMES_VECTOR = 145,
98 OP_MATRIX_TIMES_MATRIX = 146,
99 OP_OUTER_PRODUCT = 147,
105 OP_LOGICAL_EQUAL = 164,
106 OP_LOGICAL_NOT_EQUAL = 165,
108 OP_LOGICAL_AND = 167,
109 OP_LOGICAL_NOT = 168,
112 OP_I_NOT_EQUAL = 171,
113 OP_U_GREATER_THAN = 172,
114 OP_S_GREATER_THAN = 173,
115 OP_U_GREATER_THAN_EQUAL = 174,
116 OP_S_GREATER_THAN_EQUAL = 175,
117 OP_U_LESS_THAN = 176,
118 OP_S_LESS_THAN = 177,
119 OP_U_LESS_THAN_EQUAL = 178,
120 OP_S_LESS_THAN_EQUAL = 179,
121 OP_F_ORD_EQUAL = 180,
122 OP_F_ORD_NOT_EQUAL = 182,
123 OP_F_ORD_LESS_THAN = 184,
124 OP_F_ORD_GREATER_THAN = 186,
125 OP_F_ORD_LESS_THAN_EQUAL = 188,
126 OP_F_ORD_GREATER_THAN_EQUAL = 190,
127 OP_SHIFT_RIGHT_ARITHMETIC = 195,
128 OP_SHIFT_LEFT_LOGICAL = 196,
130 OP_BITWISE_XOR = 198,
131 OP_BITWISE_AND = 199,
133 OP_BIT_FIELD_INSERT = 201,
134 OP_BIT_FIELD_S_EXTRACT = 202,
135 OP_BIT_FIELD_U_EXTRACT = 203,
136 OP_BIT_REVERSE = 204,
143 OP_FWIDTH_FINE = 212,
144 OP_DP_DX_COARSE = 213,
145 OP_DP_DY_COARSE = 214,
146 OP_FWIDTH_COARSE = 215,
147 OP_EMIT_VERTEX = 218,
148 OP_END_PRIMITIVE = 219,
151 OP_SELECTION_MERGE = 247,
154 OP_BRANCH_CONDITIONAL = 250,
157 OP_RETURN_VALUE = 254,
165 CAP_TESSELLATION = 3,
166 CAP_STORAGE_IMAGE_MULTISAMPLE = 27,
167 CAP_IMAGE_CUBE_ARRAY = 34,
170 CAP_SAMPLED_CUBE_ARRAY = 45,
171 CAP_STORAGE_IMAGE_EXTENDED_FORMATS = 49,
172 CAP_IMAGE_QUERY = 50,
173 CAP_DERIVATIVE_CONTROL = 51,
174 CAP_INTERPOLATION_FUNCTION = 52
177 enum SpirVExecutionMode
179 EXEC_INVOCATIONS = 0,
180 EXEC_SPACING_EQUAL = 1,
181 EXEC_SPACING_FRACTIONAL_EVEN = 2,
182 EXEC_SPACING_FRACTIONAL_ODD = 3,
183 EXEC_VERTEX_ORDER_CW = 4,
184 EXEC_VERTEX_ORDER_CCW = 5,
185 EXEC_ORIGIN_UPPER_LEFT = 7,
186 EXEC_ORIGIN_LOWER_LEFT = 8,
187 EXEC_LOCAL_SIZE = 17,
188 EXEC_INPUT_POINTS = 19,
189 EXEC_INPUT_LINES = 20,
190 EXEC_INPUT_LINES_ADJACENCY = 21,
192 EXEC_INPUT_TRIANGLES_ADJACENCY = 23,
195 EXEC_OUTPUT_VERTICES = 26,
196 EXEC_OUTPUT_POINTS = 27,
197 EXEC_OUTPUT_LINE_STRIP = 28,
198 EXEC_OUTPUT_TRIANGLE_STRIP = 29
201 enum SpirVStorageClass
203 STORAGE_UNIFORM_CONSTANT = 0,
208 STORAGE_FUNCTION = 7,
209 STORAGE_PUSH_CONSTANT = 9
218 DECO_ARRAY_STRIDE = 6,
219 DECO_MATRIX_STRIDE = 7,
226 DECO_DESCRIPTOR_SET = 34,
232 BUILTIN_POSITION = 0,
233 BUILTIN_POINT_SIZE = 1,
234 BUILTIN_CLIP_DISTANCE = 3,
235 BUILTIN_VERTEX_ID = 5,
236 BUILTIN_INSTANCE_ID = 6,
237 BUILTIN_PRIMITIVE_ID = 7,
238 BUILTIN_INVOCATION_ID = 8,
240 BUILTIN_TESS_LEVEL_OUTER = 11,
241 BUILTIN_TESS_LEVEL_INNER = 12,
242 BUILTIN_TESS_COORD = 13,
243 BUILTIN_PATCH_VERTICES = 14,
244 BUILTIN_FRAG_COORD = 15,
245 BUILTIN_POINT_COORD = 16,
246 BUILTIN_FRONT_FACING = 17,
247 BUILTIN_SAMPLE_ID = 18,
248 BUILTIN_SAMPLE_POSITION = 19,
249 BUILTIN_FRAG_DEPTH = 22,
250 BUILTIN_NUM_WORKGROUPS = 24,
251 BUILTIN_WORKGROUP_SIZE = 25,
252 BUILTIN_WORKGROUP_ID = 26,
253 BUILTIN_LOCAL_INVOCATION_ID = 27,
254 BUILTIN_GLOBAL_INVOCATION_ID = 28,
255 BUILTIN_LOCAL_INVOCATION_INDEX = 29
265 FORMAT_RGBA8_SNORM = 5,
274 FORMAT_RGBA16_SNORM = 16,
275 FORMAT_RG16_SNORM = 17,
276 FORMAT_RG8_SNORM = 18,
277 FORMAT_R16_SNORM = 19,
281 enum SpirVGlslStd450Opcode
284 GLSL450_ROUND_EVEN = 2,
293 GLSL450_RADIANS = 11,
294 GLSL450_DEGREES = 12,
314 GLSL450_INVERSE_SQRT = 32,
315 GLSL450_DETERMINANT = 33,
316 GLSL450_MATRIX_INVERSE = 34,
323 GLSL450_F_CLAMP = 43,
324 GLSL450_U_CLAMP = 44,
325 GLSL450_S_CLAMP = 45,
328 GLSL450_F_SMOOTH_STEP = 49,
331 GLSL450_DISTANCE = 67,
333 GLSL450_NORMALIZE = 69,
334 GLSL450_FACE_FORWARD = 70,
335 GLSL450_REFLECT = 71,
336 GLSL450_REFRACT = 72,
337 GLSL450_FIND_I_LSB = 73,
338 GLSL450_FIND_S_MSB = 74,
339 GLSL450_FIND_U_MSB = 75,
340 GLSL450_INTERPOLATE_AT_CENTROID = 76,
341 GLSL450_INTERPOLATE_AT_SAMPLE = 77,
342 GLSL450_INTERPOLATE_AT_OFFSET = 78