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