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