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