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