Incremental update for multiple recent extensions.
[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     ExecutionModePostDepthCoverage = 4446,
126     ExecutionModeMax = 0x7fffffff,
127 };
128
129 enum StorageClass {
130     StorageClassUniformConstant = 0,
131     StorageClassInput = 1,
132     StorageClassUniform = 2,
133     StorageClassOutput = 3,
134     StorageClassWorkgroup = 4,
135     StorageClassCrossWorkgroup = 5,
136     StorageClassPrivate = 6,
137     StorageClassFunction = 7,
138     StorageClassGeneric = 8,
139     StorageClassPushConstant = 9,
140     StorageClassAtomicCounter = 10,
141     StorageClassImage = 11,
142     StorageClassStorageBuffer = 12,
143     StorageClassMax = 0x7fffffff,
144 };
145
146 enum Dim {
147     Dim1D = 0,
148     Dim2D = 1,
149     Dim3D = 2,
150     DimCube = 3,
151     DimRect = 4,
152     DimBuffer = 5,
153     DimSubpassData = 6,
154     DimMax = 0x7fffffff,
155 };
156
157 enum SamplerAddressingMode {
158     SamplerAddressingModeNone = 0,
159     SamplerAddressingModeClampToEdge = 1,
160     SamplerAddressingModeClamp = 2,
161     SamplerAddressingModeRepeat = 3,
162     SamplerAddressingModeRepeatMirrored = 4,
163     SamplerAddressingModeMax = 0x7fffffff,
164 };
165
166 enum SamplerFilterMode {
167     SamplerFilterModeNearest = 0,
168     SamplerFilterModeLinear = 1,
169     SamplerFilterModeMax = 0x7fffffff,
170 };
171
172 enum ImageFormat {
173     ImageFormatUnknown = 0,
174     ImageFormatRgba32f = 1,
175     ImageFormatRgba16f = 2,
176     ImageFormatR32f = 3,
177     ImageFormatRgba8 = 4,
178     ImageFormatRgba8Snorm = 5,
179     ImageFormatRg32f = 6,
180     ImageFormatRg16f = 7,
181     ImageFormatR11fG11fB10f = 8,
182     ImageFormatR16f = 9,
183     ImageFormatRgba16 = 10,
184     ImageFormatRgb10A2 = 11,
185     ImageFormatRg16 = 12,
186     ImageFormatRg8 = 13,
187     ImageFormatR16 = 14,
188     ImageFormatR8 = 15,
189     ImageFormatRgba16Snorm = 16,
190     ImageFormatRg16Snorm = 17,
191     ImageFormatRg8Snorm = 18,
192     ImageFormatR16Snorm = 19,
193     ImageFormatR8Snorm = 20,
194     ImageFormatRgba32i = 21,
195     ImageFormatRgba16i = 22,
196     ImageFormatRgba8i = 23,
197     ImageFormatR32i = 24,
198     ImageFormatRg32i = 25,
199     ImageFormatRg16i = 26,
200     ImageFormatRg8i = 27,
201     ImageFormatR16i = 28,
202     ImageFormatR8i = 29,
203     ImageFormatRgba32ui = 30,
204     ImageFormatRgba16ui = 31,
205     ImageFormatRgba8ui = 32,
206     ImageFormatR32ui = 33,
207     ImageFormatRgb10a2ui = 34,
208     ImageFormatRg32ui = 35,
209     ImageFormatRg16ui = 36,
210     ImageFormatRg8ui = 37,
211     ImageFormatR16ui = 38,
212     ImageFormatR8ui = 39,
213     ImageFormatMax = 0x7fffffff,
214 };
215
216 enum ImageChannelOrder {
217     ImageChannelOrderR = 0,
218     ImageChannelOrderA = 1,
219     ImageChannelOrderRG = 2,
220     ImageChannelOrderRA = 3,
221     ImageChannelOrderRGB = 4,
222     ImageChannelOrderRGBA = 5,
223     ImageChannelOrderBGRA = 6,
224     ImageChannelOrderARGB = 7,
225     ImageChannelOrderIntensity = 8,
226     ImageChannelOrderLuminance = 9,
227     ImageChannelOrderRx = 10,
228     ImageChannelOrderRGx = 11,
229     ImageChannelOrderRGBx = 12,
230     ImageChannelOrderDepth = 13,
231     ImageChannelOrderDepthStencil = 14,
232     ImageChannelOrdersRGB = 15,
233     ImageChannelOrdersRGBx = 16,
234     ImageChannelOrdersRGBA = 17,
235     ImageChannelOrdersBGRA = 18,
236     ImageChannelOrderABGR = 19,
237     ImageChannelOrderMax = 0x7fffffff,
238 };
239
240 enum ImageChannelDataType {
241     ImageChannelDataTypeSnormInt8 = 0,
242     ImageChannelDataTypeSnormInt16 = 1,
243     ImageChannelDataTypeUnormInt8 = 2,
244     ImageChannelDataTypeUnormInt16 = 3,
245     ImageChannelDataTypeUnormShort565 = 4,
246     ImageChannelDataTypeUnormShort555 = 5,
247     ImageChannelDataTypeUnormInt101010 = 6,
248     ImageChannelDataTypeSignedInt8 = 7,
249     ImageChannelDataTypeSignedInt16 = 8,
250     ImageChannelDataTypeSignedInt32 = 9,
251     ImageChannelDataTypeUnsignedInt8 = 10,
252     ImageChannelDataTypeUnsignedInt16 = 11,
253     ImageChannelDataTypeUnsignedInt32 = 12,
254     ImageChannelDataTypeHalfFloat = 13,
255     ImageChannelDataTypeFloat = 14,
256     ImageChannelDataTypeUnormInt24 = 15,
257     ImageChannelDataTypeUnormInt101010_2 = 16,
258     ImageChannelDataTypeMax = 0x7fffffff,
259 };
260
261 enum ImageOperandsShift {
262     ImageOperandsBiasShift = 0,
263     ImageOperandsLodShift = 1,
264     ImageOperandsGradShift = 2,
265     ImageOperandsConstOffsetShift = 3,
266     ImageOperandsOffsetShift = 4,
267     ImageOperandsConstOffsetsShift = 5,
268     ImageOperandsSampleShift = 6,
269     ImageOperandsMinLodShift = 7,
270     ImageOperandsMax = 0x7fffffff,
271 };
272
273 enum ImageOperandsMask {
274     ImageOperandsMaskNone = 0,
275     ImageOperandsBiasMask = 0x00000001,
276     ImageOperandsLodMask = 0x00000002,
277     ImageOperandsGradMask = 0x00000004,
278     ImageOperandsConstOffsetMask = 0x00000008,
279     ImageOperandsOffsetMask = 0x00000010,
280     ImageOperandsConstOffsetsMask = 0x00000020,
281     ImageOperandsSampleMask = 0x00000040,
282     ImageOperandsMinLodMask = 0x00000080,
283 };
284
285 enum FPFastMathModeShift {
286     FPFastMathModeNotNaNShift = 0,
287     FPFastMathModeNotInfShift = 1,
288     FPFastMathModeNSZShift = 2,
289     FPFastMathModeAllowRecipShift = 3,
290     FPFastMathModeFastShift = 4,
291     FPFastMathModeMax = 0x7fffffff,
292 };
293
294 enum FPFastMathModeMask {
295     FPFastMathModeMaskNone = 0,
296     FPFastMathModeNotNaNMask = 0x00000001,
297     FPFastMathModeNotInfMask = 0x00000002,
298     FPFastMathModeNSZMask = 0x00000004,
299     FPFastMathModeAllowRecipMask = 0x00000008,
300     FPFastMathModeFastMask = 0x00000010,
301 };
302
303 enum FPRoundingMode {
304     FPRoundingModeRTE = 0,
305     FPRoundingModeRTZ = 1,
306     FPRoundingModeRTP = 2,
307     FPRoundingModeRTN = 3,
308     FPRoundingModeMax = 0x7fffffff,
309 };
310
311 enum LinkageType {
312     LinkageTypeExport = 0,
313     LinkageTypeImport = 1,
314     LinkageTypeMax = 0x7fffffff,
315 };
316
317 enum AccessQualifier {
318     AccessQualifierReadOnly = 0,
319     AccessQualifierWriteOnly = 1,
320     AccessQualifierReadWrite = 2,
321     AccessQualifierMax = 0x7fffffff,
322 };
323
324 enum FunctionParameterAttribute {
325     FunctionParameterAttributeZext = 0,
326     FunctionParameterAttributeSext = 1,
327     FunctionParameterAttributeByVal = 2,
328     FunctionParameterAttributeSret = 3,
329     FunctionParameterAttributeNoAlias = 4,
330     FunctionParameterAttributeNoCapture = 5,
331     FunctionParameterAttributeNoWrite = 6,
332     FunctionParameterAttributeNoReadWrite = 7,
333     FunctionParameterAttributeMax = 0x7fffffff,
334 };
335
336 enum Decoration {
337     DecorationRelaxedPrecision = 0,
338     DecorationSpecId = 1,
339     DecorationBlock = 2,
340     DecorationBufferBlock = 3,
341     DecorationRowMajor = 4,
342     DecorationColMajor = 5,
343     DecorationArrayStride = 6,
344     DecorationMatrixStride = 7,
345     DecorationGLSLShared = 8,
346     DecorationGLSLPacked = 9,
347     DecorationCPacked = 10,
348     DecorationBuiltIn = 11,
349     DecorationNoPerspective = 13,
350     DecorationFlat = 14,
351     DecorationPatch = 15,
352     DecorationCentroid = 16,
353     DecorationSample = 17,
354     DecorationInvariant = 18,
355     DecorationRestrict = 19,
356     DecorationAliased = 20,
357     DecorationVolatile = 21,
358     DecorationConstant = 22,
359     DecorationCoherent = 23,
360     DecorationNonWritable = 24,
361     DecorationNonReadable = 25,
362     DecorationUniform = 26,
363     DecorationSaturatedConversion = 28,
364     DecorationStream = 29,
365     DecorationLocation = 30,
366     DecorationComponent = 31,
367     DecorationIndex = 32,
368     DecorationBinding = 33,
369     DecorationDescriptorSet = 34,
370     DecorationOffset = 35,
371     DecorationXfbBuffer = 36,
372     DecorationXfbStride = 37,
373     DecorationFuncParamAttr = 38,
374     DecorationFPRoundingMode = 39,
375     DecorationFPFastMathMode = 40,
376     DecorationLinkageAttributes = 41,
377     DecorationNoContraction = 42,
378     DecorationInputAttachmentIndex = 43,
379     DecorationAlignment = 44,
380     DecorationExplicitInterpAMD = 4999,
381     DecorationOverrideCoverageNV = 5248,
382     DecorationPassthroughNV = 5250,
383     DecorationViewportRelativeNV = 5252,
384     DecorationSecondaryViewportRelativeNV = 5256,
385     DecorationMax = 0x7fffffff,
386 };
387
388 enum BuiltIn {
389     BuiltInPosition = 0,
390     BuiltInPointSize = 1,
391     BuiltInClipDistance = 3,
392     BuiltInCullDistance = 4,
393     BuiltInVertexId = 5,
394     BuiltInInstanceId = 6,
395     BuiltInPrimitiveId = 7,
396     BuiltInInvocationId = 8,
397     BuiltInLayer = 9,
398     BuiltInViewportIndex = 10,
399     BuiltInTessLevelOuter = 11,
400     BuiltInTessLevelInner = 12,
401     BuiltInTessCoord = 13,
402     BuiltInPatchVertices = 14,
403     BuiltInFragCoord = 15,
404     BuiltInPointCoord = 16,
405     BuiltInFrontFacing = 17,
406     BuiltInSampleId = 18,
407     BuiltInSamplePosition = 19,
408     BuiltInSampleMask = 20,
409     BuiltInFragDepth = 22,
410     BuiltInHelperInvocation = 23,
411     BuiltInNumWorkgroups = 24,
412     BuiltInWorkgroupSize = 25,
413     BuiltInWorkgroupId = 26,
414     BuiltInLocalInvocationId = 27,
415     BuiltInGlobalInvocationId = 28,
416     BuiltInLocalInvocationIndex = 29,
417     BuiltInWorkDim = 30,
418     BuiltInGlobalSize = 31,
419     BuiltInEnqueuedWorkgroupSize = 32,
420     BuiltInGlobalOffset = 33,
421     BuiltInGlobalLinearId = 34,
422     BuiltInSubgroupSize = 36,
423     BuiltInSubgroupMaxSize = 37,
424     BuiltInNumSubgroups = 38,
425     BuiltInNumEnqueuedSubgroups = 39,
426     BuiltInSubgroupId = 40,
427     BuiltInSubgroupLocalInvocationId = 41,
428     BuiltInVertexIndex = 42,
429     BuiltInInstanceIndex = 43,
430     BuiltInSubgroupEqMaskKHR = 4416,
431     BuiltInSubgroupGeMaskKHR = 4417,
432     BuiltInSubgroupGtMaskKHR = 4418,
433     BuiltInSubgroupLeMaskKHR = 4419,
434     BuiltInSubgroupLtMaskKHR = 4420,
435     BuiltInBaseVertex = 4424,
436     BuiltInBaseInstance = 4425,
437     BuiltInDrawIndex = 4426,
438     BuiltInDeviceIndex = 4438,
439     BuiltInViewIndex = 4440,
440     BuiltInBaryCoordNoPerspAMD = 4992,
441     BuiltInBaryCoordNoPerspCentroidAMD = 4993,
442     BuiltInBaryCoordNoPerspSampleAMD = 4994,
443     BuiltInBaryCoordSmoothAMD = 4995,
444     BuiltInBaryCoordSmoothCentroidAMD = 4996,
445     BuiltInBaryCoordSmoothSampleAMD = 4997,
446     BuiltInBaryCoordPullModelAMD = 4998,
447     BuiltInViewportMaskNV = 5253,
448     BuiltInSecondaryPositionNV = 5257,
449     BuiltInSecondaryViewportMaskNV = 5258,
450     BuiltInPositionPerViewNV = 5261,
451     BuiltInViewportMaskPerViewNV = 5262,
452     BuiltInMax = 0x7fffffff,
453 };
454
455 enum SelectionControlShift {
456     SelectionControlFlattenShift = 0,
457     SelectionControlDontFlattenShift = 1,
458     SelectionControlMax = 0x7fffffff,
459 };
460
461 enum SelectionControlMask {
462     SelectionControlMaskNone = 0,
463     SelectionControlFlattenMask = 0x00000001,
464     SelectionControlDontFlattenMask = 0x00000002,
465 };
466
467 enum LoopControlShift {
468     LoopControlUnrollShift = 0,
469     LoopControlDontUnrollShift = 1,
470     LoopControlMax = 0x7fffffff,
471 };
472
473 enum LoopControlMask {
474     LoopControlMaskNone = 0,
475     LoopControlUnrollMask = 0x00000001,
476     LoopControlDontUnrollMask = 0x00000002,
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     CapabilitySubgroupBallotKHR = 4423,
628     CapabilityDrawParameters = 4427,
629     CapabilitySubgroupVoteKHR = 4431,
630     CapabilityStorageBuffer16BitAccess = 4433,
631     CapabilityStorageUniformBufferBlock16 = 4433,
632     CapabilityStorageUniform16 = 4434,
633     CapabilityUniformAndStorageBuffer16BitAccess = 4434,
634     CapabilityStoragePushConstant16 = 4435,
635     CapabilityStorageInputOutput16 = 4436,
636     CapabilityDeviceGroup = 4437,
637     CapabilityMultiView = 4439,
638     CapabilityVariablePointersStorageBuffer = 4441,
639     CapabilityVariablePointers = 4442,
640     CapabilityAtomicStorageOps = 4445,
641     CapabilitySampleMaskPostDepthCoverage = 4447,
642     CapabilityImageGatherBiasLodAMD = 5009,
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     OpSubgroupBallotKHR = 4421,
948     OpSubgroupFirstInvocationKHR = 4422,
949     OpSubgroupAllKHR = 4428,
950     OpSubgroupAnyKHR = 4429,
951     OpSubgroupAllEqualKHR = 4430,
952     OpSubgroupReadInvocationKHR = 4432,
953     OpGroupIAddNonUniformAMD = 5000,
954     OpGroupFAddNonUniformAMD = 5001,
955     OpGroupFMinNonUniformAMD = 5002,
956     OpGroupUMinNonUniformAMD = 5003,
957     OpGroupSMinNonUniformAMD = 5004,
958     OpGroupFMaxNonUniformAMD = 5005,
959     OpGroupUMaxNonUniformAMD = 5006,
960     OpGroupSMaxNonUniformAMD = 5007,
961     OpMax = 0x7fffffff,
962 };
963
964 // Overload operator| for mask bit combining
965
966 inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
967 inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
968 inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
969 inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
970 inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
971 inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
972 inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
973 inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
974
975 }  // end namespace spv
976
977 #endif  // #ifndef spirv_HPP
978