Update headers to latest revision (no functional changes).
[platform/upstream/SPIRV-Headers.git] / include / spirv / 1.0 / spirv.h
1 /*
2 ** Copyright (c) 2014-2016 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 0x10000
54 #define SPV_REVISION 7
55
56 static const unsigned int SpvMagicNumber = 0x07230203;
57 static const unsigned int SpvVersion = 0x00010000;
58 static const unsigned int SpvRevision = 7;
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     SpvExecutionModeMax = 0x7fffffff,
129 } SpvExecutionMode;
130
131 typedef enum SpvStorageClass_ {
132     SpvStorageClassUniformConstant = 0,
133     SpvStorageClassInput = 1,
134     SpvStorageClassUniform = 2,
135     SpvStorageClassOutput = 3,
136     SpvStorageClassWorkgroup = 4,
137     SpvStorageClassCrossWorkgroup = 5,
138     SpvStorageClassPrivate = 6,
139     SpvStorageClassFunction = 7,
140     SpvStorageClassGeneric = 8,
141     SpvStorageClassPushConstant = 9,
142     SpvStorageClassAtomicCounter = 10,
143     SpvStorageClassImage = 11,
144     SpvStorageClassMax = 0x7fffffff,
145 } SpvStorageClass;
146
147 typedef enum SpvDim_ {
148     SpvDim1D = 0,
149     SpvDim2D = 1,
150     SpvDim3D = 2,
151     SpvDimCube = 3,
152     SpvDimRect = 4,
153     SpvDimBuffer = 5,
154     SpvDimSubpassData = 6,
155     SpvDimMax = 0x7fffffff,
156 } SpvDim;
157
158 typedef enum SpvSamplerAddressingMode_ {
159     SpvSamplerAddressingModeNone = 0,
160     SpvSamplerAddressingModeClampToEdge = 1,
161     SpvSamplerAddressingModeClamp = 2,
162     SpvSamplerAddressingModeRepeat = 3,
163     SpvSamplerAddressingModeRepeatMirrored = 4,
164     SpvSamplerAddressingModeMax = 0x7fffffff,
165 } SpvSamplerAddressingMode;
166
167 typedef enum SpvSamplerFilterMode_ {
168     SpvSamplerFilterModeNearest = 0,
169     SpvSamplerFilterModeLinear = 1,
170     SpvSamplerFilterModeMax = 0x7fffffff,
171 } SpvSamplerFilterMode;
172
173 typedef enum SpvImageFormat_ {
174     SpvImageFormatUnknown = 0,
175     SpvImageFormatRgba32f = 1,
176     SpvImageFormatRgba16f = 2,
177     SpvImageFormatR32f = 3,
178     SpvImageFormatRgba8 = 4,
179     SpvImageFormatRgba8Snorm = 5,
180     SpvImageFormatRg32f = 6,
181     SpvImageFormatRg16f = 7,
182     SpvImageFormatR11fG11fB10f = 8,
183     SpvImageFormatR16f = 9,
184     SpvImageFormatRgba16 = 10,
185     SpvImageFormatRgb10A2 = 11,
186     SpvImageFormatRg16 = 12,
187     SpvImageFormatRg8 = 13,
188     SpvImageFormatR16 = 14,
189     SpvImageFormatR8 = 15,
190     SpvImageFormatRgba16Snorm = 16,
191     SpvImageFormatRg16Snorm = 17,
192     SpvImageFormatRg8Snorm = 18,
193     SpvImageFormatR16Snorm = 19,
194     SpvImageFormatR8Snorm = 20,
195     SpvImageFormatRgba32i = 21,
196     SpvImageFormatRgba16i = 22,
197     SpvImageFormatRgba8i = 23,
198     SpvImageFormatR32i = 24,
199     SpvImageFormatRg32i = 25,
200     SpvImageFormatRg16i = 26,
201     SpvImageFormatRg8i = 27,
202     SpvImageFormatR16i = 28,
203     SpvImageFormatR8i = 29,
204     SpvImageFormatRgba32ui = 30,
205     SpvImageFormatRgba16ui = 31,
206     SpvImageFormatRgba8ui = 32,
207     SpvImageFormatR32ui = 33,
208     SpvImageFormatRgb10a2ui = 34,
209     SpvImageFormatRg32ui = 35,
210     SpvImageFormatRg16ui = 36,
211     SpvImageFormatRg8ui = 37,
212     SpvImageFormatR16ui = 38,
213     SpvImageFormatR8ui = 39,
214     SpvImageFormatMax = 0x7fffffff,
215 } SpvImageFormat;
216
217 typedef enum SpvImageChannelOrder_ {
218     SpvImageChannelOrderR = 0,
219     SpvImageChannelOrderA = 1,
220     SpvImageChannelOrderRG = 2,
221     SpvImageChannelOrderRA = 3,
222     SpvImageChannelOrderRGB = 4,
223     SpvImageChannelOrderRGBA = 5,
224     SpvImageChannelOrderBGRA = 6,
225     SpvImageChannelOrderARGB = 7,
226     SpvImageChannelOrderIntensity = 8,
227     SpvImageChannelOrderLuminance = 9,
228     SpvImageChannelOrderRx = 10,
229     SpvImageChannelOrderRGx = 11,
230     SpvImageChannelOrderRGBx = 12,
231     SpvImageChannelOrderDepth = 13,
232     SpvImageChannelOrderDepthStencil = 14,
233     SpvImageChannelOrdersRGB = 15,
234     SpvImageChannelOrdersRGBx = 16,
235     SpvImageChannelOrdersRGBA = 17,
236     SpvImageChannelOrdersBGRA = 18,
237     SpvImageChannelOrderABGR = 19,
238     SpvImageChannelOrderMax = 0x7fffffff,
239 } SpvImageChannelOrder;
240
241 typedef enum SpvImageChannelDataType_ {
242     SpvImageChannelDataTypeSnormInt8 = 0,
243     SpvImageChannelDataTypeSnormInt16 = 1,
244     SpvImageChannelDataTypeUnormInt8 = 2,
245     SpvImageChannelDataTypeUnormInt16 = 3,
246     SpvImageChannelDataTypeUnormShort565 = 4,
247     SpvImageChannelDataTypeUnormShort555 = 5,
248     SpvImageChannelDataTypeUnormInt101010 = 6,
249     SpvImageChannelDataTypeSignedInt8 = 7,
250     SpvImageChannelDataTypeSignedInt16 = 8,
251     SpvImageChannelDataTypeSignedInt32 = 9,
252     SpvImageChannelDataTypeUnsignedInt8 = 10,
253     SpvImageChannelDataTypeUnsignedInt16 = 11,
254     SpvImageChannelDataTypeUnsignedInt32 = 12,
255     SpvImageChannelDataTypeHalfFloat = 13,
256     SpvImageChannelDataTypeFloat = 14,
257     SpvImageChannelDataTypeUnormInt24 = 15,
258     SpvImageChannelDataTypeUnormInt101010_2 = 16,
259     SpvImageChannelDataTypeMax = 0x7fffffff,
260 } SpvImageChannelDataType;
261
262 typedef enum SpvImageOperandsShift_ {
263     SpvImageOperandsBiasShift = 0,
264     SpvImageOperandsLodShift = 1,
265     SpvImageOperandsGradShift = 2,
266     SpvImageOperandsConstOffsetShift = 3,
267     SpvImageOperandsOffsetShift = 4,
268     SpvImageOperandsConstOffsetsShift = 5,
269     SpvImageOperandsSampleShift = 6,
270     SpvImageOperandsMinLodShift = 7,
271     SpvImageOperandsMax = 0x7fffffff,
272 } SpvImageOperandsShift;
273
274 typedef enum SpvImageOperandsMask_ {
275     SpvImageOperandsMaskNone = 0,
276     SpvImageOperandsBiasMask = 0x00000001,
277     SpvImageOperandsLodMask = 0x00000002,
278     SpvImageOperandsGradMask = 0x00000004,
279     SpvImageOperandsConstOffsetMask = 0x00000008,
280     SpvImageOperandsOffsetMask = 0x00000010,
281     SpvImageOperandsConstOffsetsMask = 0x00000020,
282     SpvImageOperandsSampleMask = 0x00000040,
283     SpvImageOperandsMinLodMask = 0x00000080,
284 } SpvImageOperandsMask;
285
286 typedef enum SpvFPFastMathModeShift_ {
287     SpvFPFastMathModeNotNaNShift = 0,
288     SpvFPFastMathModeNotInfShift = 1,
289     SpvFPFastMathModeNSZShift = 2,
290     SpvFPFastMathModeAllowRecipShift = 3,
291     SpvFPFastMathModeFastShift = 4,
292     SpvFPFastMathModeMax = 0x7fffffff,
293 } SpvFPFastMathModeShift;
294
295 typedef enum SpvFPFastMathModeMask_ {
296     SpvFPFastMathModeMaskNone = 0,
297     SpvFPFastMathModeNotNaNMask = 0x00000001,
298     SpvFPFastMathModeNotInfMask = 0x00000002,
299     SpvFPFastMathModeNSZMask = 0x00000004,
300     SpvFPFastMathModeAllowRecipMask = 0x00000008,
301     SpvFPFastMathModeFastMask = 0x00000010,
302 } SpvFPFastMathModeMask;
303
304 typedef enum SpvFPRoundingMode_ {
305     SpvFPRoundingModeRTE = 0,
306     SpvFPRoundingModeRTZ = 1,
307     SpvFPRoundingModeRTP = 2,
308     SpvFPRoundingModeRTN = 3,
309     SpvFPRoundingModeMax = 0x7fffffff,
310 } SpvFPRoundingMode;
311
312 typedef enum SpvLinkageType_ {
313     SpvLinkageTypeExport = 0,
314     SpvLinkageTypeImport = 1,
315     SpvLinkageTypeMax = 0x7fffffff,
316 } SpvLinkageType;
317
318 typedef enum SpvAccessQualifier_ {
319     SpvAccessQualifierReadOnly = 0,
320     SpvAccessQualifierWriteOnly = 1,
321     SpvAccessQualifierReadWrite = 2,
322     SpvAccessQualifierMax = 0x7fffffff,
323 } SpvAccessQualifier;
324
325 typedef enum SpvFunctionParameterAttribute_ {
326     SpvFunctionParameterAttributeZext = 0,
327     SpvFunctionParameterAttributeSext = 1,
328     SpvFunctionParameterAttributeByVal = 2,
329     SpvFunctionParameterAttributeSret = 3,
330     SpvFunctionParameterAttributeNoAlias = 4,
331     SpvFunctionParameterAttributeNoCapture = 5,
332     SpvFunctionParameterAttributeNoWrite = 6,
333     SpvFunctionParameterAttributeNoReadWrite = 7,
334     SpvFunctionParameterAttributeMax = 0x7fffffff,
335 } SpvFunctionParameterAttribute;
336
337 typedef enum SpvDecoration_ {
338     SpvDecorationRelaxedPrecision = 0,
339     SpvDecorationSpecId = 1,
340     SpvDecorationBlock = 2,
341     SpvDecorationBufferBlock = 3,
342     SpvDecorationRowMajor = 4,
343     SpvDecorationColMajor = 5,
344     SpvDecorationArrayStride = 6,
345     SpvDecorationMatrixStride = 7,
346     SpvDecorationGLSLShared = 8,
347     SpvDecorationGLSLPacked = 9,
348     SpvDecorationCPacked = 10,
349     SpvDecorationBuiltIn = 11,
350     SpvDecorationNoPerspective = 13,
351     SpvDecorationFlat = 14,
352     SpvDecorationPatch = 15,
353     SpvDecorationCentroid = 16,
354     SpvDecorationSample = 17,
355     SpvDecorationInvariant = 18,
356     SpvDecorationRestrict = 19,
357     SpvDecorationAliased = 20,
358     SpvDecorationVolatile = 21,
359     SpvDecorationConstant = 22,
360     SpvDecorationCoherent = 23,
361     SpvDecorationNonWritable = 24,
362     SpvDecorationNonReadable = 25,
363     SpvDecorationUniform = 26,
364     SpvDecorationSaturatedConversion = 28,
365     SpvDecorationStream = 29,
366     SpvDecorationLocation = 30,
367     SpvDecorationComponent = 31,
368     SpvDecorationIndex = 32,
369     SpvDecorationBinding = 33,
370     SpvDecorationDescriptorSet = 34,
371     SpvDecorationOffset = 35,
372     SpvDecorationXfbBuffer = 36,
373     SpvDecorationXfbStride = 37,
374     SpvDecorationFuncParamAttr = 38,
375     SpvDecorationFPRoundingMode = 39,
376     SpvDecorationFPFastMathMode = 40,
377     SpvDecorationLinkageAttributes = 41,
378     SpvDecorationNoContraction = 42,
379     SpvDecorationInputAttachmentIndex = 43,
380     SpvDecorationAlignment = 44,
381     SpvDecorationMax = 0x7fffffff,
382 } SpvDecoration;
383
384 typedef enum SpvBuiltIn_ {
385     SpvBuiltInPosition = 0,
386     SpvBuiltInPointSize = 1,
387     SpvBuiltInClipDistance = 3,
388     SpvBuiltInCullDistance = 4,
389     SpvBuiltInVertexId = 5,
390     SpvBuiltInInstanceId = 6,
391     SpvBuiltInPrimitiveId = 7,
392     SpvBuiltInInvocationId = 8,
393     SpvBuiltInLayer = 9,
394     SpvBuiltInViewportIndex = 10,
395     SpvBuiltInTessLevelOuter = 11,
396     SpvBuiltInTessLevelInner = 12,
397     SpvBuiltInTessCoord = 13,
398     SpvBuiltInPatchVertices = 14,
399     SpvBuiltInFragCoord = 15,
400     SpvBuiltInPointCoord = 16,
401     SpvBuiltInFrontFacing = 17,
402     SpvBuiltInSampleId = 18,
403     SpvBuiltInSamplePosition = 19,
404     SpvBuiltInSampleMask = 20,
405     SpvBuiltInFragDepth = 22,
406     SpvBuiltInHelperInvocation = 23,
407     SpvBuiltInNumWorkgroups = 24,
408     SpvBuiltInWorkgroupSize = 25,
409     SpvBuiltInWorkgroupId = 26,
410     SpvBuiltInLocalInvocationId = 27,
411     SpvBuiltInGlobalInvocationId = 28,
412     SpvBuiltInLocalInvocationIndex = 29,
413     SpvBuiltInWorkDim = 30,
414     SpvBuiltInGlobalSize = 31,
415     SpvBuiltInEnqueuedWorkgroupSize = 32,
416     SpvBuiltInGlobalOffset = 33,
417     SpvBuiltInGlobalLinearId = 34,
418     SpvBuiltInSubgroupSize = 36,
419     SpvBuiltInSubgroupMaxSize = 37,
420     SpvBuiltInNumSubgroups = 38,
421     SpvBuiltInNumEnqueuedSubgroups = 39,
422     SpvBuiltInSubgroupId = 40,
423     SpvBuiltInSubgroupLocalInvocationId = 41,
424     SpvBuiltInVertexIndex = 42,
425     SpvBuiltInInstanceIndex = 43,
426     SpvBuiltInMax = 0x7fffffff,
427 } SpvBuiltIn;
428
429 typedef enum SpvSelectionControlShift_ {
430     SpvSelectionControlFlattenShift = 0,
431     SpvSelectionControlDontFlattenShift = 1,
432     SpvSelectionControlMax = 0x7fffffff,
433 } SpvSelectionControlShift;
434
435 typedef enum SpvSelectionControlMask_ {
436     SpvSelectionControlMaskNone = 0,
437     SpvSelectionControlFlattenMask = 0x00000001,
438     SpvSelectionControlDontFlattenMask = 0x00000002,
439 } SpvSelectionControlMask;
440
441 typedef enum SpvLoopControlShift_ {
442     SpvLoopControlUnrollShift = 0,
443     SpvLoopControlDontUnrollShift = 1,
444     SpvLoopControlMax = 0x7fffffff,
445 } SpvLoopControlShift;
446
447 typedef enum SpvLoopControlMask_ {
448     SpvLoopControlMaskNone = 0,
449     SpvLoopControlUnrollMask = 0x00000001,
450     SpvLoopControlDontUnrollMask = 0x00000002,
451 } SpvLoopControlMask;
452
453 typedef enum SpvFunctionControlShift_ {
454     SpvFunctionControlInlineShift = 0,
455     SpvFunctionControlDontInlineShift = 1,
456     SpvFunctionControlPureShift = 2,
457     SpvFunctionControlConstShift = 3,
458     SpvFunctionControlMax = 0x7fffffff,
459 } SpvFunctionControlShift;
460
461 typedef enum SpvFunctionControlMask_ {
462     SpvFunctionControlMaskNone = 0,
463     SpvFunctionControlInlineMask = 0x00000001,
464     SpvFunctionControlDontInlineMask = 0x00000002,
465     SpvFunctionControlPureMask = 0x00000004,
466     SpvFunctionControlConstMask = 0x00000008,
467 } SpvFunctionControlMask;
468
469 typedef enum SpvMemorySemanticsShift_ {
470     SpvMemorySemanticsAcquireShift = 1,
471     SpvMemorySemanticsReleaseShift = 2,
472     SpvMemorySemanticsAcquireReleaseShift = 3,
473     SpvMemorySemanticsSequentiallyConsistentShift = 4,
474     SpvMemorySemanticsUniformMemoryShift = 6,
475     SpvMemorySemanticsSubgroupMemoryShift = 7,
476     SpvMemorySemanticsWorkgroupMemoryShift = 8,
477     SpvMemorySemanticsCrossWorkgroupMemoryShift = 9,
478     SpvMemorySemanticsAtomicCounterMemoryShift = 10,
479     SpvMemorySemanticsImageMemoryShift = 11,
480     SpvMemorySemanticsMax = 0x7fffffff,
481 } SpvMemorySemanticsShift;
482
483 typedef enum SpvMemorySemanticsMask_ {
484     SpvMemorySemanticsMaskNone = 0,
485     SpvMemorySemanticsAcquireMask = 0x00000002,
486     SpvMemorySemanticsReleaseMask = 0x00000004,
487     SpvMemorySemanticsAcquireReleaseMask = 0x00000008,
488     SpvMemorySemanticsSequentiallyConsistentMask = 0x00000010,
489     SpvMemorySemanticsUniformMemoryMask = 0x00000040,
490     SpvMemorySemanticsSubgroupMemoryMask = 0x00000080,
491     SpvMemorySemanticsWorkgroupMemoryMask = 0x00000100,
492     SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
493     SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400,
494     SpvMemorySemanticsImageMemoryMask = 0x00000800,
495 } SpvMemorySemanticsMask;
496
497 typedef enum SpvMemoryAccessShift_ {
498     SpvMemoryAccessVolatileShift = 0,
499     SpvMemoryAccessAlignedShift = 1,
500     SpvMemoryAccessNontemporalShift = 2,
501     SpvMemoryAccessMax = 0x7fffffff,
502 } SpvMemoryAccessShift;
503
504 typedef enum SpvMemoryAccessMask_ {
505     SpvMemoryAccessMaskNone = 0,
506     SpvMemoryAccessVolatileMask = 0x00000001,
507     SpvMemoryAccessAlignedMask = 0x00000002,
508     SpvMemoryAccessNontemporalMask = 0x00000004,
509 } SpvMemoryAccessMask;
510
511 typedef enum SpvScope_ {
512     SpvScopeCrossDevice = 0,
513     SpvScopeDevice = 1,
514     SpvScopeWorkgroup = 2,
515     SpvScopeSubgroup = 3,
516     SpvScopeInvocation = 4,
517     SpvScopeMax = 0x7fffffff,
518 } SpvScope;
519
520 typedef enum SpvGroupOperation_ {
521     SpvGroupOperationReduce = 0,
522     SpvGroupOperationInclusiveScan = 1,
523     SpvGroupOperationExclusiveScan = 2,
524     SpvGroupOperationMax = 0x7fffffff,
525 } SpvGroupOperation;
526
527 typedef enum SpvKernelEnqueueFlags_ {
528     SpvKernelEnqueueFlagsNoWait = 0,
529     SpvKernelEnqueueFlagsWaitKernel = 1,
530     SpvKernelEnqueueFlagsWaitWorkGroup = 2,
531     SpvKernelEnqueueFlagsMax = 0x7fffffff,
532 } SpvKernelEnqueueFlags;
533
534 typedef enum SpvKernelProfilingInfoShift_ {
535     SpvKernelProfilingInfoCmdExecTimeShift = 0,
536     SpvKernelProfilingInfoMax = 0x7fffffff,
537 } SpvKernelProfilingInfoShift;
538
539 typedef enum SpvKernelProfilingInfoMask_ {
540     SpvKernelProfilingInfoMaskNone = 0,
541     SpvKernelProfilingInfoCmdExecTimeMask = 0x00000001,
542 } SpvKernelProfilingInfoMask;
543
544 typedef enum SpvCapability_ {
545     SpvCapabilityMatrix = 0,
546     SpvCapabilityShader = 1,
547     SpvCapabilityGeometry = 2,
548     SpvCapabilityTessellation = 3,
549     SpvCapabilityAddresses = 4,
550     SpvCapabilityLinkage = 5,
551     SpvCapabilityKernel = 6,
552     SpvCapabilityVector16 = 7,
553     SpvCapabilityFloat16Buffer = 8,
554     SpvCapabilityFloat16 = 9,
555     SpvCapabilityFloat64 = 10,
556     SpvCapabilityInt64 = 11,
557     SpvCapabilityInt64Atomics = 12,
558     SpvCapabilityImageBasic = 13,
559     SpvCapabilityImageReadWrite = 14,
560     SpvCapabilityImageMipmap = 15,
561     SpvCapabilityPipes = 17,
562     SpvCapabilityGroups = 18,
563     SpvCapabilityDeviceEnqueue = 19,
564     SpvCapabilityLiteralSampler = 20,
565     SpvCapabilityAtomicStorage = 21,
566     SpvCapabilityInt16 = 22,
567     SpvCapabilityTessellationPointSize = 23,
568     SpvCapabilityGeometryPointSize = 24,
569     SpvCapabilityImageGatherExtended = 25,
570     SpvCapabilityStorageImageMultisample = 27,
571     SpvCapabilityUniformBufferArrayDynamicIndexing = 28,
572     SpvCapabilitySampledImageArrayDynamicIndexing = 29,
573     SpvCapabilityStorageBufferArrayDynamicIndexing = 30,
574     SpvCapabilityStorageImageArrayDynamicIndexing = 31,
575     SpvCapabilityClipDistance = 32,
576     SpvCapabilityCullDistance = 33,
577     SpvCapabilityImageCubeArray = 34,
578     SpvCapabilitySampleRateShading = 35,
579     SpvCapabilityImageRect = 36,
580     SpvCapabilitySampledRect = 37,
581     SpvCapabilityGenericPointer = 38,
582     SpvCapabilityInt8 = 39,
583     SpvCapabilityInputAttachment = 40,
584     SpvCapabilitySparseResidency = 41,
585     SpvCapabilityMinLod = 42,
586     SpvCapabilitySampled1D = 43,
587     SpvCapabilityImage1D = 44,
588     SpvCapabilitySampledCubeArray = 45,
589     SpvCapabilitySampledBuffer = 46,
590     SpvCapabilityImageBuffer = 47,
591     SpvCapabilityImageMSArray = 48,
592     SpvCapabilityStorageImageExtendedFormats = 49,
593     SpvCapabilityImageQuery = 50,
594     SpvCapabilityDerivativeControl = 51,
595     SpvCapabilityInterpolationFunction = 52,
596     SpvCapabilityTransformFeedback = 53,
597     SpvCapabilityGeometryStreams = 54,
598     SpvCapabilityStorageImageReadWithoutFormat = 55,
599     SpvCapabilityStorageImageWriteWithoutFormat = 56,
600     SpvCapabilityMultiViewport = 57,
601     SpvCapabilityMax = 0x7fffffff,
602 } SpvCapability;
603
604 typedef enum SpvOp_ {
605     SpvOpNop = 0,
606     SpvOpUndef = 1,
607     SpvOpSourceContinued = 2,
608     SpvOpSource = 3,
609     SpvOpSourceExtension = 4,
610     SpvOpName = 5,
611     SpvOpMemberName = 6,
612     SpvOpString = 7,
613     SpvOpLine = 8,
614     SpvOpExtension = 10,
615     SpvOpExtInstImport = 11,
616     SpvOpExtInst = 12,
617     SpvOpMemoryModel = 14,
618     SpvOpEntryPoint = 15,
619     SpvOpExecutionMode = 16,
620     SpvOpCapability = 17,
621     SpvOpTypeVoid = 19,
622     SpvOpTypeBool = 20,
623     SpvOpTypeInt = 21,
624     SpvOpTypeFloat = 22,
625     SpvOpTypeVector = 23,
626     SpvOpTypeMatrix = 24,
627     SpvOpTypeImage = 25,
628     SpvOpTypeSampler = 26,
629     SpvOpTypeSampledImage = 27,
630     SpvOpTypeArray = 28,
631     SpvOpTypeRuntimeArray = 29,
632     SpvOpTypeStruct = 30,
633     SpvOpTypeOpaque = 31,
634     SpvOpTypePointer = 32,
635     SpvOpTypeFunction = 33,
636     SpvOpTypeEvent = 34,
637     SpvOpTypeDeviceEvent = 35,
638     SpvOpTypeReserveId = 36,
639     SpvOpTypeQueue = 37,
640     SpvOpTypePipe = 38,
641     SpvOpTypeForwardPointer = 39,
642     SpvOpConstantTrue = 41,
643     SpvOpConstantFalse = 42,
644     SpvOpConstant = 43,
645     SpvOpConstantComposite = 44,
646     SpvOpConstantSampler = 45,
647     SpvOpConstantNull = 46,
648     SpvOpSpecConstantTrue = 48,
649     SpvOpSpecConstantFalse = 49,
650     SpvOpSpecConstant = 50,
651     SpvOpSpecConstantComposite = 51,
652     SpvOpSpecConstantOp = 52,
653     SpvOpFunction = 54,
654     SpvOpFunctionParameter = 55,
655     SpvOpFunctionEnd = 56,
656     SpvOpFunctionCall = 57,
657     SpvOpVariable = 59,
658     SpvOpImageTexelPointer = 60,
659     SpvOpLoad = 61,
660     SpvOpStore = 62,
661     SpvOpCopyMemory = 63,
662     SpvOpCopyMemorySized = 64,
663     SpvOpAccessChain = 65,
664     SpvOpInBoundsAccessChain = 66,
665     SpvOpPtrAccessChain = 67,
666     SpvOpArrayLength = 68,
667     SpvOpGenericPtrMemSemantics = 69,
668     SpvOpInBoundsPtrAccessChain = 70,
669     SpvOpDecorate = 71,
670     SpvOpMemberDecorate = 72,
671     SpvOpDecorationGroup = 73,
672     SpvOpGroupDecorate = 74,
673     SpvOpGroupMemberDecorate = 75,
674     SpvOpVectorExtractDynamic = 77,
675     SpvOpVectorInsertDynamic = 78,
676     SpvOpVectorShuffle = 79,
677     SpvOpCompositeConstruct = 80,
678     SpvOpCompositeExtract = 81,
679     SpvOpCompositeInsert = 82,
680     SpvOpCopyObject = 83,
681     SpvOpTranspose = 84,
682     SpvOpSampledImage = 86,
683     SpvOpImageSampleImplicitLod = 87,
684     SpvOpImageSampleExplicitLod = 88,
685     SpvOpImageSampleDrefImplicitLod = 89,
686     SpvOpImageSampleDrefExplicitLod = 90,
687     SpvOpImageSampleProjImplicitLod = 91,
688     SpvOpImageSampleProjExplicitLod = 92,
689     SpvOpImageSampleProjDrefImplicitLod = 93,
690     SpvOpImageSampleProjDrefExplicitLod = 94,
691     SpvOpImageFetch = 95,
692     SpvOpImageGather = 96,
693     SpvOpImageDrefGather = 97,
694     SpvOpImageRead = 98,
695     SpvOpImageWrite = 99,
696     SpvOpImage = 100,
697     SpvOpImageQueryFormat = 101,
698     SpvOpImageQueryOrder = 102,
699     SpvOpImageQuerySizeLod = 103,
700     SpvOpImageQuerySize = 104,
701     SpvOpImageQueryLod = 105,
702     SpvOpImageQueryLevels = 106,
703     SpvOpImageQuerySamples = 107,
704     SpvOpConvertFToU = 109,
705     SpvOpConvertFToS = 110,
706     SpvOpConvertSToF = 111,
707     SpvOpConvertUToF = 112,
708     SpvOpUConvert = 113,
709     SpvOpSConvert = 114,
710     SpvOpFConvert = 115,
711     SpvOpQuantizeToF16 = 116,
712     SpvOpConvertPtrToU = 117,
713     SpvOpSatConvertSToU = 118,
714     SpvOpSatConvertUToS = 119,
715     SpvOpConvertUToPtr = 120,
716     SpvOpPtrCastToGeneric = 121,
717     SpvOpGenericCastToPtr = 122,
718     SpvOpGenericCastToPtrExplicit = 123,
719     SpvOpBitcast = 124,
720     SpvOpSNegate = 126,
721     SpvOpFNegate = 127,
722     SpvOpIAdd = 128,
723     SpvOpFAdd = 129,
724     SpvOpISub = 130,
725     SpvOpFSub = 131,
726     SpvOpIMul = 132,
727     SpvOpFMul = 133,
728     SpvOpUDiv = 134,
729     SpvOpSDiv = 135,
730     SpvOpFDiv = 136,
731     SpvOpUMod = 137,
732     SpvOpSRem = 138,
733     SpvOpSMod = 139,
734     SpvOpFRem = 140,
735     SpvOpFMod = 141,
736     SpvOpVectorTimesScalar = 142,
737     SpvOpMatrixTimesScalar = 143,
738     SpvOpVectorTimesMatrix = 144,
739     SpvOpMatrixTimesVector = 145,
740     SpvOpMatrixTimesMatrix = 146,
741     SpvOpOuterProduct = 147,
742     SpvOpDot = 148,
743     SpvOpIAddCarry = 149,
744     SpvOpISubBorrow = 150,
745     SpvOpUMulExtended = 151,
746     SpvOpSMulExtended = 152,
747     SpvOpAny = 154,
748     SpvOpAll = 155,
749     SpvOpIsNan = 156,
750     SpvOpIsInf = 157,
751     SpvOpIsFinite = 158,
752     SpvOpIsNormal = 159,
753     SpvOpSignBitSet = 160,
754     SpvOpLessOrGreater = 161,
755     SpvOpOrdered = 162,
756     SpvOpUnordered = 163,
757     SpvOpLogicalEqual = 164,
758     SpvOpLogicalNotEqual = 165,
759     SpvOpLogicalOr = 166,
760     SpvOpLogicalAnd = 167,
761     SpvOpLogicalNot = 168,
762     SpvOpSelect = 169,
763     SpvOpIEqual = 170,
764     SpvOpINotEqual = 171,
765     SpvOpUGreaterThan = 172,
766     SpvOpSGreaterThan = 173,
767     SpvOpUGreaterThanEqual = 174,
768     SpvOpSGreaterThanEqual = 175,
769     SpvOpULessThan = 176,
770     SpvOpSLessThan = 177,
771     SpvOpULessThanEqual = 178,
772     SpvOpSLessThanEqual = 179,
773     SpvOpFOrdEqual = 180,
774     SpvOpFUnordEqual = 181,
775     SpvOpFOrdNotEqual = 182,
776     SpvOpFUnordNotEqual = 183,
777     SpvOpFOrdLessThan = 184,
778     SpvOpFUnordLessThan = 185,
779     SpvOpFOrdGreaterThan = 186,
780     SpvOpFUnordGreaterThan = 187,
781     SpvOpFOrdLessThanEqual = 188,
782     SpvOpFUnordLessThanEqual = 189,
783     SpvOpFOrdGreaterThanEqual = 190,
784     SpvOpFUnordGreaterThanEqual = 191,
785     SpvOpShiftRightLogical = 194,
786     SpvOpShiftRightArithmetic = 195,
787     SpvOpShiftLeftLogical = 196,
788     SpvOpBitwiseOr = 197,
789     SpvOpBitwiseXor = 198,
790     SpvOpBitwiseAnd = 199,
791     SpvOpNot = 200,
792     SpvOpBitFieldInsert = 201,
793     SpvOpBitFieldSExtract = 202,
794     SpvOpBitFieldUExtract = 203,
795     SpvOpBitReverse = 204,
796     SpvOpBitCount = 205,
797     SpvOpDPdx = 207,
798     SpvOpDPdy = 208,
799     SpvOpFwidth = 209,
800     SpvOpDPdxFine = 210,
801     SpvOpDPdyFine = 211,
802     SpvOpFwidthFine = 212,
803     SpvOpDPdxCoarse = 213,
804     SpvOpDPdyCoarse = 214,
805     SpvOpFwidthCoarse = 215,
806     SpvOpEmitVertex = 218,
807     SpvOpEndPrimitive = 219,
808     SpvOpEmitStreamVertex = 220,
809     SpvOpEndStreamPrimitive = 221,
810     SpvOpControlBarrier = 224,
811     SpvOpMemoryBarrier = 225,
812     SpvOpAtomicLoad = 227,
813     SpvOpAtomicStore = 228,
814     SpvOpAtomicExchange = 229,
815     SpvOpAtomicCompareExchange = 230,
816     SpvOpAtomicCompareExchangeWeak = 231,
817     SpvOpAtomicIIncrement = 232,
818     SpvOpAtomicIDecrement = 233,
819     SpvOpAtomicIAdd = 234,
820     SpvOpAtomicISub = 235,
821     SpvOpAtomicSMin = 236,
822     SpvOpAtomicUMin = 237,
823     SpvOpAtomicSMax = 238,
824     SpvOpAtomicUMax = 239,
825     SpvOpAtomicAnd = 240,
826     SpvOpAtomicOr = 241,
827     SpvOpAtomicXor = 242,
828     SpvOpPhi = 245,
829     SpvOpLoopMerge = 246,
830     SpvOpSelectionMerge = 247,
831     SpvOpLabel = 248,
832     SpvOpBranch = 249,
833     SpvOpBranchConditional = 250,
834     SpvOpSwitch = 251,
835     SpvOpKill = 252,
836     SpvOpReturn = 253,
837     SpvOpReturnValue = 254,
838     SpvOpUnreachable = 255,
839     SpvOpLifetimeStart = 256,
840     SpvOpLifetimeStop = 257,
841     SpvOpGroupAsyncCopy = 259,
842     SpvOpGroupWaitEvents = 260,
843     SpvOpGroupAll = 261,
844     SpvOpGroupAny = 262,
845     SpvOpGroupBroadcast = 263,
846     SpvOpGroupIAdd = 264,
847     SpvOpGroupFAdd = 265,
848     SpvOpGroupFMin = 266,
849     SpvOpGroupUMin = 267,
850     SpvOpGroupSMin = 268,
851     SpvOpGroupFMax = 269,
852     SpvOpGroupUMax = 270,
853     SpvOpGroupSMax = 271,
854     SpvOpReadPipe = 274,
855     SpvOpWritePipe = 275,
856     SpvOpReservedReadPipe = 276,
857     SpvOpReservedWritePipe = 277,
858     SpvOpReserveReadPipePackets = 278,
859     SpvOpReserveWritePipePackets = 279,
860     SpvOpCommitReadPipe = 280,
861     SpvOpCommitWritePipe = 281,
862     SpvOpIsValidReserveId = 282,
863     SpvOpGetNumPipePackets = 283,
864     SpvOpGetMaxPipePackets = 284,
865     SpvOpGroupReserveReadPipePackets = 285,
866     SpvOpGroupReserveWritePipePackets = 286,
867     SpvOpGroupCommitReadPipe = 287,
868     SpvOpGroupCommitWritePipe = 288,
869     SpvOpEnqueueMarker = 291,
870     SpvOpEnqueueKernel = 292,
871     SpvOpGetKernelNDrangeSubGroupCount = 293,
872     SpvOpGetKernelNDrangeMaxSubGroupSize = 294,
873     SpvOpGetKernelWorkGroupSize = 295,
874     SpvOpGetKernelPreferredWorkGroupSizeMultiple = 296,
875     SpvOpRetainEvent = 297,
876     SpvOpReleaseEvent = 298,
877     SpvOpCreateUserEvent = 299,
878     SpvOpIsValidEvent = 300,
879     SpvOpSetUserEventStatus = 301,
880     SpvOpCaptureEventProfilingInfo = 302,
881     SpvOpGetDefaultQueue = 303,
882     SpvOpBuildNDRange = 304,
883     SpvOpImageSparseSampleImplicitLod = 305,
884     SpvOpImageSparseSampleExplicitLod = 306,
885     SpvOpImageSparseSampleDrefImplicitLod = 307,
886     SpvOpImageSparseSampleDrefExplicitLod = 308,
887     SpvOpImageSparseSampleProjImplicitLod = 309,
888     SpvOpImageSparseSampleProjExplicitLod = 310,
889     SpvOpImageSparseSampleProjDrefImplicitLod = 311,
890     SpvOpImageSparseSampleProjDrefExplicitLod = 312,
891     SpvOpImageSparseFetch = 313,
892     SpvOpImageSparseGather = 314,
893     SpvOpImageSparseDrefGather = 315,
894     SpvOpImageSparseTexelsResident = 316,
895     SpvOpNoLine = 317,
896     SpvOpAtomicFlagTestAndSet = 318,
897     SpvOpAtomicFlagClear = 319,
898     SpvOpImageSparseRead = 320,
899     SpvOpMax = 0x7fffffff,
900 } SpvOp;
901
902 #endif  // #ifndef spirv_H
903