Add SPV_KHR_shader_ballot enumerants for 1.0.
[platform/upstream/SPIRV-Headers.git] / include / spirv / 1.0 / spirv.hpp
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
45 namespace spv {
46
47 typedef unsigned int Id;
48
49 #define SPV_VERSION 0x10000
50 #define SPV_REVISION 7
51
52 static const unsigned int MagicNumber = 0x07230203;
53 static const unsigned int Version = 0x00010000;
54 static const unsigned int Revision = 7;
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     SourceLanguageMax = 0x7fffffff,
65 };
66
67 enum 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
78 enum AddressingModel {
79     AddressingModelLogical = 0,
80     AddressingModelPhysical32 = 1,
81     AddressingModelPhysical64 = 2,
82     AddressingModelMax = 0x7fffffff,
83 };
84
85 enum MemoryModel {
86     MemoryModelSimple = 0,
87     MemoryModelGLSL450 = 1,
88     MemoryModelOpenCL = 2,
89     MemoryModelMax = 0x7fffffff,
90 };
91
92 enum 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
127 enum 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
143 enum 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
154 enum SamplerAddressingMode {
155     SamplerAddressingModeNone = 0,
156     SamplerAddressingModeClampToEdge = 1,
157     SamplerAddressingModeClamp = 2,
158     SamplerAddressingModeRepeat = 3,
159     SamplerAddressingModeRepeatMirrored = 4,
160     SamplerAddressingModeMax = 0x7fffffff,
161 };
162
163 enum SamplerFilterMode {
164     SamplerFilterModeNearest = 0,
165     SamplerFilterModeLinear = 1,
166     SamplerFilterModeMax = 0x7fffffff,
167 };
168
169 enum 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
213 enum 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
237 enum 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
258 enum 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
270 enum 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
282 enum FPFastMathModeShift {
283     FPFastMathModeNotNaNShift = 0,
284     FPFastMathModeNotInfShift = 1,
285     FPFastMathModeNSZShift = 2,
286     FPFastMathModeAllowRecipShift = 3,
287     FPFastMathModeFastShift = 4,
288     FPFastMathModeMax = 0x7fffffff,
289 };
290
291 enum FPFastMathModeMask {
292     FPFastMathModeMaskNone = 0,
293     FPFastMathModeNotNaNMask = 0x00000001,
294     FPFastMathModeNotInfMask = 0x00000002,
295     FPFastMathModeNSZMask = 0x00000004,
296     FPFastMathModeAllowRecipMask = 0x00000008,
297     FPFastMathModeFastMask = 0x00000010,
298 };
299
300 enum FPRoundingMode {
301     FPRoundingModeRTE = 0,
302     FPRoundingModeRTZ = 1,
303     FPRoundingModeRTP = 2,
304     FPRoundingModeRTN = 3,
305     FPRoundingModeMax = 0x7fffffff,
306 };
307
308 enum LinkageType {
309     LinkageTypeExport = 0,
310     LinkageTypeImport = 1,
311     LinkageTypeMax = 0x7fffffff,
312 };
313
314 enum AccessQualifier {
315     AccessQualifierReadOnly = 0,
316     AccessQualifierWriteOnly = 1,
317     AccessQualifierReadWrite = 2,
318     AccessQualifierMax = 0x7fffffff,
319 };
320
321 enum 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
333 enum 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
380 enum 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     BuiltInMax = 0x7fffffff,
428 };
429
430 enum SelectionControlShift {
431     SelectionControlFlattenShift = 0,
432     SelectionControlDontFlattenShift = 1,
433     SelectionControlMax = 0x7fffffff,
434 };
435
436 enum SelectionControlMask {
437     SelectionControlMaskNone = 0,
438     SelectionControlFlattenMask = 0x00000001,
439     SelectionControlDontFlattenMask = 0x00000002,
440 };
441
442 enum LoopControlShift {
443     LoopControlUnrollShift = 0,
444     LoopControlDontUnrollShift = 1,
445     LoopControlMax = 0x7fffffff,
446 };
447
448 enum LoopControlMask {
449     LoopControlMaskNone = 0,
450     LoopControlUnrollMask = 0x00000001,
451     LoopControlDontUnrollMask = 0x00000002,
452 };
453
454 enum FunctionControlShift {
455     FunctionControlInlineShift = 0,
456     FunctionControlDontInlineShift = 1,
457     FunctionControlPureShift = 2,
458     FunctionControlConstShift = 3,
459     FunctionControlMax = 0x7fffffff,
460 };
461
462 enum FunctionControlMask {
463     FunctionControlMaskNone = 0,
464     FunctionControlInlineMask = 0x00000001,
465     FunctionControlDontInlineMask = 0x00000002,
466     FunctionControlPureMask = 0x00000004,
467     FunctionControlConstMask = 0x00000008,
468 };
469
470 enum MemorySemanticsShift {
471     MemorySemanticsAcquireShift = 1,
472     MemorySemanticsReleaseShift = 2,
473     MemorySemanticsAcquireReleaseShift = 3,
474     MemorySemanticsSequentiallyConsistentShift = 4,
475     MemorySemanticsUniformMemoryShift = 6,
476     MemorySemanticsSubgroupMemoryShift = 7,
477     MemorySemanticsWorkgroupMemoryShift = 8,
478     MemorySemanticsCrossWorkgroupMemoryShift = 9,
479     MemorySemanticsAtomicCounterMemoryShift = 10,
480     MemorySemanticsImageMemoryShift = 11,
481     MemorySemanticsMax = 0x7fffffff,
482 };
483
484 enum MemorySemanticsMask {
485     MemorySemanticsMaskNone = 0,
486     MemorySemanticsAcquireMask = 0x00000002,
487     MemorySemanticsReleaseMask = 0x00000004,
488     MemorySemanticsAcquireReleaseMask = 0x00000008,
489     MemorySemanticsSequentiallyConsistentMask = 0x00000010,
490     MemorySemanticsUniformMemoryMask = 0x00000040,
491     MemorySemanticsSubgroupMemoryMask = 0x00000080,
492     MemorySemanticsWorkgroupMemoryMask = 0x00000100,
493     MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
494     MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
495     MemorySemanticsImageMemoryMask = 0x00000800,
496 };
497
498 enum MemoryAccessShift {
499     MemoryAccessVolatileShift = 0,
500     MemoryAccessAlignedShift = 1,
501     MemoryAccessNontemporalShift = 2,
502     MemoryAccessMax = 0x7fffffff,
503 };
504
505 enum MemoryAccessMask {
506     MemoryAccessMaskNone = 0,
507     MemoryAccessVolatileMask = 0x00000001,
508     MemoryAccessAlignedMask = 0x00000002,
509     MemoryAccessNontemporalMask = 0x00000004,
510 };
511
512 enum Scope {
513     ScopeCrossDevice = 0,
514     ScopeDevice = 1,
515     ScopeWorkgroup = 2,
516     ScopeSubgroup = 3,
517     ScopeInvocation = 4,
518     ScopeMax = 0x7fffffff,
519 };
520
521 enum GroupOperation {
522     GroupOperationReduce = 0,
523     GroupOperationInclusiveScan = 1,
524     GroupOperationExclusiveScan = 2,
525     GroupOperationMax = 0x7fffffff,
526 };
527
528 enum KernelEnqueueFlags {
529     KernelEnqueueFlagsNoWait = 0,
530     KernelEnqueueFlagsWaitKernel = 1,
531     KernelEnqueueFlagsWaitWorkGroup = 2,
532     KernelEnqueueFlagsMax = 0x7fffffff,
533 };
534
535 enum KernelProfilingInfoShift {
536     KernelProfilingInfoCmdExecTimeShift = 0,
537     KernelProfilingInfoMax = 0x7fffffff,
538 };
539
540 enum KernelProfilingInfoMask {
541     KernelProfilingInfoMaskNone = 0,
542     KernelProfilingInfoCmdExecTimeMask = 0x00000001,
543 };
544
545 enum Capability {
546     CapabilityMatrix = 0,
547     CapabilityShader = 1,
548     CapabilityGeometry = 2,
549     CapabilityTessellation = 3,
550     CapabilityAddresses = 4,
551     CapabilityLinkage = 5,
552     CapabilityKernel = 6,
553     CapabilityVector16 = 7,
554     CapabilityFloat16Buffer = 8,
555     CapabilityFloat16 = 9,
556     CapabilityFloat64 = 10,
557     CapabilityInt64 = 11,
558     CapabilityInt64Atomics = 12,
559     CapabilityImageBasic = 13,
560     CapabilityImageReadWrite = 14,
561     CapabilityImageMipmap = 15,
562     CapabilityPipes = 17,
563     CapabilityGroups = 18,
564     CapabilityDeviceEnqueue = 19,
565     CapabilityLiteralSampler = 20,
566     CapabilityAtomicStorage = 21,
567     CapabilityInt16 = 22,
568     CapabilityTessellationPointSize = 23,
569     CapabilityGeometryPointSize = 24,
570     CapabilityImageGatherExtended = 25,
571     CapabilityStorageImageMultisample = 27,
572     CapabilityUniformBufferArrayDynamicIndexing = 28,
573     CapabilitySampledImageArrayDynamicIndexing = 29,
574     CapabilityStorageBufferArrayDynamicIndexing = 30,
575     CapabilityStorageImageArrayDynamicIndexing = 31,
576     CapabilityClipDistance = 32,
577     CapabilityCullDistance = 33,
578     CapabilityImageCubeArray = 34,
579     CapabilitySampleRateShading = 35,
580     CapabilityImageRect = 36,
581     CapabilitySampledRect = 37,
582     CapabilityGenericPointer = 38,
583     CapabilityInt8 = 39,
584     CapabilityInputAttachment = 40,
585     CapabilitySparseResidency = 41,
586     CapabilityMinLod = 42,
587     CapabilitySampled1D = 43,
588     CapabilityImage1D = 44,
589     CapabilitySampledCubeArray = 45,
590     CapabilitySampledBuffer = 46,
591     CapabilityImageBuffer = 47,
592     CapabilityImageMSArray = 48,
593     CapabilityStorageImageExtendedFormats = 49,
594     CapabilityImageQuery = 50,
595     CapabilityDerivativeControl = 51,
596     CapabilityInterpolationFunction = 52,
597     CapabilityTransformFeedback = 53,
598     CapabilityGeometryStreams = 54,
599     CapabilityStorageImageReadWithoutFormat = 55,
600     CapabilityStorageImageWriteWithoutFormat = 56,
601     CapabilityMultiViewport = 57,
602     CapabilitySubgroupBallotKHR = 4423,
603     CapabilityMax = 0x7fffffff,
604 };
605
606 enum Op {
607     OpNop = 0,
608     OpUndef = 1,
609     OpSourceContinued = 2,
610     OpSource = 3,
611     OpSourceExtension = 4,
612     OpName = 5,
613     OpMemberName = 6,
614     OpString = 7,
615     OpLine = 8,
616     OpExtension = 10,
617     OpExtInstImport = 11,
618     OpExtInst = 12,
619     OpMemoryModel = 14,
620     OpEntryPoint = 15,
621     OpExecutionMode = 16,
622     OpCapability = 17,
623     OpTypeVoid = 19,
624     OpTypeBool = 20,
625     OpTypeInt = 21,
626     OpTypeFloat = 22,
627     OpTypeVector = 23,
628     OpTypeMatrix = 24,
629     OpTypeImage = 25,
630     OpTypeSampler = 26,
631     OpTypeSampledImage = 27,
632     OpTypeArray = 28,
633     OpTypeRuntimeArray = 29,
634     OpTypeStruct = 30,
635     OpTypeOpaque = 31,
636     OpTypePointer = 32,
637     OpTypeFunction = 33,
638     OpTypeEvent = 34,
639     OpTypeDeviceEvent = 35,
640     OpTypeReserveId = 36,
641     OpTypeQueue = 37,
642     OpTypePipe = 38,
643     OpTypeForwardPointer = 39,
644     OpConstantTrue = 41,
645     OpConstantFalse = 42,
646     OpConstant = 43,
647     OpConstantComposite = 44,
648     OpConstantSampler = 45,
649     OpConstantNull = 46,
650     OpSpecConstantTrue = 48,
651     OpSpecConstantFalse = 49,
652     OpSpecConstant = 50,
653     OpSpecConstantComposite = 51,
654     OpSpecConstantOp = 52,
655     OpFunction = 54,
656     OpFunctionParameter = 55,
657     OpFunctionEnd = 56,
658     OpFunctionCall = 57,
659     OpVariable = 59,
660     OpImageTexelPointer = 60,
661     OpLoad = 61,
662     OpStore = 62,
663     OpCopyMemory = 63,
664     OpCopyMemorySized = 64,
665     OpAccessChain = 65,
666     OpInBoundsAccessChain = 66,
667     OpPtrAccessChain = 67,
668     OpArrayLength = 68,
669     OpGenericPtrMemSemantics = 69,
670     OpInBoundsPtrAccessChain = 70,
671     OpDecorate = 71,
672     OpMemberDecorate = 72,
673     OpDecorationGroup = 73,
674     OpGroupDecorate = 74,
675     OpGroupMemberDecorate = 75,
676     OpVectorExtractDynamic = 77,
677     OpVectorInsertDynamic = 78,
678     OpVectorShuffle = 79,
679     OpCompositeConstruct = 80,
680     OpCompositeExtract = 81,
681     OpCompositeInsert = 82,
682     OpCopyObject = 83,
683     OpTranspose = 84,
684     OpSampledImage = 86,
685     OpImageSampleImplicitLod = 87,
686     OpImageSampleExplicitLod = 88,
687     OpImageSampleDrefImplicitLod = 89,
688     OpImageSampleDrefExplicitLod = 90,
689     OpImageSampleProjImplicitLod = 91,
690     OpImageSampleProjExplicitLod = 92,
691     OpImageSampleProjDrefImplicitLod = 93,
692     OpImageSampleProjDrefExplicitLod = 94,
693     OpImageFetch = 95,
694     OpImageGather = 96,
695     OpImageDrefGather = 97,
696     OpImageRead = 98,
697     OpImageWrite = 99,
698     OpImage = 100,
699     OpImageQueryFormat = 101,
700     OpImageQueryOrder = 102,
701     OpImageQuerySizeLod = 103,
702     OpImageQuerySize = 104,
703     OpImageQueryLod = 105,
704     OpImageQueryLevels = 106,
705     OpImageQuerySamples = 107,
706     OpConvertFToU = 109,
707     OpConvertFToS = 110,
708     OpConvertSToF = 111,
709     OpConvertUToF = 112,
710     OpUConvert = 113,
711     OpSConvert = 114,
712     OpFConvert = 115,
713     OpQuantizeToF16 = 116,
714     OpConvertPtrToU = 117,
715     OpSatConvertSToU = 118,
716     OpSatConvertUToS = 119,
717     OpConvertUToPtr = 120,
718     OpPtrCastToGeneric = 121,
719     OpGenericCastToPtr = 122,
720     OpGenericCastToPtrExplicit = 123,
721     OpBitcast = 124,
722     OpSNegate = 126,
723     OpFNegate = 127,
724     OpIAdd = 128,
725     OpFAdd = 129,
726     OpISub = 130,
727     OpFSub = 131,
728     OpIMul = 132,
729     OpFMul = 133,
730     OpUDiv = 134,
731     OpSDiv = 135,
732     OpFDiv = 136,
733     OpUMod = 137,
734     OpSRem = 138,
735     OpSMod = 139,
736     OpFRem = 140,
737     OpFMod = 141,
738     OpVectorTimesScalar = 142,
739     OpMatrixTimesScalar = 143,
740     OpVectorTimesMatrix = 144,
741     OpMatrixTimesVector = 145,
742     OpMatrixTimesMatrix = 146,
743     OpOuterProduct = 147,
744     OpDot = 148,
745     OpIAddCarry = 149,
746     OpISubBorrow = 150,
747     OpUMulExtended = 151,
748     OpSMulExtended = 152,
749     OpAny = 154,
750     OpAll = 155,
751     OpIsNan = 156,
752     OpIsInf = 157,
753     OpIsFinite = 158,
754     OpIsNormal = 159,
755     OpSignBitSet = 160,
756     OpLessOrGreater = 161,
757     OpOrdered = 162,
758     OpUnordered = 163,
759     OpLogicalEqual = 164,
760     OpLogicalNotEqual = 165,
761     OpLogicalOr = 166,
762     OpLogicalAnd = 167,
763     OpLogicalNot = 168,
764     OpSelect = 169,
765     OpIEqual = 170,
766     OpINotEqual = 171,
767     OpUGreaterThan = 172,
768     OpSGreaterThan = 173,
769     OpUGreaterThanEqual = 174,
770     OpSGreaterThanEqual = 175,
771     OpULessThan = 176,
772     OpSLessThan = 177,
773     OpULessThanEqual = 178,
774     OpSLessThanEqual = 179,
775     OpFOrdEqual = 180,
776     OpFUnordEqual = 181,
777     OpFOrdNotEqual = 182,
778     OpFUnordNotEqual = 183,
779     OpFOrdLessThan = 184,
780     OpFUnordLessThan = 185,
781     OpFOrdGreaterThan = 186,
782     OpFUnordGreaterThan = 187,
783     OpFOrdLessThanEqual = 188,
784     OpFUnordLessThanEqual = 189,
785     OpFOrdGreaterThanEqual = 190,
786     OpFUnordGreaterThanEqual = 191,
787     OpShiftRightLogical = 194,
788     OpShiftRightArithmetic = 195,
789     OpShiftLeftLogical = 196,
790     OpBitwiseOr = 197,
791     OpBitwiseXor = 198,
792     OpBitwiseAnd = 199,
793     OpNot = 200,
794     OpBitFieldInsert = 201,
795     OpBitFieldSExtract = 202,
796     OpBitFieldUExtract = 203,
797     OpBitReverse = 204,
798     OpBitCount = 205,
799     OpDPdx = 207,
800     OpDPdy = 208,
801     OpFwidth = 209,
802     OpDPdxFine = 210,
803     OpDPdyFine = 211,
804     OpFwidthFine = 212,
805     OpDPdxCoarse = 213,
806     OpDPdyCoarse = 214,
807     OpFwidthCoarse = 215,
808     OpEmitVertex = 218,
809     OpEndPrimitive = 219,
810     OpEmitStreamVertex = 220,
811     OpEndStreamPrimitive = 221,
812     OpControlBarrier = 224,
813     OpMemoryBarrier = 225,
814     OpAtomicLoad = 227,
815     OpAtomicStore = 228,
816     OpAtomicExchange = 229,
817     OpAtomicCompareExchange = 230,
818     OpAtomicCompareExchangeWeak = 231,
819     OpAtomicIIncrement = 232,
820     OpAtomicIDecrement = 233,
821     OpAtomicIAdd = 234,
822     OpAtomicISub = 235,
823     OpAtomicSMin = 236,
824     OpAtomicUMin = 237,
825     OpAtomicSMax = 238,
826     OpAtomicUMax = 239,
827     OpAtomicAnd = 240,
828     OpAtomicOr = 241,
829     OpAtomicXor = 242,
830     OpPhi = 245,
831     OpLoopMerge = 246,
832     OpSelectionMerge = 247,
833     OpLabel = 248,
834     OpBranch = 249,
835     OpBranchConditional = 250,
836     OpSwitch = 251,
837     OpKill = 252,
838     OpReturn = 253,
839     OpReturnValue = 254,
840     OpUnreachable = 255,
841     OpLifetimeStart = 256,
842     OpLifetimeStop = 257,
843     OpGroupAsyncCopy = 259,
844     OpGroupWaitEvents = 260,
845     OpGroupAll = 261,
846     OpGroupAny = 262,
847     OpGroupBroadcast = 263,
848     OpGroupIAdd = 264,
849     OpGroupFAdd = 265,
850     OpGroupFMin = 266,
851     OpGroupUMin = 267,
852     OpGroupSMin = 268,
853     OpGroupFMax = 269,
854     OpGroupUMax = 270,
855     OpGroupSMax = 271,
856     OpReadPipe = 274,
857     OpWritePipe = 275,
858     OpReservedReadPipe = 276,
859     OpReservedWritePipe = 277,
860     OpReserveReadPipePackets = 278,
861     OpReserveWritePipePackets = 279,
862     OpCommitReadPipe = 280,
863     OpCommitWritePipe = 281,
864     OpIsValidReserveId = 282,
865     OpGetNumPipePackets = 283,
866     OpGetMaxPipePackets = 284,
867     OpGroupReserveReadPipePackets = 285,
868     OpGroupReserveWritePipePackets = 286,
869     OpGroupCommitReadPipe = 287,
870     OpGroupCommitWritePipe = 288,
871     OpEnqueueMarker = 291,
872     OpEnqueueKernel = 292,
873     OpGetKernelNDrangeSubGroupCount = 293,
874     OpGetKernelNDrangeMaxSubGroupSize = 294,
875     OpGetKernelWorkGroupSize = 295,
876     OpGetKernelPreferredWorkGroupSizeMultiple = 296,
877     OpRetainEvent = 297,
878     OpReleaseEvent = 298,
879     OpCreateUserEvent = 299,
880     OpIsValidEvent = 300,
881     OpSetUserEventStatus = 301,
882     OpCaptureEventProfilingInfo = 302,
883     OpGetDefaultQueue = 303,
884     OpBuildNDRange = 304,
885     OpImageSparseSampleImplicitLod = 305,
886     OpImageSparseSampleExplicitLod = 306,
887     OpImageSparseSampleDrefImplicitLod = 307,
888     OpImageSparseSampleDrefExplicitLod = 308,
889     OpImageSparseSampleProjImplicitLod = 309,
890     OpImageSparseSampleProjExplicitLod = 310,
891     OpImageSparseSampleProjDrefImplicitLod = 311,
892     OpImageSparseSampleProjDrefExplicitLod = 312,
893     OpImageSparseFetch = 313,
894     OpImageSparseGather = 314,
895     OpImageSparseDrefGather = 315,
896     OpImageSparseTexelsResident = 316,
897     OpNoLine = 317,
898     OpAtomicFlagTestAndSet = 318,
899     OpAtomicFlagClear = 319,
900     OpImageSparseRead = 320,
901     OpSubgroupBallotKHR = 4421,
902     OpSubgroupFirstInvocationKHR = 4422,
903     OpMax = 0x7fffffff,
904 };
905
906 // Overload operator| for mask bit combining
907
908 inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
909 inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
910 inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
911 inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
912 inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
913 inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
914 inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
915 inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
916
917 }  // end namespace spv
918
919 #endif  // #ifndef spirv_HPP
920