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