1// Copyright (c) 2014-2016 The Khronos Group Inc.
2//
3// Permission is hereby granted, free of charge, to any person obtaining a copy
4// of this software and/or associated documentation files (the "Materials"),
5// to deal in the Materials without restriction, including without limitation
6// the rights to use, copy, modify, merge, publish, distribute, sublicense,
7// and/or sell copies of the Materials, and to permit persons to whom the
8// Materials are furnished to do so, subject to the following conditions:
9//
10// The above copyright notice and this permission notice shall be included in
11// all copies or substantial portions of the Materials.
12//
13// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
14// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
15// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
16//
17// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
23// IN THE MATERIALS.
24
25// This header is automatically generated by the same tool that creates
26// the Binary Section of the SPIR-V specification.
27
28// Enumeration tokens for SPIR-V, in various styles:
29//   C, C++, C++11, JSON, Lua, Python
30//
31// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
32// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
33// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
34// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
35// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
36//
37// Some tokens act like mask values, which can be OR'd together,
38// while others are mutually exclusive.  The mask-like ones have
39// "Mask" in their name, and a parallel enum that has the shift
40// amount (1 << x) for each corresponding enumerant.
41
42#ifndef spirv_HPP
43#define spirv_HPP
44
45namespace spv {
46
47typedef unsigned int Id;
48
49#define SPV_VERSION 0x10000
50#define SPV_REVISION 8
51
52static const unsigned int MagicNumber = 0x07230203;
53static const unsigned int Version = 0x00010000;
54static const unsigned int Revision = 8;
55static const unsigned int OpCodeMask = 0xffff;
56static const unsigned int WordCountShift = 16;
57
58enum SourceLanguage {
59    SourceLanguageUnknown = 0,
60    SourceLanguageESSL = 1,
61    SourceLanguageGLSL = 2,
62    SourceLanguageOpenCL_C = 3,
63    SourceLanguageOpenCL_CPP = 4,
64    SourceLanguageMax = 0x7fffffff,
65};
66
67enum ExecutionModel {
68    ExecutionModelVertex = 0,
69    ExecutionModelTessellationControl = 1,
70    ExecutionModelTessellationEvaluation = 2,
71    ExecutionModelGeometry = 3,
72    ExecutionModelFragment = 4,
73    ExecutionModelGLCompute = 5,
74    ExecutionModelKernel = 6,
75    ExecutionModelMax = 0x7fffffff,
76};
77
78enum AddressingModel {
79    AddressingModelLogical = 0,
80    AddressingModelPhysical32 = 1,
81    AddressingModelPhysical64 = 2,
82    AddressingModelMax = 0x7fffffff,
83};
84
85enum MemoryModel {
86    MemoryModelSimple = 0,
87    MemoryModelGLSL450 = 1,
88    MemoryModelOpenCL = 2,
89    MemoryModelMax = 0x7fffffff,
90};
91
92enum ExecutionMode {
93    ExecutionModeInvocations = 0,
94    ExecutionModeSpacingEqual = 1,
95    ExecutionModeSpacingFractionalEven = 2,
96    ExecutionModeSpacingFractionalOdd = 3,
97    ExecutionModeVertexOrderCw = 4,
98    ExecutionModeVertexOrderCcw = 5,
99    ExecutionModePixelCenterInteger = 6,
100    ExecutionModeOriginUpperLeft = 7,
101    ExecutionModeOriginLowerLeft = 8,
102    ExecutionModeEarlyFragmentTests = 9,
103    ExecutionModePointMode = 10,
104    ExecutionModeXfb = 11,
105    ExecutionModeDepthReplacing = 12,
106    ExecutionModeDepthGreater = 14,
107    ExecutionModeDepthLess = 15,
108    ExecutionModeDepthUnchanged = 16,
109    ExecutionModeLocalSize = 17,
110    ExecutionModeLocalSizeHint = 18,
111    ExecutionModeInputPoints = 19,
112    ExecutionModeInputLines = 20,
113    ExecutionModeInputLinesAdjacency = 21,
114    ExecutionModeTriangles = 22,
115    ExecutionModeInputTrianglesAdjacency = 23,
116    ExecutionModeQuads = 24,
117    ExecutionModeIsolines = 25,
118    ExecutionModeOutputVertices = 26,
119    ExecutionModeOutputPoints = 27,
120    ExecutionModeOutputLineStrip = 28,
121    ExecutionModeOutputTriangleStrip = 29,
122    ExecutionModeVecTypeHint = 30,
123    ExecutionModeContractionOff = 31,
124    ExecutionModeMax = 0x7fffffff,
125};
126
127enum StorageClass {
128    StorageClassUniformConstant = 0,
129    StorageClassInput = 1,
130    StorageClassUniform = 2,
131    StorageClassOutput = 3,
132    StorageClassWorkgroup = 4,
133    StorageClassCrossWorkgroup = 5,
134    StorageClassPrivate = 6,
135    StorageClassFunction = 7,
136    StorageClassGeneric = 8,
137    StorageClassPushConstant = 9,
138    StorageClassAtomicCounter = 10,
139    StorageClassImage = 11,
140    StorageClassMax = 0x7fffffff,
141};
142
143enum Dim {
144    Dim1D = 0,
145    Dim2D = 1,
146    Dim3D = 2,
147    DimCube = 3,
148    DimRect = 4,
149    DimBuffer = 5,
150    DimSubpassData = 6,
151    DimMax = 0x7fffffff,
152};
153
154enum SamplerAddressingMode {
155    SamplerAddressingModeNone = 0,
156    SamplerAddressingModeClampToEdge = 1,
157    SamplerAddressingModeClamp = 2,
158    SamplerAddressingModeRepeat = 3,
159    SamplerAddressingModeRepeatMirrored = 4,
160    SamplerAddressingModeMax = 0x7fffffff,
161};
162
163enum SamplerFilterMode {
164    SamplerFilterModeNearest = 0,
165    SamplerFilterModeLinear = 1,
166    SamplerFilterModeMax = 0x7fffffff,
167};
168
169enum ImageFormat {
170    ImageFormatUnknown = 0,
171    ImageFormatRgba32f = 1,
172    ImageFormatRgba16f = 2,
173    ImageFormatR32f = 3,
174    ImageFormatRgba8 = 4,
175    ImageFormatRgba8Snorm = 5,
176    ImageFormatRg32f = 6,
177    ImageFormatRg16f = 7,
178    ImageFormatR11fG11fB10f = 8,
179    ImageFormatR16f = 9,
180    ImageFormatRgba16 = 10,
181    ImageFormatRgb10A2 = 11,
182    ImageFormatRg16 = 12,
183    ImageFormatRg8 = 13,
184    ImageFormatR16 = 14,
185    ImageFormatR8 = 15,
186    ImageFormatRgba16Snorm = 16,
187    ImageFormatRg16Snorm = 17,
188    ImageFormatRg8Snorm = 18,
189    ImageFormatR16Snorm = 19,
190    ImageFormatR8Snorm = 20,
191    ImageFormatRgba32i = 21,
192    ImageFormatRgba16i = 22,
193    ImageFormatRgba8i = 23,
194    ImageFormatR32i = 24,
195    ImageFormatRg32i = 25,
196    ImageFormatRg16i = 26,
197    ImageFormatRg8i = 27,
198    ImageFormatR16i = 28,
199    ImageFormatR8i = 29,
200    ImageFormatRgba32ui = 30,
201    ImageFormatRgba16ui = 31,
202    ImageFormatRgba8ui = 32,
203    ImageFormatR32ui = 33,
204    ImageFormatRgb10a2ui = 34,
205    ImageFormatRg32ui = 35,
206    ImageFormatRg16ui = 36,
207    ImageFormatRg8ui = 37,
208    ImageFormatR16ui = 38,
209    ImageFormatR8ui = 39,
210    ImageFormatMax = 0x7fffffff,
211};
212
213enum ImageChannelOrder {
214    ImageChannelOrderR = 0,
215    ImageChannelOrderA = 1,
216    ImageChannelOrderRG = 2,
217    ImageChannelOrderRA = 3,
218    ImageChannelOrderRGB = 4,
219    ImageChannelOrderRGBA = 5,
220    ImageChannelOrderBGRA = 6,
221    ImageChannelOrderARGB = 7,
222    ImageChannelOrderIntensity = 8,
223    ImageChannelOrderLuminance = 9,
224    ImageChannelOrderRx = 10,
225    ImageChannelOrderRGx = 11,
226    ImageChannelOrderRGBx = 12,
227    ImageChannelOrderDepth = 13,
228    ImageChannelOrderDepthStencil = 14,
229    ImageChannelOrdersRGB = 15,
230    ImageChannelOrdersRGBx = 16,
231    ImageChannelOrdersRGBA = 17,
232    ImageChannelOrdersBGRA = 18,
233    ImageChannelOrderABGR = 19,
234    ImageChannelOrderMax = 0x7fffffff,
235};
236
237enum ImageChannelDataType {
238    ImageChannelDataTypeSnormInt8 = 0,
239    ImageChannelDataTypeSnormInt16 = 1,
240    ImageChannelDataTypeUnormInt8 = 2,
241    ImageChannelDataTypeUnormInt16 = 3,
242    ImageChannelDataTypeUnormShort565 = 4,
243    ImageChannelDataTypeUnormShort555 = 5,
244    ImageChannelDataTypeUnormInt101010 = 6,
245    ImageChannelDataTypeSignedInt8 = 7,
246    ImageChannelDataTypeSignedInt16 = 8,
247    ImageChannelDataTypeSignedInt32 = 9,
248    ImageChannelDataTypeUnsignedInt8 = 10,
249    ImageChannelDataTypeUnsignedInt16 = 11,
250    ImageChannelDataTypeUnsignedInt32 = 12,
251    ImageChannelDataTypeHalfFloat = 13,
252    ImageChannelDataTypeFloat = 14,
253    ImageChannelDataTypeUnormInt24 = 15,
254    ImageChannelDataTypeUnormInt101010_2 = 16,
255    ImageChannelDataTypeMax = 0x7fffffff,
256};
257
258enum ImageOperandsShift {
259    ImageOperandsBiasShift = 0,
260    ImageOperandsLodShift = 1,
261    ImageOperandsGradShift = 2,
262    ImageOperandsConstOffsetShift = 3,
263    ImageOperandsOffsetShift = 4,
264    ImageOperandsConstOffsetsShift = 5,
265    ImageOperandsSampleShift = 6,
266    ImageOperandsMinLodShift = 7,
267    ImageOperandsMax = 0x7fffffff,
268};
269
270enum ImageOperandsMask {
271    ImageOperandsMaskNone = 0,
272    ImageOperandsBiasMask = 0x00000001,
273    ImageOperandsLodMask = 0x00000002,
274    ImageOperandsGradMask = 0x00000004,
275    ImageOperandsConstOffsetMask = 0x00000008,
276    ImageOperandsOffsetMask = 0x00000010,
277    ImageOperandsConstOffsetsMask = 0x00000020,
278    ImageOperandsSampleMask = 0x00000040,
279    ImageOperandsMinLodMask = 0x00000080,
280};
281
282enum FPFastMathModeShift {
283    FPFastMathModeNotNaNShift = 0,
284    FPFastMathModeNotInfShift = 1,
285    FPFastMathModeNSZShift = 2,
286    FPFastMathModeAllowRecipShift = 3,
287    FPFastMathModeFastShift = 4,
288    FPFastMathModeMax = 0x7fffffff,
289};
290
291enum FPFastMathModeMask {
292    FPFastMathModeMaskNone = 0,
293    FPFastMathModeNotNaNMask = 0x00000001,
294    FPFastMathModeNotInfMask = 0x00000002,
295    FPFastMathModeNSZMask = 0x00000004,
296    FPFastMathModeAllowRecipMask = 0x00000008,
297    FPFastMathModeFastMask = 0x00000010,
298};
299
300enum FPRoundingMode {
301    FPRoundingModeRTE = 0,
302    FPRoundingModeRTZ = 1,
303    FPRoundingModeRTP = 2,
304    FPRoundingModeRTN = 3,
305    FPRoundingModeMax = 0x7fffffff,
306};
307
308enum LinkageType {
309    LinkageTypeExport = 0,
310    LinkageTypeImport = 1,
311    LinkageTypeMax = 0x7fffffff,
312};
313
314enum AccessQualifier {
315    AccessQualifierReadOnly = 0,
316    AccessQualifierWriteOnly = 1,
317    AccessQualifierReadWrite = 2,
318    AccessQualifierMax = 0x7fffffff,
319};
320
321enum FunctionParameterAttribute {
322    FunctionParameterAttributeZext = 0,
323    FunctionParameterAttributeSext = 1,
324    FunctionParameterAttributeByVal = 2,
325    FunctionParameterAttributeSret = 3,
326    FunctionParameterAttributeNoAlias = 4,
327    FunctionParameterAttributeNoCapture = 5,
328    FunctionParameterAttributeNoWrite = 6,
329    FunctionParameterAttributeNoReadWrite = 7,
330    FunctionParameterAttributeMax = 0x7fffffff,
331};
332
333enum Decoration {
334    DecorationRelaxedPrecision = 0,
335    DecorationSpecId = 1,
336    DecorationBlock = 2,
337    DecorationBufferBlock = 3,
338    DecorationRowMajor = 4,
339    DecorationColMajor = 5,
340    DecorationArrayStride = 6,
341    DecorationMatrixStride = 7,
342    DecorationGLSLShared = 8,
343    DecorationGLSLPacked = 9,
344    DecorationCPacked = 10,
345    DecorationBuiltIn = 11,
346    DecorationNoPerspective = 13,
347    DecorationFlat = 14,
348    DecorationPatch = 15,
349    DecorationCentroid = 16,
350    DecorationSample = 17,
351    DecorationInvariant = 18,
352    DecorationRestrict = 19,
353    DecorationAliased = 20,
354    DecorationVolatile = 21,
355    DecorationConstant = 22,
356    DecorationCoherent = 23,
357    DecorationNonWritable = 24,
358    DecorationNonReadable = 25,
359    DecorationUniform = 26,
360    DecorationSaturatedConversion = 28,
361    DecorationStream = 29,
362    DecorationLocation = 30,
363    DecorationComponent = 31,
364    DecorationIndex = 32,
365    DecorationBinding = 33,
366    DecorationDescriptorSet = 34,
367    DecorationOffset = 35,
368    DecorationXfbBuffer = 36,
369    DecorationXfbStride = 37,
370    DecorationFuncParamAttr = 38,
371    DecorationFPRoundingMode = 39,
372    DecorationFPFastMathMode = 40,
373    DecorationLinkageAttributes = 41,
374    DecorationNoContraction = 42,
375    DecorationInputAttachmentIndex = 43,
376    DecorationAlignment = 44,
377    DecorationMax = 0x7fffffff,
378};
379
380enum BuiltIn {
381    BuiltInPosition = 0,
382    BuiltInPointSize = 1,
383    BuiltInClipDistance = 3,
384    BuiltInCullDistance = 4,
385    BuiltInVertexId = 5,
386    BuiltInInstanceId = 6,
387    BuiltInPrimitiveId = 7,
388    BuiltInInvocationId = 8,
389    BuiltInLayer = 9,
390    BuiltInViewportIndex = 10,
391    BuiltInTessLevelOuter = 11,
392    BuiltInTessLevelInner = 12,
393    BuiltInTessCoord = 13,
394    BuiltInPatchVertices = 14,
395    BuiltInFragCoord = 15,
396    BuiltInPointCoord = 16,
397    BuiltInFrontFacing = 17,
398    BuiltInSampleId = 18,
399    BuiltInSamplePosition = 19,
400    BuiltInSampleMask = 20,
401    BuiltInFragDepth = 22,
402    BuiltInHelperInvocation = 23,
403    BuiltInNumWorkgroups = 24,
404    BuiltInWorkgroupSize = 25,
405    BuiltInWorkgroupId = 26,
406    BuiltInLocalInvocationId = 27,
407    BuiltInGlobalInvocationId = 28,
408    BuiltInLocalInvocationIndex = 29,
409    BuiltInWorkDim = 30,
410    BuiltInGlobalSize = 31,
411    BuiltInEnqueuedWorkgroupSize = 32,
412    BuiltInGlobalOffset = 33,
413    BuiltInGlobalLinearId = 34,
414    BuiltInSubgroupSize = 36,
415    BuiltInSubgroupMaxSize = 37,
416    BuiltInNumSubgroups = 38,
417    BuiltInNumEnqueuedSubgroups = 39,
418    BuiltInSubgroupId = 40,
419    BuiltInSubgroupLocalInvocationId = 41,
420    BuiltInVertexIndex = 42,
421    BuiltInInstanceIndex = 43,
422    BuiltInSubgroupEqMaskKHR = 4416,
423    BuiltInSubgroupGeMaskKHR = 4417,
424    BuiltInSubgroupGtMaskKHR = 4418,
425    BuiltInSubgroupLeMaskKHR = 4419,
426    BuiltInSubgroupLtMaskKHR = 4420,
427    BuiltInBaseVertex = 4424,
428    BuiltInBaseInstance = 4425,
429    BuiltInDrawIndex = 4426,
430    BuiltInMax = 0x7fffffff,
431};
432
433enum SelectionControlShift {
434    SelectionControlFlattenShift = 0,
435    SelectionControlDontFlattenShift = 1,
436    SelectionControlMax = 0x7fffffff,
437};
438
439enum SelectionControlMask {
440    SelectionControlMaskNone = 0,
441    SelectionControlFlattenMask = 0x00000001,
442    SelectionControlDontFlattenMask = 0x00000002,
443};
444
445enum LoopControlShift {
446    LoopControlUnrollShift = 0,
447    LoopControlDontUnrollShift = 1,
448    LoopControlMax = 0x7fffffff,
449};
450
451enum LoopControlMask {
452    LoopControlMaskNone = 0,
453    LoopControlUnrollMask = 0x00000001,
454    LoopControlDontUnrollMask = 0x00000002,
455};
456
457enum FunctionControlShift {
458    FunctionControlInlineShift = 0,
459    FunctionControlDontInlineShift = 1,
460    FunctionControlPureShift = 2,
461    FunctionControlConstShift = 3,
462    FunctionControlMax = 0x7fffffff,
463};
464
465enum FunctionControlMask {
466    FunctionControlMaskNone = 0,
467    FunctionControlInlineMask = 0x00000001,
468    FunctionControlDontInlineMask = 0x00000002,
469    FunctionControlPureMask = 0x00000004,
470    FunctionControlConstMask = 0x00000008,
471};
472
473enum MemorySemanticsShift {
474    MemorySemanticsAcquireShift = 1,
475    MemorySemanticsReleaseShift = 2,
476    MemorySemanticsAcquireReleaseShift = 3,
477    MemorySemanticsSequentiallyConsistentShift = 4,
478    MemorySemanticsUniformMemoryShift = 6,
479    MemorySemanticsSubgroupMemoryShift = 7,
480    MemorySemanticsWorkgroupMemoryShift = 8,
481    MemorySemanticsCrossWorkgroupMemoryShift = 9,
482    MemorySemanticsAtomicCounterMemoryShift = 10,
483    MemorySemanticsImageMemoryShift = 11,
484    MemorySemanticsMax = 0x7fffffff,
485};
486
487enum MemorySemanticsMask {
488    MemorySemanticsMaskNone = 0,
489    MemorySemanticsAcquireMask = 0x00000002,
490    MemorySemanticsReleaseMask = 0x00000004,
491    MemorySemanticsAcquireReleaseMask = 0x00000008,
492    MemorySemanticsSequentiallyConsistentMask = 0x00000010,
493    MemorySemanticsUniformMemoryMask = 0x00000040,
494    MemorySemanticsSubgroupMemoryMask = 0x00000080,
495    MemorySemanticsWorkgroupMemoryMask = 0x00000100,
496    MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
497    MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
498    MemorySemanticsImageMemoryMask = 0x00000800,
499};
500
501enum MemoryAccessShift {
502    MemoryAccessVolatileShift = 0,
503    MemoryAccessAlignedShift = 1,
504    MemoryAccessNontemporalShift = 2,
505    MemoryAccessMax = 0x7fffffff,
506};
507
508enum MemoryAccessMask {
509    MemoryAccessMaskNone = 0,
510    MemoryAccessVolatileMask = 0x00000001,
511    MemoryAccessAlignedMask = 0x00000002,
512    MemoryAccessNontemporalMask = 0x00000004,
513};
514
515enum Scope {
516    ScopeCrossDevice = 0,
517    ScopeDevice = 1,
518    ScopeWorkgroup = 2,
519    ScopeSubgroup = 3,
520    ScopeInvocation = 4,
521    ScopeMax = 0x7fffffff,
522};
523
524enum GroupOperation {
525    GroupOperationReduce = 0,
526    GroupOperationInclusiveScan = 1,
527    GroupOperationExclusiveScan = 2,
528    GroupOperationMax = 0x7fffffff,
529};
530
531enum KernelEnqueueFlags {
532    KernelEnqueueFlagsNoWait = 0,
533    KernelEnqueueFlagsWaitKernel = 1,
534    KernelEnqueueFlagsWaitWorkGroup = 2,
535    KernelEnqueueFlagsMax = 0x7fffffff,
536};
537
538enum KernelProfilingInfoShift {
539    KernelProfilingInfoCmdExecTimeShift = 0,
540    KernelProfilingInfoMax = 0x7fffffff,
541};
542
543enum KernelProfilingInfoMask {
544    KernelProfilingInfoMaskNone = 0,
545    KernelProfilingInfoCmdExecTimeMask = 0x00000001,
546};
547
548enum Capability {
549    CapabilityMatrix = 0,
550    CapabilityShader = 1,
551    CapabilityGeometry = 2,
552    CapabilityTessellation = 3,
553    CapabilityAddresses = 4,
554    CapabilityLinkage = 5,
555    CapabilityKernel = 6,
556    CapabilityVector16 = 7,
557    CapabilityFloat16Buffer = 8,
558    CapabilityFloat16 = 9,
559    CapabilityFloat64 = 10,
560    CapabilityInt64 = 11,
561    CapabilityInt64Atomics = 12,
562    CapabilityImageBasic = 13,
563    CapabilityImageReadWrite = 14,
564    CapabilityImageMipmap = 15,
565    CapabilityPipes = 17,
566    CapabilityGroups = 18,
567    CapabilityDeviceEnqueue = 19,
568    CapabilityLiteralSampler = 20,
569    CapabilityAtomicStorage = 21,
570    CapabilityInt16 = 22,
571    CapabilityTessellationPointSize = 23,
572    CapabilityGeometryPointSize = 24,
573    CapabilityImageGatherExtended = 25,
574    CapabilityStorageImageMultisample = 27,
575    CapabilityUniformBufferArrayDynamicIndexing = 28,
576    CapabilitySampledImageArrayDynamicIndexing = 29,
577    CapabilityStorageBufferArrayDynamicIndexing = 30,
578    CapabilityStorageImageArrayDynamicIndexing = 31,
579    CapabilityClipDistance = 32,
580    CapabilityCullDistance = 33,
581    CapabilityImageCubeArray = 34,
582    CapabilitySampleRateShading = 35,
583    CapabilityImageRect = 36,
584    CapabilitySampledRect = 37,
585    CapabilityGenericPointer = 38,
586    CapabilityInt8 = 39,
587    CapabilityInputAttachment = 40,
588    CapabilitySparseResidency = 41,
589    CapabilityMinLod = 42,
590    CapabilitySampled1D = 43,
591    CapabilityImage1D = 44,
592    CapabilitySampledCubeArray = 45,
593    CapabilitySampledBuffer = 46,
594    CapabilityImageBuffer = 47,
595    CapabilityImageMSArray = 48,
596    CapabilityStorageImageExtendedFormats = 49,
597    CapabilityImageQuery = 50,
598    CapabilityDerivativeControl = 51,
599    CapabilityInterpolationFunction = 52,
600    CapabilityTransformFeedback = 53,
601    CapabilityGeometryStreams = 54,
602    CapabilityStorageImageReadWithoutFormat = 55,
603    CapabilityStorageImageWriteWithoutFormat = 56,
604    CapabilityMultiViewport = 57,
605    CapabilitySubgroupBallotKHR = 4423,
606    CapabilityDrawParameters = 4427,
607    CapabilityMax = 0x7fffffff,
608};
609
610enum Op {
611    OpNop = 0,
612    OpUndef = 1,
613    OpSourceContinued = 2,
614    OpSource = 3,
615    OpSourceExtension = 4,
616    OpName = 5,
617    OpMemberName = 6,
618    OpString = 7,
619    OpLine = 8,
620    OpExtension = 10,
621    OpExtInstImport = 11,
622    OpExtInst = 12,
623    OpMemoryModel = 14,
624    OpEntryPoint = 15,
625    OpExecutionMode = 16,
626    OpCapability = 17,
627    OpTypeVoid = 19,
628    OpTypeBool = 20,
629    OpTypeInt = 21,
630    OpTypeFloat = 22,
631    OpTypeVector = 23,
632    OpTypeMatrix = 24,
633    OpTypeImage = 25,
634    OpTypeSampler = 26,
635    OpTypeSampledImage = 27,
636    OpTypeArray = 28,
637    OpTypeRuntimeArray = 29,
638    OpTypeStruct = 30,
639    OpTypeOpaque = 31,
640    OpTypePointer = 32,
641    OpTypeFunction = 33,
642    OpTypeEvent = 34,
643    OpTypeDeviceEvent = 35,
644    OpTypeReserveId = 36,
645    OpTypeQueue = 37,
646    OpTypePipe = 38,
647    OpTypeForwardPointer = 39,
648    OpConstantTrue = 41,
649    OpConstantFalse = 42,
650    OpConstant = 43,
651    OpConstantComposite = 44,
652    OpConstantSampler = 45,
653    OpConstantNull = 46,
654    OpSpecConstantTrue = 48,
655    OpSpecConstantFalse = 49,
656    OpSpecConstant = 50,
657    OpSpecConstantComposite = 51,
658    OpSpecConstantOp = 52,
659    OpFunction = 54,
660    OpFunctionParameter = 55,
661    OpFunctionEnd = 56,
662    OpFunctionCall = 57,
663    OpVariable = 59,
664    OpImageTexelPointer = 60,
665    OpLoad = 61,
666    OpStore = 62,
667    OpCopyMemory = 63,
668    OpCopyMemorySized = 64,
669    OpAccessChain = 65,
670    OpInBoundsAccessChain = 66,
671    OpPtrAccessChain = 67,
672    OpArrayLength = 68,
673    OpGenericPtrMemSemantics = 69,
674    OpInBoundsPtrAccessChain = 70,
675    OpDecorate = 71,
676    OpMemberDecorate = 72,
677    OpDecorationGroup = 73,
678    OpGroupDecorate = 74,
679    OpGroupMemberDecorate = 75,
680    OpVectorExtractDynamic = 77,
681    OpVectorInsertDynamic = 78,
682    OpVectorShuffle = 79,
683    OpCompositeConstruct = 80,
684    OpCompositeExtract = 81,
685    OpCompositeInsert = 82,
686    OpCopyObject = 83,
687    OpTranspose = 84,
688    OpSampledImage = 86,
689    OpImageSampleImplicitLod = 87,
690    OpImageSampleExplicitLod = 88,
691    OpImageSampleDrefImplicitLod = 89,
692    OpImageSampleDrefExplicitLod = 90,
693    OpImageSampleProjImplicitLod = 91,
694    OpImageSampleProjExplicitLod = 92,
695    OpImageSampleProjDrefImplicitLod = 93,
696    OpImageSampleProjDrefExplicitLod = 94,
697    OpImageFetch = 95,
698    OpImageGather = 96,
699    OpImageDrefGather = 97,
700    OpImageRead = 98,
701    OpImageWrite = 99,
702    OpImage = 100,
703    OpImageQueryFormat = 101,
704    OpImageQueryOrder = 102,
705    OpImageQuerySizeLod = 103,
706    OpImageQuerySize = 104,
707    OpImageQueryLod = 105,
708    OpImageQueryLevels = 106,
709    OpImageQuerySamples = 107,
710    OpConvertFToU = 109,
711    OpConvertFToS = 110,
712    OpConvertSToF = 111,
713    OpConvertUToF = 112,
714    OpUConvert = 113,
715    OpSConvert = 114,
716    OpFConvert = 115,
717    OpQuantizeToF16 = 116,
718    OpConvertPtrToU = 117,
719    OpSatConvertSToU = 118,
720    OpSatConvertUToS = 119,
721    OpConvertUToPtr = 120,
722    OpPtrCastToGeneric = 121,
723    OpGenericCastToPtr = 122,
724    OpGenericCastToPtrExplicit = 123,
725    OpBitcast = 124,
726    OpSNegate = 126,
727    OpFNegate = 127,
728    OpIAdd = 128,
729    OpFAdd = 129,
730    OpISub = 130,
731    OpFSub = 131,
732    OpIMul = 132,
733    OpFMul = 133,
734    OpUDiv = 134,
735    OpSDiv = 135,
736    OpFDiv = 136,
737    OpUMod = 137,
738    OpSRem = 138,
739    OpSMod = 139,
740    OpFRem = 140,
741    OpFMod = 141,
742    OpVectorTimesScalar = 142,
743    OpMatrixTimesScalar = 143,
744    OpVectorTimesMatrix = 144,
745    OpMatrixTimesVector = 145,
746    OpMatrixTimesMatrix = 146,
747    OpOuterProduct = 147,
748    OpDot = 148,
749    OpIAddCarry = 149,
750    OpISubBorrow = 150,
751    OpUMulExtended = 151,
752    OpSMulExtended = 152,
753    OpAny = 154,
754    OpAll = 155,
755    OpIsNan = 156,
756    OpIsInf = 157,
757    OpIsFinite = 158,
758    OpIsNormal = 159,
759    OpSignBitSet = 160,
760    OpLessOrGreater = 161,
761    OpOrdered = 162,
762    OpUnordered = 163,
763    OpLogicalEqual = 164,
764    OpLogicalNotEqual = 165,
765    OpLogicalOr = 166,
766    OpLogicalAnd = 167,
767    OpLogicalNot = 168,
768    OpSelect = 169,
769    OpIEqual = 170,
770    OpINotEqual = 171,
771    OpUGreaterThan = 172,
772    OpSGreaterThan = 173,
773    OpUGreaterThanEqual = 174,
774    OpSGreaterThanEqual = 175,
775    OpULessThan = 176,
776    OpSLessThan = 177,
777    OpULessThanEqual = 178,
778    OpSLessThanEqual = 179,
779    OpFOrdEqual = 180,
780    OpFUnordEqual = 181,
781    OpFOrdNotEqual = 182,
782    OpFUnordNotEqual = 183,
783    OpFOrdLessThan = 184,
784    OpFUnordLessThan = 185,
785    OpFOrdGreaterThan = 186,
786    OpFUnordGreaterThan = 187,
787    OpFOrdLessThanEqual = 188,
788    OpFUnordLessThanEqual = 189,
789    OpFOrdGreaterThanEqual = 190,
790    OpFUnordGreaterThanEqual = 191,
791    OpShiftRightLogical = 194,
792    OpShiftRightArithmetic = 195,
793    OpShiftLeftLogical = 196,
794    OpBitwiseOr = 197,
795    OpBitwiseXor = 198,
796    OpBitwiseAnd = 199,
797    OpNot = 200,
798    OpBitFieldInsert = 201,
799    OpBitFieldSExtract = 202,
800    OpBitFieldUExtract = 203,
801    OpBitReverse = 204,
802    OpBitCount = 205,
803    OpDPdx = 207,
804    OpDPdy = 208,
805    OpFwidth = 209,
806    OpDPdxFine = 210,
807    OpDPdyFine = 211,
808    OpFwidthFine = 212,
809    OpDPdxCoarse = 213,
810    OpDPdyCoarse = 214,
811    OpFwidthCoarse = 215,
812    OpEmitVertex = 218,
813    OpEndPrimitive = 219,
814    OpEmitStreamVertex = 220,
815    OpEndStreamPrimitive = 221,
816    OpControlBarrier = 224,
817    OpMemoryBarrier = 225,
818    OpAtomicLoad = 227,
819    OpAtomicStore = 228,
820    OpAtomicExchange = 229,
821    OpAtomicCompareExchange = 230,
822    OpAtomicCompareExchangeWeak = 231,
823    OpAtomicIIncrement = 232,
824    OpAtomicIDecrement = 233,
825    OpAtomicIAdd = 234,
826    OpAtomicISub = 235,
827    OpAtomicSMin = 236,
828    OpAtomicUMin = 237,
829    OpAtomicSMax = 238,
830    OpAtomicUMax = 239,
831    OpAtomicAnd = 240,
832    OpAtomicOr = 241,
833    OpAtomicXor = 242,
834    OpPhi = 245,
835    OpLoopMerge = 246,
836    OpSelectionMerge = 247,
837    OpLabel = 248,
838    OpBranch = 249,
839    OpBranchConditional = 250,
840    OpSwitch = 251,
841    OpKill = 252,
842    OpReturn = 253,
843    OpReturnValue = 254,
844    OpUnreachable = 255,
845    OpLifetimeStart = 256,
846    OpLifetimeStop = 257,
847    OpGroupAsyncCopy = 259,
848    OpGroupWaitEvents = 260,
849    OpGroupAll = 261,
850    OpGroupAny = 262,
851    OpGroupBroadcast = 263,
852    OpGroupIAdd = 264,
853    OpGroupFAdd = 265,
854    OpGroupFMin = 266,
855    OpGroupUMin = 267,
856    OpGroupSMin = 268,
857    OpGroupFMax = 269,
858    OpGroupUMax = 270,
859    OpGroupSMax = 271,
860    OpReadPipe = 274,
861    OpWritePipe = 275,
862    OpReservedReadPipe = 276,
863    OpReservedWritePipe = 277,
864    OpReserveReadPipePackets = 278,
865    OpReserveWritePipePackets = 279,
866    OpCommitReadPipe = 280,
867    OpCommitWritePipe = 281,
868    OpIsValidReserveId = 282,
869    OpGetNumPipePackets = 283,
870    OpGetMaxPipePackets = 284,
871    OpGroupReserveReadPipePackets = 285,
872    OpGroupReserveWritePipePackets = 286,
873    OpGroupCommitReadPipe = 287,
874    OpGroupCommitWritePipe = 288,
875    OpEnqueueMarker = 291,
876    OpEnqueueKernel = 292,
877    OpGetKernelNDrangeSubGroupCount = 293,
878    OpGetKernelNDrangeMaxSubGroupSize = 294,
879    OpGetKernelWorkGroupSize = 295,
880    OpGetKernelPreferredWorkGroupSizeMultiple = 296,
881    OpRetainEvent = 297,
882    OpReleaseEvent = 298,
883    OpCreateUserEvent = 299,
884    OpIsValidEvent = 300,
885    OpSetUserEventStatus = 301,
886    OpCaptureEventProfilingInfo = 302,
887    OpGetDefaultQueue = 303,
888    OpBuildNDRange = 304,
889    OpImageSparseSampleImplicitLod = 305,
890    OpImageSparseSampleExplicitLod = 306,
891    OpImageSparseSampleDrefImplicitLod = 307,
892    OpImageSparseSampleDrefExplicitLod = 308,
893    OpImageSparseSampleProjImplicitLod = 309,
894    OpImageSparseSampleProjExplicitLod = 310,
895    OpImageSparseSampleProjDrefImplicitLod = 311,
896    OpImageSparseSampleProjDrefExplicitLod = 312,
897    OpImageSparseFetch = 313,
898    OpImageSparseGather = 314,
899    OpImageSparseDrefGather = 315,
900    OpImageSparseTexelsResident = 316,
901    OpNoLine = 317,
902    OpAtomicFlagTestAndSet = 318,
903    OpAtomicFlagClear = 319,
904    OpImageSparseRead = 320,
905    OpSubgroupBallotKHR = 4421,
906    OpSubgroupFirstInvocationKHR = 4422,
907    OpMax = 0x7fffffff,
908};
909
910// Overload operator| for mask bit combining
911
912inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
913inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
914inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
915inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
916inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
917inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
918inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
919inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
920
921}  // end namespace spv
922
923#endif  // #ifndef spirv_HPP
924
925