spirv: Bump the SPIR-V header to the latest public version
[mesa.git] / src / compiler / spirv / spirv.h
1 /*
2 ** Copyright (c) 2014-2017 The Khronos Group Inc.
3 **
4 ** Permission is hereby granted, free of charge, to any person obtaining a copy
5 ** of this software and/or associated documentation files (the "Materials"),
6 ** to deal in the Materials without restriction, including without limitation
7 ** the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 ** and/or sell copies of the Materials, and to permit persons to whom the
9 ** Materials are furnished to do so, subject to the following conditions:
10 **
11 ** The above copyright notice and this permission notice shall be included in
12 ** all copies or substantial portions of the Materials.
13 **
14 ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
15 ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
16 ** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
17 **
18 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 ** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 ** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
24 ** IN THE MATERIALS.
25 */
26
27 /*
28 ** This header is automatically generated by the same tool that creates
29 ** the Binary Section of the SPIR-V specification.
30 */
31
32 /*
33 ** Enumeration tokens for SPIR-V, in various styles:
34 ** C, C++, C++11, JSON, Lua, Python
35 **
36 ** - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
37 ** - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
38 ** - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
39 ** - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
40 ** - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
41 **
42 ** Some tokens act like mask values, which can be OR'd together,
43 ** while others are mutually exclusive. The mask-like ones have
44 ** "Mask" in their name, and a parallel enum that has the shift
45 ** amount (1 << x) for each corresponding enumerant.
46 */
47
48 #ifndef spirv_H
49 #define spirv_H
50
51 typedef unsigned int SpvId;
52
53 #define SPV_VERSION 0x10100
54 #define SPV_REVISION 6
55
56 static const unsigned int SpvMagicNumber = 0x07230203;
57 static const unsigned int SpvVersion = 0x00010100;
58 static const unsigned int SpvRevision = 6;
59 static const unsigned int SpvOpCodeMask = 0xffff;
60 static const unsigned int SpvWordCountShift = 16;
61
62 typedef enum SpvSourceLanguage_ {
63 SpvSourceLanguageUnknown = 0,
64 SpvSourceLanguageESSL = 1,
65 SpvSourceLanguageGLSL = 2,
66 SpvSourceLanguageOpenCL_C = 3,
67 SpvSourceLanguageOpenCL_CPP = 4,
68 SpvSourceLanguageMax = 0x7fffffff,
69 } SpvSourceLanguage;
70
71 typedef enum SpvExecutionModel_ {
72 SpvExecutionModelVertex = 0,
73 SpvExecutionModelTessellationControl = 1,
74 SpvExecutionModelTessellationEvaluation = 2,
75 SpvExecutionModelGeometry = 3,
76 SpvExecutionModelFragment = 4,
77 SpvExecutionModelGLCompute = 5,
78 SpvExecutionModelKernel = 6,
79 SpvExecutionModelMax = 0x7fffffff,
80 } SpvExecutionModel;
81
82 typedef enum SpvAddressingModel_ {
83 SpvAddressingModelLogical = 0,
84 SpvAddressingModelPhysical32 = 1,
85 SpvAddressingModelPhysical64 = 2,
86 SpvAddressingModelMax = 0x7fffffff,
87 } SpvAddressingModel;
88
89 typedef enum SpvMemoryModel_ {
90 SpvMemoryModelSimple = 0,
91 SpvMemoryModelGLSL450 = 1,
92 SpvMemoryModelOpenCL = 2,
93 SpvMemoryModelMax = 0x7fffffff,
94 } SpvMemoryModel;
95
96 typedef enum SpvExecutionMode_ {
97 SpvExecutionModeInvocations = 0,
98 SpvExecutionModeSpacingEqual = 1,
99 SpvExecutionModeSpacingFractionalEven = 2,
100 SpvExecutionModeSpacingFractionalOdd = 3,
101 SpvExecutionModeVertexOrderCw = 4,
102 SpvExecutionModeVertexOrderCcw = 5,
103 SpvExecutionModePixelCenterInteger = 6,
104 SpvExecutionModeOriginUpperLeft = 7,
105 SpvExecutionModeOriginLowerLeft = 8,
106 SpvExecutionModeEarlyFragmentTests = 9,
107 SpvExecutionModePointMode = 10,
108 SpvExecutionModeXfb = 11,
109 SpvExecutionModeDepthReplacing = 12,
110 SpvExecutionModeDepthGreater = 14,
111 SpvExecutionModeDepthLess = 15,
112 SpvExecutionModeDepthUnchanged = 16,
113 SpvExecutionModeLocalSize = 17,
114 SpvExecutionModeLocalSizeHint = 18,
115 SpvExecutionModeInputPoints = 19,
116 SpvExecutionModeInputLines = 20,
117 SpvExecutionModeInputLinesAdjacency = 21,
118 SpvExecutionModeTriangles = 22,
119 SpvExecutionModeInputTrianglesAdjacency = 23,
120 SpvExecutionModeQuads = 24,
121 SpvExecutionModeIsolines = 25,
122 SpvExecutionModeOutputVertices = 26,
123 SpvExecutionModeOutputPoints = 27,
124 SpvExecutionModeOutputLineStrip = 28,
125 SpvExecutionModeOutputTriangleStrip = 29,
126 SpvExecutionModeVecTypeHint = 30,
127 SpvExecutionModeContractionOff = 31,
128 SpvExecutionModeInitializer = 33,
129 SpvExecutionModeFinalizer = 34,
130 SpvExecutionModeSubgroupSize = 35,
131 SpvExecutionModeSubgroupsPerWorkgroup = 36,
132 SpvExecutionModeMax = 0x7fffffff,
133 } SpvExecutionMode;
134
135 typedef enum SpvStorageClass_ {
136 SpvStorageClassUniformConstant = 0,
137 SpvStorageClassInput = 1,
138 SpvStorageClassUniform = 2,
139 SpvStorageClassOutput = 3,
140 SpvStorageClassWorkgroup = 4,
141 SpvStorageClassCrossWorkgroup = 5,
142 SpvStorageClassPrivate = 6,
143 SpvStorageClassFunction = 7,
144 SpvStorageClassGeneric = 8,
145 SpvStorageClassPushConstant = 9,
146 SpvStorageClassAtomicCounter = 10,
147 SpvStorageClassImage = 11,
148 SpvStorageClassMax = 0x7fffffff,
149 } SpvStorageClass;
150
151 typedef enum SpvDim_ {
152 SpvDim1D = 0,
153 SpvDim2D = 1,
154 SpvDim3D = 2,
155 SpvDimCube = 3,
156 SpvDimRect = 4,
157 SpvDimBuffer = 5,
158 SpvDimSubpassData = 6,
159 SpvDimMax = 0x7fffffff,
160 } SpvDim;
161
162 typedef enum SpvSamplerAddressingMode_ {
163 SpvSamplerAddressingModeNone = 0,
164 SpvSamplerAddressingModeClampToEdge = 1,
165 SpvSamplerAddressingModeClamp = 2,
166 SpvSamplerAddressingModeRepeat = 3,
167 SpvSamplerAddressingModeRepeatMirrored = 4,
168 SpvSamplerAddressingModeMax = 0x7fffffff,
169 } SpvSamplerAddressingMode;
170
171 typedef enum SpvSamplerFilterMode_ {
172 SpvSamplerFilterModeNearest = 0,
173 SpvSamplerFilterModeLinear = 1,
174 SpvSamplerFilterModeMax = 0x7fffffff,
175 } SpvSamplerFilterMode;
176
177 typedef enum SpvImageFormat_ {
178 SpvImageFormatUnknown = 0,
179 SpvImageFormatRgba32f = 1,
180 SpvImageFormatRgba16f = 2,
181 SpvImageFormatR32f = 3,
182 SpvImageFormatRgba8 = 4,
183 SpvImageFormatRgba8Snorm = 5,
184 SpvImageFormatRg32f = 6,
185 SpvImageFormatRg16f = 7,
186 SpvImageFormatR11fG11fB10f = 8,
187 SpvImageFormatR16f = 9,
188 SpvImageFormatRgba16 = 10,
189 SpvImageFormatRgb10A2 = 11,
190 SpvImageFormatRg16 = 12,
191 SpvImageFormatRg8 = 13,
192 SpvImageFormatR16 = 14,
193 SpvImageFormatR8 = 15,
194 SpvImageFormatRgba16Snorm = 16,
195 SpvImageFormatRg16Snorm = 17,
196 SpvImageFormatRg8Snorm = 18,
197 SpvImageFormatR16Snorm = 19,
198 SpvImageFormatR8Snorm = 20,
199 SpvImageFormatRgba32i = 21,
200 SpvImageFormatRgba16i = 22,
201 SpvImageFormatRgba8i = 23,
202 SpvImageFormatR32i = 24,
203 SpvImageFormatRg32i = 25,
204 SpvImageFormatRg16i = 26,
205 SpvImageFormatRg8i = 27,
206 SpvImageFormatR16i = 28,
207 SpvImageFormatR8i = 29,
208 SpvImageFormatRgba32ui = 30,
209 SpvImageFormatRgba16ui = 31,
210 SpvImageFormatRgba8ui = 32,
211 SpvImageFormatR32ui = 33,
212 SpvImageFormatRgb10a2ui = 34,
213 SpvImageFormatRg32ui = 35,
214 SpvImageFormatRg16ui = 36,
215 SpvImageFormatRg8ui = 37,
216 SpvImageFormatR16ui = 38,
217 SpvImageFormatR8ui = 39,
218 SpvImageFormatMax = 0x7fffffff,
219 } SpvImageFormat;
220
221 typedef enum SpvImageChannelOrder_ {
222 SpvImageChannelOrderR = 0,
223 SpvImageChannelOrderA = 1,
224 SpvImageChannelOrderRG = 2,
225 SpvImageChannelOrderRA = 3,
226 SpvImageChannelOrderRGB = 4,
227 SpvImageChannelOrderRGBA = 5,
228 SpvImageChannelOrderBGRA = 6,
229 SpvImageChannelOrderARGB = 7,
230 SpvImageChannelOrderIntensity = 8,
231 SpvImageChannelOrderLuminance = 9,
232 SpvImageChannelOrderRx = 10,
233 SpvImageChannelOrderRGx = 11,
234 SpvImageChannelOrderRGBx = 12,
235 SpvImageChannelOrderDepth = 13,
236 SpvImageChannelOrderDepthStencil = 14,
237 SpvImageChannelOrdersRGB = 15,
238 SpvImageChannelOrdersRGBx = 16,
239 SpvImageChannelOrdersRGBA = 17,
240 SpvImageChannelOrdersBGRA = 18,
241 SpvImageChannelOrderABGR = 19,
242 SpvImageChannelOrderMax = 0x7fffffff,
243 } SpvImageChannelOrder;
244
245 typedef enum SpvImageChannelDataType_ {
246 SpvImageChannelDataTypeSnormInt8 = 0,
247 SpvImageChannelDataTypeSnormInt16 = 1,
248 SpvImageChannelDataTypeUnormInt8 = 2,
249 SpvImageChannelDataTypeUnormInt16 = 3,
250 SpvImageChannelDataTypeUnormShort565 = 4,
251 SpvImageChannelDataTypeUnormShort555 = 5,
252 SpvImageChannelDataTypeUnormInt101010 = 6,
253 SpvImageChannelDataTypeSignedInt8 = 7,
254 SpvImageChannelDataTypeSignedInt16 = 8,
255 SpvImageChannelDataTypeSignedInt32 = 9,
256 SpvImageChannelDataTypeUnsignedInt8 = 10,
257 SpvImageChannelDataTypeUnsignedInt16 = 11,
258 SpvImageChannelDataTypeUnsignedInt32 = 12,
259 SpvImageChannelDataTypeHalfFloat = 13,
260 SpvImageChannelDataTypeFloat = 14,
261 SpvImageChannelDataTypeUnormInt24 = 15,
262 SpvImageChannelDataTypeUnormInt101010_2 = 16,
263 SpvImageChannelDataTypeMax = 0x7fffffff,
264 } SpvImageChannelDataType;
265
266 typedef enum SpvImageOperandsShift_ {
267 SpvImageOperandsBiasShift = 0,
268 SpvImageOperandsLodShift = 1,
269 SpvImageOperandsGradShift = 2,
270 SpvImageOperandsConstOffsetShift = 3,
271 SpvImageOperandsOffsetShift = 4,
272 SpvImageOperandsConstOffsetsShift = 5,
273 SpvImageOperandsSampleShift = 6,
274 SpvImageOperandsMinLodShift = 7,
275 SpvImageOperandsMax = 0x7fffffff,
276 } SpvImageOperandsShift;
277
278 typedef enum SpvImageOperandsMask_ {
279 SpvImageOperandsMaskNone = 0,
280 SpvImageOperandsBiasMask = 0x00000001,
281 SpvImageOperandsLodMask = 0x00000002,
282 SpvImageOperandsGradMask = 0x00000004,
283 SpvImageOperandsConstOffsetMask = 0x00000008,
284 SpvImageOperandsOffsetMask = 0x00000010,
285 SpvImageOperandsConstOffsetsMask = 0x00000020,
286 SpvImageOperandsSampleMask = 0x00000040,
287 SpvImageOperandsMinLodMask = 0x00000080,
288 } SpvImageOperandsMask;
289
290 typedef enum SpvFPFastMathModeShift_ {
291 SpvFPFastMathModeNotNaNShift = 0,
292 SpvFPFastMathModeNotInfShift = 1,
293 SpvFPFastMathModeNSZShift = 2,
294 SpvFPFastMathModeAllowRecipShift = 3,
295 SpvFPFastMathModeFastShift = 4,
296 SpvFPFastMathModeMax = 0x7fffffff,
297 } SpvFPFastMathModeShift;
298
299 typedef enum SpvFPFastMathModeMask_ {
300 SpvFPFastMathModeMaskNone = 0,
301 SpvFPFastMathModeNotNaNMask = 0x00000001,
302 SpvFPFastMathModeNotInfMask = 0x00000002,
303 SpvFPFastMathModeNSZMask = 0x00000004,
304 SpvFPFastMathModeAllowRecipMask = 0x00000008,
305 SpvFPFastMathModeFastMask = 0x00000010,
306 } SpvFPFastMathModeMask;
307
308 typedef enum SpvFPRoundingMode_ {
309 SpvFPRoundingModeRTE = 0,
310 SpvFPRoundingModeRTZ = 1,
311 SpvFPRoundingModeRTP = 2,
312 SpvFPRoundingModeRTN = 3,
313 SpvFPRoundingModeMax = 0x7fffffff,
314 } SpvFPRoundingMode;
315
316 typedef enum SpvLinkageType_ {
317 SpvLinkageTypeExport = 0,
318 SpvLinkageTypeImport = 1,
319 SpvLinkageTypeMax = 0x7fffffff,
320 } SpvLinkageType;
321
322 typedef enum SpvAccessQualifier_ {
323 SpvAccessQualifierReadOnly = 0,
324 SpvAccessQualifierWriteOnly = 1,
325 SpvAccessQualifierReadWrite = 2,
326 SpvAccessQualifierMax = 0x7fffffff,
327 } SpvAccessQualifier;
328
329 typedef enum SpvFunctionParameterAttribute_ {
330 SpvFunctionParameterAttributeZext = 0,
331 SpvFunctionParameterAttributeSext = 1,
332 SpvFunctionParameterAttributeByVal = 2,
333 SpvFunctionParameterAttributeSret = 3,
334 SpvFunctionParameterAttributeNoAlias = 4,
335 SpvFunctionParameterAttributeNoCapture = 5,
336 SpvFunctionParameterAttributeNoWrite = 6,
337 SpvFunctionParameterAttributeNoReadWrite = 7,
338 SpvFunctionParameterAttributeMax = 0x7fffffff,
339 } SpvFunctionParameterAttribute;
340
341 typedef enum SpvDecoration_ {
342 SpvDecorationRelaxedPrecision = 0,
343 SpvDecorationSpecId = 1,
344 SpvDecorationBlock = 2,
345 SpvDecorationBufferBlock = 3,
346 SpvDecorationRowMajor = 4,
347 SpvDecorationColMajor = 5,
348 SpvDecorationArrayStride = 6,
349 SpvDecorationMatrixStride = 7,
350 SpvDecorationGLSLShared = 8,
351 SpvDecorationGLSLPacked = 9,
352 SpvDecorationCPacked = 10,
353 SpvDecorationBuiltIn = 11,
354 SpvDecorationNoPerspective = 13,
355 SpvDecorationFlat = 14,
356 SpvDecorationPatch = 15,
357 SpvDecorationCentroid = 16,
358 SpvDecorationSample = 17,
359 SpvDecorationInvariant = 18,
360 SpvDecorationRestrict = 19,
361 SpvDecorationAliased = 20,
362 SpvDecorationVolatile = 21,
363 SpvDecorationConstant = 22,
364 SpvDecorationCoherent = 23,
365 SpvDecorationNonWritable = 24,
366 SpvDecorationNonReadable = 25,
367 SpvDecorationUniform = 26,
368 SpvDecorationSaturatedConversion = 28,
369 SpvDecorationStream = 29,
370 SpvDecorationLocation = 30,
371 SpvDecorationComponent = 31,
372 SpvDecorationIndex = 32,
373 SpvDecorationBinding = 33,
374 SpvDecorationDescriptorSet = 34,
375 SpvDecorationOffset = 35,
376 SpvDecorationXfbBuffer = 36,
377 SpvDecorationXfbStride = 37,
378 SpvDecorationFuncParamAttr = 38,
379 SpvDecorationFPRoundingMode = 39,
380 SpvDecorationFPFastMathMode = 40,
381 SpvDecorationLinkageAttributes = 41,
382 SpvDecorationNoContraction = 42,
383 SpvDecorationInputAttachmentIndex = 43,
384 SpvDecorationAlignment = 44,
385 SpvDecorationMaxByteOffset = 45,
386 SpvDecorationOverrideCoverageNV = 5248,
387 SpvDecorationPassthroughNV = 5250,
388 SpvDecorationViewportRelativeNV = 5252,
389 SpvDecorationSecondaryViewportRelativeNV = 5256,
390 SpvDecorationMax = 0x7fffffff,
391 } SpvDecoration;
392
393 typedef enum SpvBuiltIn_ {
394 SpvBuiltInPosition = 0,
395 SpvBuiltInPointSize = 1,
396 SpvBuiltInClipDistance = 3,
397 SpvBuiltInCullDistance = 4,
398 SpvBuiltInVertexId = 5,
399 SpvBuiltInInstanceId = 6,
400 SpvBuiltInPrimitiveId = 7,
401 SpvBuiltInInvocationId = 8,
402 SpvBuiltInLayer = 9,
403 SpvBuiltInViewportIndex = 10,
404 SpvBuiltInTessLevelOuter = 11,
405 SpvBuiltInTessLevelInner = 12,
406 SpvBuiltInTessCoord = 13,
407 SpvBuiltInPatchVertices = 14,
408 SpvBuiltInFragCoord = 15,
409 SpvBuiltInPointCoord = 16,
410 SpvBuiltInFrontFacing = 17,
411 SpvBuiltInSampleId = 18,
412 SpvBuiltInSamplePosition = 19,
413 SpvBuiltInSampleMask = 20,
414 SpvBuiltInFragDepth = 22,
415 SpvBuiltInHelperInvocation = 23,
416 SpvBuiltInNumWorkgroups = 24,
417 SpvBuiltInWorkgroupSize = 25,
418 SpvBuiltInWorkgroupId = 26,
419 SpvBuiltInLocalInvocationId = 27,
420 SpvBuiltInGlobalInvocationId = 28,
421 SpvBuiltInLocalInvocationIndex = 29,
422 SpvBuiltInWorkDim = 30,
423 SpvBuiltInGlobalSize = 31,
424 SpvBuiltInEnqueuedWorkgroupSize = 32,
425 SpvBuiltInGlobalOffset = 33,
426 SpvBuiltInGlobalLinearId = 34,
427 SpvBuiltInSubgroupSize = 36,
428 SpvBuiltInSubgroupMaxSize = 37,
429 SpvBuiltInNumSubgroups = 38,
430 SpvBuiltInNumEnqueuedSubgroups = 39,
431 SpvBuiltInSubgroupId = 40,
432 SpvBuiltInSubgroupLocalInvocationId = 41,
433 SpvBuiltInVertexIndex = 42,
434 SpvBuiltInInstanceIndex = 43,
435 SpvBuiltInSubgroupEqMaskKHR = 4416,
436 SpvBuiltInSubgroupGeMaskKHR = 4417,
437 SpvBuiltInSubgroupGtMaskKHR = 4418,
438 SpvBuiltInSubgroupLeMaskKHR = 4419,
439 SpvBuiltInSubgroupLtMaskKHR = 4420,
440 SpvBuiltInBaseVertex = 4424,
441 SpvBuiltInBaseInstance = 4425,
442 SpvBuiltInDrawIndex = 4426,
443 SpvBuiltInDeviceIndex = 4438,
444 SpvBuiltInViewIndex = 4440,
445 SpvBuiltInViewportMaskNV = 5253,
446 SpvBuiltInSecondaryPositionNV = 5257,
447 SpvBuiltInSecondaryViewportMaskNV = 5258,
448 SpvBuiltInPositionPerViewNV = 5261,
449 SpvBuiltInViewportMaskPerViewNV = 5262,
450 SpvBuiltInMax = 0x7fffffff,
451 } SpvBuiltIn;
452
453 typedef enum SpvSelectionControlShift_ {
454 SpvSelectionControlFlattenShift = 0,
455 SpvSelectionControlDontFlattenShift = 1,
456 SpvSelectionControlMax = 0x7fffffff,
457 } SpvSelectionControlShift;
458
459 typedef enum SpvSelectionControlMask_ {
460 SpvSelectionControlMaskNone = 0,
461 SpvSelectionControlFlattenMask = 0x00000001,
462 SpvSelectionControlDontFlattenMask = 0x00000002,
463 } SpvSelectionControlMask;
464
465 typedef enum SpvLoopControlShift_ {
466 SpvLoopControlUnrollShift = 0,
467 SpvLoopControlDontUnrollShift = 1,
468 SpvLoopControlDependencyInfiniteShift = 2,
469 SpvLoopControlDependencyLengthShift = 3,
470 SpvLoopControlMax = 0x7fffffff,
471 } SpvLoopControlShift;
472
473 typedef enum SpvLoopControlMask_ {
474 SpvLoopControlMaskNone = 0,
475 SpvLoopControlUnrollMask = 0x00000001,
476 SpvLoopControlDontUnrollMask = 0x00000002,
477 SpvLoopControlDependencyInfiniteMask = 0x00000004,
478 SpvLoopControlDependencyLengthMask = 0x00000008,
479 } SpvLoopControlMask;
480
481 typedef enum SpvFunctionControlShift_ {
482 SpvFunctionControlInlineShift = 0,
483 SpvFunctionControlDontInlineShift = 1,
484 SpvFunctionControlPureShift = 2,
485 SpvFunctionControlConstShift = 3,
486 SpvFunctionControlMax = 0x7fffffff,
487 } SpvFunctionControlShift;
488
489 typedef enum SpvFunctionControlMask_ {
490 SpvFunctionControlMaskNone = 0,
491 SpvFunctionControlInlineMask = 0x00000001,
492 SpvFunctionControlDontInlineMask = 0x00000002,
493 SpvFunctionControlPureMask = 0x00000004,
494 SpvFunctionControlConstMask = 0x00000008,
495 } SpvFunctionControlMask;
496
497 typedef enum SpvMemorySemanticsShift_ {
498 SpvMemorySemanticsAcquireShift = 1,
499 SpvMemorySemanticsReleaseShift = 2,
500 SpvMemorySemanticsAcquireReleaseShift = 3,
501 SpvMemorySemanticsSequentiallyConsistentShift = 4,
502 SpvMemorySemanticsUniformMemoryShift = 6,
503 SpvMemorySemanticsSubgroupMemoryShift = 7,
504 SpvMemorySemanticsWorkgroupMemoryShift = 8,
505 SpvMemorySemanticsCrossWorkgroupMemoryShift = 9,
506 SpvMemorySemanticsAtomicCounterMemoryShift = 10,
507 SpvMemorySemanticsImageMemoryShift = 11,
508 SpvMemorySemanticsMax = 0x7fffffff,
509 } SpvMemorySemanticsShift;
510
511 typedef enum SpvMemorySemanticsMask_ {
512 SpvMemorySemanticsMaskNone = 0,
513 SpvMemorySemanticsAcquireMask = 0x00000002,
514 SpvMemorySemanticsReleaseMask = 0x00000004,
515 SpvMemorySemanticsAcquireReleaseMask = 0x00000008,
516 SpvMemorySemanticsSequentiallyConsistentMask = 0x00000010,
517 SpvMemorySemanticsUniformMemoryMask = 0x00000040,
518 SpvMemorySemanticsSubgroupMemoryMask = 0x00000080,
519 SpvMemorySemanticsWorkgroupMemoryMask = 0x00000100,
520 SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
521 SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400,
522 SpvMemorySemanticsImageMemoryMask = 0x00000800,
523 } SpvMemorySemanticsMask;
524
525 typedef enum SpvMemoryAccessShift_ {
526 SpvMemoryAccessVolatileShift = 0,
527 SpvMemoryAccessAlignedShift = 1,
528 SpvMemoryAccessNontemporalShift = 2,
529 SpvMemoryAccessMax = 0x7fffffff,
530 } SpvMemoryAccessShift;
531
532 typedef enum SpvMemoryAccessMask_ {
533 SpvMemoryAccessMaskNone = 0,
534 SpvMemoryAccessVolatileMask = 0x00000001,
535 SpvMemoryAccessAlignedMask = 0x00000002,
536 SpvMemoryAccessNontemporalMask = 0x00000004,
537 } SpvMemoryAccessMask;
538
539 typedef enum SpvScope_ {
540 SpvScopeCrossDevice = 0,
541 SpvScopeDevice = 1,
542 SpvScopeWorkgroup = 2,
543 SpvScopeSubgroup = 3,
544 SpvScopeInvocation = 4,
545 SpvScopeMax = 0x7fffffff,
546 } SpvScope;
547
548 typedef enum SpvGroupOperation_ {
549 SpvGroupOperationReduce = 0,
550 SpvGroupOperationInclusiveScan = 1,
551 SpvGroupOperationExclusiveScan = 2,
552 SpvGroupOperationMax = 0x7fffffff,
553 } SpvGroupOperation;
554
555 typedef enum SpvKernelEnqueueFlags_ {
556 SpvKernelEnqueueFlagsNoWait = 0,
557 SpvKernelEnqueueFlagsWaitKernel = 1,
558 SpvKernelEnqueueFlagsWaitWorkGroup = 2,
559 SpvKernelEnqueueFlagsMax = 0x7fffffff,
560 } SpvKernelEnqueueFlags;
561
562 typedef enum SpvKernelProfilingInfoShift_ {
563 SpvKernelProfilingInfoCmdExecTimeShift = 0,
564 SpvKernelProfilingInfoMax = 0x7fffffff,
565 } SpvKernelProfilingInfoShift;
566
567 typedef enum SpvKernelProfilingInfoMask_ {
568 SpvKernelProfilingInfoMaskNone = 0,
569 SpvKernelProfilingInfoCmdExecTimeMask = 0x00000001,
570 } SpvKernelProfilingInfoMask;
571
572 typedef enum SpvCapability_ {
573 SpvCapabilityMatrix = 0,
574 SpvCapabilityShader = 1,
575 SpvCapabilityGeometry = 2,
576 SpvCapabilityTessellation = 3,
577 SpvCapabilityAddresses = 4,
578 SpvCapabilityLinkage = 5,
579 SpvCapabilityKernel = 6,
580 SpvCapabilityVector16 = 7,
581 SpvCapabilityFloat16Buffer = 8,
582 SpvCapabilityFloat16 = 9,
583 SpvCapabilityFloat64 = 10,
584 SpvCapabilityInt64 = 11,
585 SpvCapabilityInt64Atomics = 12,
586 SpvCapabilityImageBasic = 13,
587 SpvCapabilityImageReadWrite = 14,
588 SpvCapabilityImageMipmap = 15,
589 SpvCapabilityPipes = 17,
590 SpvCapabilityGroups = 18,
591 SpvCapabilityDeviceEnqueue = 19,
592 SpvCapabilityLiteralSampler = 20,
593 SpvCapabilityAtomicStorage = 21,
594 SpvCapabilityInt16 = 22,
595 SpvCapabilityTessellationPointSize = 23,
596 SpvCapabilityGeometryPointSize = 24,
597 SpvCapabilityImageGatherExtended = 25,
598 SpvCapabilityStorageImageMultisample = 27,
599 SpvCapabilityUniformBufferArrayDynamicIndexing = 28,
600 SpvCapabilitySampledImageArrayDynamicIndexing = 29,
601 SpvCapabilityStorageBufferArrayDynamicIndexing = 30,
602 SpvCapabilityStorageImageArrayDynamicIndexing = 31,
603 SpvCapabilityClipDistance = 32,
604 SpvCapabilityCullDistance = 33,
605 SpvCapabilityImageCubeArray = 34,
606 SpvCapabilitySampleRateShading = 35,
607 SpvCapabilityImageRect = 36,
608 SpvCapabilitySampledRect = 37,
609 SpvCapabilityGenericPointer = 38,
610 SpvCapabilityInt8 = 39,
611 SpvCapabilityInputAttachment = 40,
612 SpvCapabilitySparseResidency = 41,
613 SpvCapabilityMinLod = 42,
614 SpvCapabilitySampled1D = 43,
615 SpvCapabilityImage1D = 44,
616 SpvCapabilitySampledCubeArray = 45,
617 SpvCapabilitySampledBuffer = 46,
618 SpvCapabilityImageBuffer = 47,
619 SpvCapabilityImageMSArray = 48,
620 SpvCapabilityStorageImageExtendedFormats = 49,
621 SpvCapabilityImageQuery = 50,
622 SpvCapabilityDerivativeControl = 51,
623 SpvCapabilityInterpolationFunction = 52,
624 SpvCapabilityTransformFeedback = 53,
625 SpvCapabilityGeometryStreams = 54,
626 SpvCapabilityStorageImageReadWithoutFormat = 55,
627 SpvCapabilityStorageImageWriteWithoutFormat = 56,
628 SpvCapabilityMultiViewport = 57,
629 SpvCapabilitySubgroupDispatch = 58,
630 SpvCapabilityNamedBarrier = 59,
631 SpvCapabilityPipeStorage = 60,
632 SpvCapabilitySubgroupBallotKHR = 4423,
633 SpvCapabilityDrawParameters = 4427,
634 SpvCapabilitySubgroupVoteKHR = 4431,
635 SpvCapabilityStorageUniformBufferBlock16 = 4433,
636 SpvCapabilityStorageUniform16 = 4434,
637 SpvCapabilityStoragePushConstant16 = 4435,
638 SpvCapabilityStorageInputOutput16 = 4436,
639 SpvCapabilityDeviceGroup = 4437,
640 SpvCapabilityMultiView = 4439,
641 SpvCapabilitySampleMaskOverrideCoverageNV = 5249,
642 SpvCapabilityGeometryShaderPassthroughNV = 5251,
643 SpvCapabilityShaderViewportIndexLayerNV = 5254,
644 SpvCapabilityShaderViewportMaskNV = 5255,
645 SpvCapabilityShaderStereoViewNV = 5259,
646 SpvCapabilityPerViewAttributesNV = 5260,
647 SpvCapabilityMax = 0x7fffffff,
648 } SpvCapability;
649
650 typedef enum SpvOp_ {
651 SpvOpNop = 0,
652 SpvOpUndef = 1,
653 SpvOpSourceContinued = 2,
654 SpvOpSource = 3,
655 SpvOpSourceExtension = 4,
656 SpvOpName = 5,
657 SpvOpMemberName = 6,
658 SpvOpString = 7,
659 SpvOpLine = 8,
660 SpvOpExtension = 10,
661 SpvOpExtInstImport = 11,
662 SpvOpExtInst = 12,
663 SpvOpMemoryModel = 14,
664 SpvOpEntryPoint = 15,
665 SpvOpExecutionMode = 16,
666 SpvOpCapability = 17,
667 SpvOpTypeVoid = 19,
668 SpvOpTypeBool = 20,
669 SpvOpTypeInt = 21,
670 SpvOpTypeFloat = 22,
671 SpvOpTypeVector = 23,
672 SpvOpTypeMatrix = 24,
673 SpvOpTypeImage = 25,
674 SpvOpTypeSampler = 26,
675 SpvOpTypeSampledImage = 27,
676 SpvOpTypeArray = 28,
677 SpvOpTypeRuntimeArray = 29,
678 SpvOpTypeStruct = 30,
679 SpvOpTypeOpaque = 31,
680 SpvOpTypePointer = 32,
681 SpvOpTypeFunction = 33,
682 SpvOpTypeEvent = 34,
683 SpvOpTypeDeviceEvent = 35,
684 SpvOpTypeReserveId = 36,
685 SpvOpTypeQueue = 37,
686 SpvOpTypePipe = 38,
687 SpvOpTypeForwardPointer = 39,
688 SpvOpConstantTrue = 41,
689 SpvOpConstantFalse = 42,
690 SpvOpConstant = 43,
691 SpvOpConstantComposite = 44,
692 SpvOpConstantSampler = 45,
693 SpvOpConstantNull = 46,
694 SpvOpSpecConstantTrue = 48,
695 SpvOpSpecConstantFalse = 49,
696 SpvOpSpecConstant = 50,
697 SpvOpSpecConstantComposite = 51,
698 SpvOpSpecConstantOp = 52,
699 SpvOpFunction = 54,
700 SpvOpFunctionParameter = 55,
701 SpvOpFunctionEnd = 56,
702 SpvOpFunctionCall = 57,
703 SpvOpVariable = 59,
704 SpvOpImageTexelPointer = 60,
705 SpvOpLoad = 61,
706 SpvOpStore = 62,
707 SpvOpCopyMemory = 63,
708 SpvOpCopyMemorySized = 64,
709 SpvOpAccessChain = 65,
710 SpvOpInBoundsAccessChain = 66,
711 SpvOpPtrAccessChain = 67,
712 SpvOpArrayLength = 68,
713 SpvOpGenericPtrMemSemantics = 69,
714 SpvOpInBoundsPtrAccessChain = 70,
715 SpvOpDecorate = 71,
716 SpvOpMemberDecorate = 72,
717 SpvOpDecorationGroup = 73,
718 SpvOpGroupDecorate = 74,
719 SpvOpGroupMemberDecorate = 75,
720 SpvOpVectorExtractDynamic = 77,
721 SpvOpVectorInsertDynamic = 78,
722 SpvOpVectorShuffle = 79,
723 SpvOpCompositeConstruct = 80,
724 SpvOpCompositeExtract = 81,
725 SpvOpCompositeInsert = 82,
726 SpvOpCopyObject = 83,
727 SpvOpTranspose = 84,
728 SpvOpSampledImage = 86,
729 SpvOpImageSampleImplicitLod = 87,
730 SpvOpImageSampleExplicitLod = 88,
731 SpvOpImageSampleDrefImplicitLod = 89,
732 SpvOpImageSampleDrefExplicitLod = 90,
733 SpvOpImageSampleProjImplicitLod = 91,
734 SpvOpImageSampleProjExplicitLod = 92,
735 SpvOpImageSampleProjDrefImplicitLod = 93,
736 SpvOpImageSampleProjDrefExplicitLod = 94,
737 SpvOpImageFetch = 95,
738 SpvOpImageGather = 96,
739 SpvOpImageDrefGather = 97,
740 SpvOpImageRead = 98,
741 SpvOpImageWrite = 99,
742 SpvOpImage = 100,
743 SpvOpImageQueryFormat = 101,
744 SpvOpImageQueryOrder = 102,
745 SpvOpImageQuerySizeLod = 103,
746 SpvOpImageQuerySize = 104,
747 SpvOpImageQueryLod = 105,
748 SpvOpImageQueryLevels = 106,
749 SpvOpImageQuerySamples = 107,
750 SpvOpConvertFToU = 109,
751 SpvOpConvertFToS = 110,
752 SpvOpConvertSToF = 111,
753 SpvOpConvertUToF = 112,
754 SpvOpUConvert = 113,
755 SpvOpSConvert = 114,
756 SpvOpFConvert = 115,
757 SpvOpQuantizeToF16 = 116,
758 SpvOpConvertPtrToU = 117,
759 SpvOpSatConvertSToU = 118,
760 SpvOpSatConvertUToS = 119,
761 SpvOpConvertUToPtr = 120,
762 SpvOpPtrCastToGeneric = 121,
763 SpvOpGenericCastToPtr = 122,
764 SpvOpGenericCastToPtrExplicit = 123,
765 SpvOpBitcast = 124,
766 SpvOpSNegate = 126,
767 SpvOpFNegate = 127,
768 SpvOpIAdd = 128,
769 SpvOpFAdd = 129,
770 SpvOpISub = 130,
771 SpvOpFSub = 131,
772 SpvOpIMul = 132,
773 SpvOpFMul = 133,
774 SpvOpUDiv = 134,
775 SpvOpSDiv = 135,
776 SpvOpFDiv = 136,
777 SpvOpUMod = 137,
778 SpvOpSRem = 138,
779 SpvOpSMod = 139,
780 SpvOpFRem = 140,
781 SpvOpFMod = 141,
782 SpvOpVectorTimesScalar = 142,
783 SpvOpMatrixTimesScalar = 143,
784 SpvOpVectorTimesMatrix = 144,
785 SpvOpMatrixTimesVector = 145,
786 SpvOpMatrixTimesMatrix = 146,
787 SpvOpOuterProduct = 147,
788 SpvOpDot = 148,
789 SpvOpIAddCarry = 149,
790 SpvOpISubBorrow = 150,
791 SpvOpUMulExtended = 151,
792 SpvOpSMulExtended = 152,
793 SpvOpAny = 154,
794 SpvOpAll = 155,
795 SpvOpIsNan = 156,
796 SpvOpIsInf = 157,
797 SpvOpIsFinite = 158,
798 SpvOpIsNormal = 159,
799 SpvOpSignBitSet = 160,
800 SpvOpLessOrGreater = 161,
801 SpvOpOrdered = 162,
802 SpvOpUnordered = 163,
803 SpvOpLogicalEqual = 164,
804 SpvOpLogicalNotEqual = 165,
805 SpvOpLogicalOr = 166,
806 SpvOpLogicalAnd = 167,
807 SpvOpLogicalNot = 168,
808 SpvOpSelect = 169,
809 SpvOpIEqual = 170,
810 SpvOpINotEqual = 171,
811 SpvOpUGreaterThan = 172,
812 SpvOpSGreaterThan = 173,
813 SpvOpUGreaterThanEqual = 174,
814 SpvOpSGreaterThanEqual = 175,
815 SpvOpULessThan = 176,
816 SpvOpSLessThan = 177,
817 SpvOpULessThanEqual = 178,
818 SpvOpSLessThanEqual = 179,
819 SpvOpFOrdEqual = 180,
820 SpvOpFUnordEqual = 181,
821 SpvOpFOrdNotEqual = 182,
822 SpvOpFUnordNotEqual = 183,
823 SpvOpFOrdLessThan = 184,
824 SpvOpFUnordLessThan = 185,
825 SpvOpFOrdGreaterThan = 186,
826 SpvOpFUnordGreaterThan = 187,
827 SpvOpFOrdLessThanEqual = 188,
828 SpvOpFUnordLessThanEqual = 189,
829 SpvOpFOrdGreaterThanEqual = 190,
830 SpvOpFUnordGreaterThanEqual = 191,
831 SpvOpShiftRightLogical = 194,
832 SpvOpShiftRightArithmetic = 195,
833 SpvOpShiftLeftLogical = 196,
834 SpvOpBitwiseOr = 197,
835 SpvOpBitwiseXor = 198,
836 SpvOpBitwiseAnd = 199,
837 SpvOpNot = 200,
838 SpvOpBitFieldInsert = 201,
839 SpvOpBitFieldSExtract = 202,
840 SpvOpBitFieldUExtract = 203,
841 SpvOpBitReverse = 204,
842 SpvOpBitCount = 205,
843 SpvOpDPdx = 207,
844 SpvOpDPdy = 208,
845 SpvOpFwidth = 209,
846 SpvOpDPdxFine = 210,
847 SpvOpDPdyFine = 211,
848 SpvOpFwidthFine = 212,
849 SpvOpDPdxCoarse = 213,
850 SpvOpDPdyCoarse = 214,
851 SpvOpFwidthCoarse = 215,
852 SpvOpEmitVertex = 218,
853 SpvOpEndPrimitive = 219,
854 SpvOpEmitStreamVertex = 220,
855 SpvOpEndStreamPrimitive = 221,
856 SpvOpControlBarrier = 224,
857 SpvOpMemoryBarrier = 225,
858 SpvOpAtomicLoad = 227,
859 SpvOpAtomicStore = 228,
860 SpvOpAtomicExchange = 229,
861 SpvOpAtomicCompareExchange = 230,
862 SpvOpAtomicCompareExchangeWeak = 231,
863 SpvOpAtomicIIncrement = 232,
864 SpvOpAtomicIDecrement = 233,
865 SpvOpAtomicIAdd = 234,
866 SpvOpAtomicISub = 235,
867 SpvOpAtomicSMin = 236,
868 SpvOpAtomicUMin = 237,
869 SpvOpAtomicSMax = 238,
870 SpvOpAtomicUMax = 239,
871 SpvOpAtomicAnd = 240,
872 SpvOpAtomicOr = 241,
873 SpvOpAtomicXor = 242,
874 SpvOpPhi = 245,
875 SpvOpLoopMerge = 246,
876 SpvOpSelectionMerge = 247,
877 SpvOpLabel = 248,
878 SpvOpBranch = 249,
879 SpvOpBranchConditional = 250,
880 SpvOpSwitch = 251,
881 SpvOpKill = 252,
882 SpvOpReturn = 253,
883 SpvOpReturnValue = 254,
884 SpvOpUnreachable = 255,
885 SpvOpLifetimeStart = 256,
886 SpvOpLifetimeStop = 257,
887 SpvOpGroupAsyncCopy = 259,
888 SpvOpGroupWaitEvents = 260,
889 SpvOpGroupAll = 261,
890 SpvOpGroupAny = 262,
891 SpvOpGroupBroadcast = 263,
892 SpvOpGroupIAdd = 264,
893 SpvOpGroupFAdd = 265,
894 SpvOpGroupFMin = 266,
895 SpvOpGroupUMin = 267,
896 SpvOpGroupSMin = 268,
897 SpvOpGroupFMax = 269,
898 SpvOpGroupUMax = 270,
899 SpvOpGroupSMax = 271,
900 SpvOpReadPipe = 274,
901 SpvOpWritePipe = 275,
902 SpvOpReservedReadPipe = 276,
903 SpvOpReservedWritePipe = 277,
904 SpvOpReserveReadPipePackets = 278,
905 SpvOpReserveWritePipePackets = 279,
906 SpvOpCommitReadPipe = 280,
907 SpvOpCommitWritePipe = 281,
908 SpvOpIsValidReserveId = 282,
909 SpvOpGetNumPipePackets = 283,
910 SpvOpGetMaxPipePackets = 284,
911 SpvOpGroupReserveReadPipePackets = 285,
912 SpvOpGroupReserveWritePipePackets = 286,
913 SpvOpGroupCommitReadPipe = 287,
914 SpvOpGroupCommitWritePipe = 288,
915 SpvOpEnqueueMarker = 291,
916 SpvOpEnqueueKernel = 292,
917 SpvOpGetKernelNDrangeSubGroupCount = 293,
918 SpvOpGetKernelNDrangeMaxSubGroupSize = 294,
919 SpvOpGetKernelWorkGroupSize = 295,
920 SpvOpGetKernelPreferredWorkGroupSizeMultiple = 296,
921 SpvOpRetainEvent = 297,
922 SpvOpReleaseEvent = 298,
923 SpvOpCreateUserEvent = 299,
924 SpvOpIsValidEvent = 300,
925 SpvOpSetUserEventStatus = 301,
926 SpvOpCaptureEventProfilingInfo = 302,
927 SpvOpGetDefaultQueue = 303,
928 SpvOpBuildNDRange = 304,
929 SpvOpImageSparseSampleImplicitLod = 305,
930 SpvOpImageSparseSampleExplicitLod = 306,
931 SpvOpImageSparseSampleDrefImplicitLod = 307,
932 SpvOpImageSparseSampleDrefExplicitLod = 308,
933 SpvOpImageSparseSampleProjImplicitLod = 309,
934 SpvOpImageSparseSampleProjExplicitLod = 310,
935 SpvOpImageSparseSampleProjDrefImplicitLod = 311,
936 SpvOpImageSparseSampleProjDrefExplicitLod = 312,
937 SpvOpImageSparseFetch = 313,
938 SpvOpImageSparseGather = 314,
939 SpvOpImageSparseDrefGather = 315,
940 SpvOpImageSparseTexelsResident = 316,
941 SpvOpNoLine = 317,
942 SpvOpAtomicFlagTestAndSet = 318,
943 SpvOpAtomicFlagClear = 319,
944 SpvOpImageSparseRead = 320,
945 SpvOpSizeOf = 321,
946 SpvOpTypePipeStorage = 322,
947 SpvOpConstantPipeStorage = 323,
948 SpvOpCreatePipeFromPipeStorage = 324,
949 SpvOpGetKernelLocalSizeForSubgroupCount = 325,
950 SpvOpGetKernelMaxNumSubgroups = 326,
951 SpvOpTypeNamedBarrier = 327,
952 SpvOpNamedBarrierInitialize = 328,
953 SpvOpMemoryNamedBarrier = 329,
954 SpvOpModuleProcessed = 330,
955 SpvOpSubgroupBallotKHR = 4421,
956 SpvOpSubgroupFirstInvocationKHR = 4422,
957 SpvOpSubgroupAllKHR = 4428,
958 SpvOpSubgroupAnyKHR = 4429,
959 SpvOpSubgroupAllEqualKHR = 4430,
960 SpvOpSubgroupReadInvocationKHR = 4432,
961 SpvOpMax = 0x7fffffff,
962 } SpvOp;
963
964 #endif // #ifndef spirv_H
965