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