1// Copyright (c) 2014-2018 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
45namespace spv {
46
47typedef unsigned int Id;
48
49#define SPV_VERSION 0x10300
50#define SPV_REVISION 1
51
52static const unsigned int MagicNumber = 0x07230203;
53static const unsigned int Version = 0x00010300;
54static const unsigned int Revision = 1;
55static const unsigned int OpCodeMask = 0xffff;
56static const unsigned int WordCountShift = 16;
57
58enum class SourceLanguage : unsigned {
59    Unknown = 0,
60    ESSL = 1,
61    GLSL = 2,
62    OpenCL_C = 3,
63    OpenCL_CPP = 4,
64    HLSL = 5,
65    Max = 0x7fffffff,
66};
67
68enum class ExecutionModel : unsigned {
69    Vertex = 0,
70    TessellationControl = 1,
71    TessellationEvaluation = 2,
72    Geometry = 3,
73    Fragment = 4,
74    GLCompute = 5,
75    Kernel = 6,
76    TaskNV = 5267,
77    MeshNV = 5268,
78    RayGenerationNVX = 5313,
79    IntersectionNVX = 5314,
80    AnyHitNVX = 5315,
81    ClosestHitNVX = 5316,
82    MissNVX = 5317,
83    CallableNVX = 5318,
84    Max = 0x7fffffff,
85};
86
87enum class AddressingModel : unsigned {
88    Logical = 0,
89    Physical32 = 1,
90    Physical64 = 2,
91    Max = 0x7fffffff,
92};
93
94enum class MemoryModel : unsigned {
95    Simple = 0,
96    GLSL450 = 1,
97    OpenCL = 2,
98    VulkanKHR = 3,
99    Max = 0x7fffffff,
100};
101
102enum class ExecutionMode : unsigned {
103    Invocations = 0,
104    SpacingEqual = 1,
105    SpacingFractionalEven = 2,
106    SpacingFractionalOdd = 3,
107    VertexOrderCw = 4,
108    VertexOrderCcw = 5,
109    PixelCenterInteger = 6,
110    OriginUpperLeft = 7,
111    OriginLowerLeft = 8,
112    EarlyFragmentTests = 9,
113    PointMode = 10,
114    Xfb = 11,
115    DepthReplacing = 12,
116    DepthGreater = 14,
117    DepthLess = 15,
118    DepthUnchanged = 16,
119    LocalSize = 17,
120    LocalSizeHint = 18,
121    InputPoints = 19,
122    InputLines = 20,
123    InputLinesAdjacency = 21,
124    Triangles = 22,
125    InputTrianglesAdjacency = 23,
126    Quads = 24,
127    Isolines = 25,
128    OutputVertices = 26,
129    OutputPoints = 27,
130    OutputLineStrip = 28,
131    OutputTriangleStrip = 29,
132    VecTypeHint = 30,
133    ContractionOff = 31,
134    Initializer = 33,
135    Finalizer = 34,
136    SubgroupSize = 35,
137    SubgroupsPerWorkgroup = 36,
138    SubgroupsPerWorkgroupId = 37,
139    LocalSizeId = 38,
140    LocalSizeHintId = 39,
141    PostDepthCoverage = 4446,
142    StencilRefReplacingEXT = 5027,
143    OutputLinesNV = 5269,
144    OutputPrimitivesNV = 5270,
145    DerivativeGroupQuadsNV = 5289,
146    DerivativeGroupLinearNV = 5290,
147    OutputTrianglesNV = 5298,
148    Max = 0x7fffffff,
149};
150
151enum class StorageClass : unsigned {
152    UniformConstant = 0,
153    Input = 1,
154    Uniform = 2,
155    Output = 3,
156    Workgroup = 4,
157    CrossWorkgroup = 5,
158    Private = 6,
159    Function = 7,
160    Generic = 8,
161    PushConstant = 9,
162    AtomicCounter = 10,
163    Image = 11,
164    StorageBuffer = 12,
165    RayPayloadNVX = 5338,
166    HitAttributeNVX = 5339,
167    IncomingRayPayloadNVX = 5342,
168    ShaderRecordBufferNVX = 5343,
169    Max = 0x7fffffff,
170};
171
172enum class Dim : unsigned {
173    Dim1D = 0,
174    Dim2D = 1,
175    Dim3D = 2,
176    Cube = 3,
177    Rect = 4,
178    Buffer = 5,
179    SubpassData = 6,
180    Max = 0x7fffffff,
181};
182
183enum class SamplerAddressingMode : unsigned {
184    None = 0,
185    ClampToEdge = 1,
186    Clamp = 2,
187    Repeat = 3,
188    RepeatMirrored = 4,
189    Max = 0x7fffffff,
190};
191
192enum class SamplerFilterMode : unsigned {
193    Nearest = 0,
194    Linear = 1,
195    Max = 0x7fffffff,
196};
197
198enum class ImageFormat : unsigned {
199    Unknown = 0,
200    Rgba32f = 1,
201    Rgba16f = 2,
202    R32f = 3,
203    Rgba8 = 4,
204    Rgba8Snorm = 5,
205    Rg32f = 6,
206    Rg16f = 7,
207    R11fG11fB10f = 8,
208    R16f = 9,
209    Rgba16 = 10,
210    Rgb10A2 = 11,
211    Rg16 = 12,
212    Rg8 = 13,
213    R16 = 14,
214    R8 = 15,
215    Rgba16Snorm = 16,
216    Rg16Snorm = 17,
217    Rg8Snorm = 18,
218    R16Snorm = 19,
219    R8Snorm = 20,
220    Rgba32i = 21,
221    Rgba16i = 22,
222    Rgba8i = 23,
223    R32i = 24,
224    Rg32i = 25,
225    Rg16i = 26,
226    Rg8i = 27,
227    R16i = 28,
228    R8i = 29,
229    Rgba32ui = 30,
230    Rgba16ui = 31,
231    Rgba8ui = 32,
232    R32ui = 33,
233    Rgb10a2ui = 34,
234    Rg32ui = 35,
235    Rg16ui = 36,
236    Rg8ui = 37,
237    R16ui = 38,
238    R8ui = 39,
239    Max = 0x7fffffff,
240};
241
242enum class ImageChannelOrder : unsigned {
243    R = 0,
244    A = 1,
245    RG = 2,
246    RA = 3,
247    RGB = 4,
248    RGBA = 5,
249    BGRA = 6,
250    ARGB = 7,
251    Intensity = 8,
252    Luminance = 9,
253    Rx = 10,
254    RGx = 11,
255    RGBx = 12,
256    Depth = 13,
257    DepthStencil = 14,
258    sRGB = 15,
259    sRGBx = 16,
260    sRGBA = 17,
261    sBGRA = 18,
262    ABGR = 19,
263    Max = 0x7fffffff,
264};
265
266enum class ImageChannelDataType : unsigned {
267    SnormInt8 = 0,
268    SnormInt16 = 1,
269    UnormInt8 = 2,
270    UnormInt16 = 3,
271    UnormShort565 = 4,
272    UnormShort555 = 5,
273    UnormInt101010 = 6,
274    SignedInt8 = 7,
275    SignedInt16 = 8,
276    SignedInt32 = 9,
277    UnsignedInt8 = 10,
278    UnsignedInt16 = 11,
279    UnsignedInt32 = 12,
280    HalfFloat = 13,
281    Float = 14,
282    UnormInt24 = 15,
283    UnormInt101010_2 = 16,
284    Max = 0x7fffffff,
285};
286
287enum class ImageOperandsShift : unsigned {
288    Bias = 0,
289    Lod = 1,
290    Grad = 2,
291    ConstOffset = 3,
292    Offset = 4,
293    ConstOffsets = 5,
294    Sample = 6,
295    MinLod = 7,
296    MakeTexelAvailableKHR = 8,
297    MakeTexelVisibleKHR = 9,
298    NonPrivateTexelKHR = 10,
299    VolatileTexelKHR = 11,
300    Max = 0x7fffffff,
301};
302
303enum class ImageOperandsMask : unsigned {
304    MaskNone = 0,
305    Bias = 0x00000001,
306    Lod = 0x00000002,
307    Grad = 0x00000004,
308    ConstOffset = 0x00000008,
309    Offset = 0x00000010,
310    ConstOffsets = 0x00000020,
311    Sample = 0x00000040,
312    MinLod = 0x00000080,
313    MakeTexelAvailableKHR = 0x00000100,
314    MakeTexelVisibleKHR = 0x00000200,
315    NonPrivateTexelKHR = 0x00000400,
316    VolatileTexelKHR = 0x00000800,
317};
318
319enum class FPFastMathModeShift : unsigned {
320    NotNaN = 0,
321    NotInf = 1,
322    NSZ = 2,
323    AllowRecip = 3,
324    Fast = 4,
325    Max = 0x7fffffff,
326};
327
328enum class FPFastMathModeMask : unsigned {
329    MaskNone = 0,
330    NotNaN = 0x00000001,
331    NotInf = 0x00000002,
332    NSZ = 0x00000004,
333    AllowRecip = 0x00000008,
334    Fast = 0x00000010,
335};
336
337enum class FPRoundingMode : unsigned {
338    RTE = 0,
339    RTZ = 1,
340    RTP = 2,
341    RTN = 3,
342    Max = 0x7fffffff,
343};
344
345enum class LinkageType : unsigned {
346    Export = 0,
347    Import = 1,
348    Max = 0x7fffffff,
349};
350
351enum class AccessQualifier : unsigned {
352    ReadOnly = 0,
353    WriteOnly = 1,
354    ReadWrite = 2,
355    Max = 0x7fffffff,
356};
357
358enum class FunctionParameterAttribute : unsigned {
359    Zext = 0,
360    Sext = 1,
361    ByVal = 2,
362    Sret = 3,
363    NoAlias = 4,
364    NoCapture = 5,
365    NoWrite = 6,
366    NoReadWrite = 7,
367    Max = 0x7fffffff,
368};
369
370enum class Decoration : unsigned {
371    RelaxedPrecision = 0,
372    SpecId = 1,
373    Block = 2,
374    BufferBlock = 3,
375    RowMajor = 4,
376    ColMajor = 5,
377    ArrayStride = 6,
378    MatrixStride = 7,
379    GLSLShared = 8,
380    GLSLPacked = 9,
381    CPacked = 10,
382    BuiltIn = 11,
383    NoPerspective = 13,
384    Flat = 14,
385    Patch = 15,
386    Centroid = 16,
387    Sample = 17,
388    Invariant = 18,
389    Restrict = 19,
390    Aliased = 20,
391    Volatile = 21,
392    Constant = 22,
393    Coherent = 23,
394    NonWritable = 24,
395    NonReadable = 25,
396    Uniform = 26,
397    SaturatedConversion = 28,
398    Stream = 29,
399    Location = 30,
400    Component = 31,
401    Index = 32,
402    Binding = 33,
403    DescriptorSet = 34,
404    Offset = 35,
405    XfbBuffer = 36,
406    XfbStride = 37,
407    FuncParamAttr = 38,
408    FPRoundingMode = 39,
409    FPFastMathMode = 40,
410    LinkageAttributes = 41,
411    NoContraction = 42,
412    InputAttachmentIndex = 43,
413    Alignment = 44,
414    MaxByteOffset = 45,
415    AlignmentId = 46,
416    MaxByteOffsetId = 47,
417    ExplicitInterpAMD = 4999,
418    OverrideCoverageNV = 5248,
419    PassthroughNV = 5250,
420    ViewportRelativeNV = 5252,
421    SecondaryViewportRelativeNV = 5256,
422    PerPrimitiveNV = 5271,
423    PerViewNV = 5272,
424    PerTaskNV = 5273,
425    PerVertexNV = 5285,
426    NonUniformEXT = 5300,
427    HlslCounterBufferGOOGLE = 5634,
428    HlslSemanticGOOGLE = 5635,
429    Max = 0x7fffffff,
430};
431
432enum class BuiltIn : unsigned {
433    Position = 0,
434    PointSize = 1,
435    ClipDistance = 3,
436    CullDistance = 4,
437    VertexId = 5,
438    InstanceId = 6,
439    PrimitiveId = 7,
440    InvocationId = 8,
441    Layer = 9,
442    ViewportIndex = 10,
443    TessLevelOuter = 11,
444    TessLevelInner = 12,
445    TessCoord = 13,
446    PatchVertices = 14,
447    FragCoord = 15,
448    PointCoord = 16,
449    FrontFacing = 17,
450    SampleId = 18,
451    SamplePosition = 19,
452    SampleMask = 20,
453    FragDepth = 22,
454    HelperInvocation = 23,
455    NumWorkgroups = 24,
456    WorkgroupSize = 25,
457    WorkgroupId = 26,
458    LocalInvocationId = 27,
459    GlobalInvocationId = 28,
460    LocalInvocationIndex = 29,
461    WorkDim = 30,
462    GlobalSize = 31,
463    EnqueuedWorkgroupSize = 32,
464    GlobalOffset = 33,
465    GlobalLinearId = 34,
466    SubgroupSize = 36,
467    SubgroupMaxSize = 37,
468    NumSubgroups = 38,
469    NumEnqueuedSubgroups = 39,
470    SubgroupId = 40,
471    SubgroupLocalInvocationId = 41,
472    VertexIndex = 42,
473    InstanceIndex = 43,
474    SubgroupEqMask = 4416,
475    SubgroupEqMaskKHR = 4416,
476    SubgroupGeMask = 4417,
477    SubgroupGeMaskKHR = 4417,
478    SubgroupGtMask = 4418,
479    SubgroupGtMaskKHR = 4418,
480    SubgroupLeMask = 4419,
481    SubgroupLeMaskKHR = 4419,
482    SubgroupLtMask = 4420,
483    SubgroupLtMaskKHR = 4420,
484    BaseVertex = 4424,
485    BaseInstance = 4425,
486    DrawIndex = 4426,
487    DeviceIndex = 4438,
488    ViewIndex = 4440,
489    BaryCoordNoPerspAMD = 4992,
490    BaryCoordNoPerspCentroidAMD = 4993,
491    BaryCoordNoPerspSampleAMD = 4994,
492    BaryCoordSmoothAMD = 4995,
493    BaryCoordSmoothCentroidAMD = 4996,
494    BaryCoordSmoothSampleAMD = 4997,
495    BaryCoordPullModelAMD = 4998,
496    FragStencilRefEXT = 5014,
497    ViewportMaskNV = 5253,
498    SecondaryPositionNV = 5257,
499    SecondaryViewportMaskNV = 5258,
500    PositionPerViewNV = 5261,
501    ViewportMaskPerViewNV = 5262,
502    FullyCoveredEXT = 5264,
503    TaskCountNV = 5274,
504    PrimitiveCountNV = 5275,
505    PrimitiveIndicesNV = 5276,
506    ClipDistancePerViewNV = 5277,
507    CullDistancePerViewNV = 5278,
508    LayerPerViewNV = 5279,
509    MeshViewCountNV = 5280,
510    MeshViewIndicesNV = 5281,
511    BaryCoordNV = 5286,
512    BaryCoordNoPerspNV = 5287,
513    FragmentSizeNV = 5292,
514    InvocationsPerPixelNV = 5293,
515    LaunchIdNVX = 5319,
516    LaunchSizeNVX = 5320,
517    WorldRayOriginNVX = 5321,
518    WorldRayDirectionNVX = 5322,
519    ObjectRayOriginNVX = 5323,
520    ObjectRayDirectionNVX = 5324,
521    RayTminNVX = 5325,
522    RayTmaxNVX = 5326,
523    InstanceCustomIndexNVX = 5327,
524    ObjectToWorldNVX = 5330,
525    WorldToObjectNVX = 5331,
526    HitTNVX = 5332,
527    HitKindNVX = 5333,
528    Max = 0x7fffffff,
529};
530
531enum class SelectionControlShift : unsigned {
532    Flatten = 0,
533    DontFlatten = 1,
534    Max = 0x7fffffff,
535};
536
537enum class SelectionControlMask : unsigned {
538    MaskNone = 0,
539    Flatten = 0x00000001,
540    DontFlatten = 0x00000002,
541};
542
543enum class LoopControlShift : unsigned {
544    Unroll = 0,
545    DontUnroll = 1,
546    DependencyInfinite = 2,
547    DependencyLength = 3,
548    Max = 0x7fffffff,
549};
550
551enum class LoopControlMask : unsigned {
552    MaskNone = 0,
553    Unroll = 0x00000001,
554    DontUnroll = 0x00000002,
555    DependencyInfinite = 0x00000004,
556    DependencyLength = 0x00000008,
557};
558
559enum class FunctionControlShift : unsigned {
560    Inline = 0,
561    DontInline = 1,
562    Pure = 2,
563    Const = 3,
564    Max = 0x7fffffff,
565};
566
567enum class FunctionControlMask : unsigned {
568    MaskNone = 0,
569    Inline = 0x00000001,
570    DontInline = 0x00000002,
571    Pure = 0x00000004,
572    Const = 0x00000008,
573};
574
575enum class MemorySemanticsShift : unsigned {
576    Acquire = 1,
577    Release = 2,
578    AcquireRelease = 3,
579    SequentiallyConsistent = 4,
580    UniformMemory = 6,
581    SubgroupMemory = 7,
582    WorkgroupMemory = 8,
583    CrossWorkgroupMemory = 9,
584    AtomicCounterMemory = 10,
585    ImageMemory = 11,
586    OutputMemoryKHR = 12,
587    MakeAvailableKHR = 13,
588    MakeVisibleKHR = 14,
589    Max = 0x7fffffff,
590};
591
592enum class MemorySemanticsMask : unsigned {
593    MaskNone = 0,
594    Acquire = 0x00000002,
595    Release = 0x00000004,
596    AcquireRelease = 0x00000008,
597    SequentiallyConsistent = 0x00000010,
598    UniformMemory = 0x00000040,
599    SubgroupMemory = 0x00000080,
600    WorkgroupMemory = 0x00000100,
601    CrossWorkgroupMemory = 0x00000200,
602    AtomicCounterMemory = 0x00000400,
603    ImageMemory = 0x00000800,
604    OutputMemoryKHR = 0x00001000,
605    MakeAvailableKHR = 0x00002000,
606    MakeVisibleKHR = 0x00004000,
607};
608
609enum class MemoryAccessShift : unsigned {
610    Volatile = 0,
611    Aligned = 1,
612    Nontemporal = 2,
613    MakePointerAvailableKHR = 3,
614    MakePointerVisibleKHR = 4,
615    NonPrivatePointerKHR = 5,
616    Max = 0x7fffffff,
617};
618
619enum class MemoryAccessMask : unsigned {
620    MaskNone = 0,
621    Volatile = 0x00000001,
622    Aligned = 0x00000002,
623    Nontemporal = 0x00000004,
624    MakePointerAvailableKHR = 0x00000008,
625    MakePointerVisibleKHR = 0x00000010,
626    NonPrivatePointerKHR = 0x00000020,
627};
628
629enum class Scope : unsigned {
630    CrossDevice = 0,
631    Device = 1,
632    Workgroup = 2,
633    Subgroup = 3,
634    Invocation = 4,
635    QueueFamilyKHR = 5,
636    Max = 0x7fffffff,
637};
638
639enum class GroupOperation : unsigned {
640    Reduce = 0,
641    InclusiveScan = 1,
642    ExclusiveScan = 2,
643    ClusteredReduce = 3,
644    PartitionedReduceNV = 6,
645    PartitionedInclusiveScanNV = 7,
646    PartitionedExclusiveScanNV = 8,
647    Max = 0x7fffffff,
648};
649
650enum class KernelEnqueueFlags : unsigned {
651    NoWait = 0,
652    WaitKernel = 1,
653    WaitWorkGroup = 2,
654    Max = 0x7fffffff,
655};
656
657enum class KernelProfilingInfoShift : unsigned {
658    CmdExecTime = 0,
659    Max = 0x7fffffff,
660};
661
662enum class KernelProfilingInfoMask : unsigned {
663    MaskNone = 0,
664    CmdExecTime = 0x00000001,
665};
666
667enum class Capability : unsigned {
668    Matrix = 0,
669    Shader = 1,
670    Geometry = 2,
671    Tessellation = 3,
672    Addresses = 4,
673    Linkage = 5,
674    Kernel = 6,
675    Vector16 = 7,
676    Float16Buffer = 8,
677    Float16 = 9,
678    Float64 = 10,
679    Int64 = 11,
680    Int64Atomics = 12,
681    ImageBasic = 13,
682    ImageReadWrite = 14,
683    ImageMipmap = 15,
684    Pipes = 17,
685    Groups = 18,
686    DeviceEnqueue = 19,
687    LiteralSampler = 20,
688    AtomicStorage = 21,
689    Int16 = 22,
690    TessellationPointSize = 23,
691    GeometryPointSize = 24,
692    ImageGatherExtended = 25,
693    StorageImageMultisample = 27,
694    UniformBufferArrayDynamicIndexing = 28,
695    SampledImageArrayDynamicIndexing = 29,
696    StorageBufferArrayDynamicIndexing = 30,
697    StorageImageArrayDynamicIndexing = 31,
698    ClipDistance = 32,
699    CullDistance = 33,
700    ImageCubeArray = 34,
701    SampleRateShading = 35,
702    ImageRect = 36,
703    SampledRect = 37,
704    GenericPointer = 38,
705    Int8 = 39,
706    InputAttachment = 40,
707    SparseResidency = 41,
708    MinLod = 42,
709    Sampled1D = 43,
710    Image1D = 44,
711    SampledCubeArray = 45,
712    SampledBuffer = 46,
713    ImageBuffer = 47,
714    ImageMSArray = 48,
715    StorageImageExtendedFormats = 49,
716    ImageQuery = 50,
717    DerivativeControl = 51,
718    InterpolationFunction = 52,
719    TransformFeedback = 53,
720    GeometryStreams = 54,
721    StorageImageReadWithoutFormat = 55,
722    StorageImageWriteWithoutFormat = 56,
723    MultiViewport = 57,
724    SubgroupDispatch = 58,
725    NamedBarrier = 59,
726    PipeStorage = 60,
727    GroupNonUniform = 61,
728    GroupNonUniformVote = 62,
729    GroupNonUniformArithmetic = 63,
730    GroupNonUniformBallot = 64,
731    GroupNonUniformShuffle = 65,
732    GroupNonUniformShuffleRelative = 66,
733    GroupNonUniformClustered = 67,
734    GroupNonUniformQuad = 68,
735    SubgroupBallotKHR = 4423,
736    DrawParameters = 4427,
737    SubgroupVoteKHR = 4431,
738    StorageBuffer16BitAccess = 4433,
739    StorageUniformBufferBlock16 = 4433,
740    StorageUniform16 = 4434,
741    UniformAndStorageBuffer16BitAccess = 4434,
742    StoragePushConstant16 = 4435,
743    StorageInputOutput16 = 4436,
744    DeviceGroup = 4437,
745    MultiView = 4439,
746    VariablePointersStorageBuffer = 4441,
747    VariablePointers = 4442,
748    AtomicStorageOps = 4445,
749    SampleMaskPostDepthCoverage = 4447,
750    StorageBuffer8BitAccess = 4448,
751    UniformAndStorageBuffer8BitAccess = 4449,
752    StoragePushConstant8 = 4450,
753    Float16ImageAMD = 5008,
754    ImageGatherBiasLodAMD = 5009,
755    FragmentMaskAMD = 5010,
756    StencilExportEXT = 5013,
757    ImageReadWriteLodAMD = 5015,
758    SampleMaskOverrideCoverageNV = 5249,
759    GeometryShaderPassthroughNV = 5251,
760    ShaderViewportIndexLayerEXT = 5254,
761    ShaderViewportIndexLayerNV = 5254,
762    ShaderViewportMaskNV = 5255,
763    ShaderStereoViewNV = 5259,
764    PerViewAttributesNV = 5260,
765    FragmentFullyCoveredEXT = 5265,
766    MeshShadingNV = 5266,
767    ImageFootprintNV = 5282,
768    FragmentBarycentricNV = 5284,
769    ComputeDerivativeGroupQuadsNV = 5288,
770    ShadingRateNV = 5291,
771    GroupNonUniformPartitionedNV = 5297,
772    ShaderNonUniformEXT = 5301,
773    RuntimeDescriptorArrayEXT = 5302,
774    InputAttachmentArrayDynamicIndexingEXT = 5303,
775    UniformTexelBufferArrayDynamicIndexingEXT = 5304,
776    StorageTexelBufferArrayDynamicIndexingEXT = 5305,
777    UniformBufferArrayNonUniformIndexingEXT = 5306,
778    SampledImageArrayNonUniformIndexingEXT = 5307,
779    StorageBufferArrayNonUniformIndexingEXT = 5308,
780    StorageImageArrayNonUniformIndexingEXT = 5309,
781    InputAttachmentArrayNonUniformIndexingEXT = 5310,
782    UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
783    StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
784    RaytracingNVX = 5340,
785    VulkanMemoryModelKHR = 5345,
786    VulkanMemoryModelDeviceScopeKHR = 5346,
787    ComputeDerivativeGroupLinearNV = 5350,
788    SubgroupShuffleINTEL = 5568,
789    SubgroupBufferBlockIOINTEL = 5569,
790    SubgroupImageBlockIOINTEL = 5570,
791    Max = 0x7fffffff,
792};
793
794enum class Op : unsigned {
795    OpNop = 0,
796    OpUndef = 1,
797    OpSourceContinued = 2,
798    OpSource = 3,
799    OpSourceExtension = 4,
800    OpName = 5,
801    OpMemberName = 6,
802    OpString = 7,
803    OpLine = 8,
804    OpExtension = 10,
805    OpExtInstImport = 11,
806    OpExtInst = 12,
807    OpMemoryModel = 14,
808    OpEntryPoint = 15,
809    OpExecutionMode = 16,
810    OpCapability = 17,
811    OpTypeVoid = 19,
812    OpTypeBool = 20,
813    OpTypeInt = 21,
814    OpTypeFloat = 22,
815    OpTypeVector = 23,
816    OpTypeMatrix = 24,
817    OpTypeImage = 25,
818    OpTypeSampler = 26,
819    OpTypeSampledImage = 27,
820    OpTypeArray = 28,
821    OpTypeRuntimeArray = 29,
822    OpTypeStruct = 30,
823    OpTypeOpaque = 31,
824    OpTypePointer = 32,
825    OpTypeFunction = 33,
826    OpTypeEvent = 34,
827    OpTypeDeviceEvent = 35,
828    OpTypeReserveId = 36,
829    OpTypeQueue = 37,
830    OpTypePipe = 38,
831    OpTypeForwardPointer = 39,
832    OpConstantTrue = 41,
833    OpConstantFalse = 42,
834    OpConstant = 43,
835    OpConstantComposite = 44,
836    OpConstantSampler = 45,
837    OpConstantNull = 46,
838    OpSpecConstantTrue = 48,
839    OpSpecConstantFalse = 49,
840    OpSpecConstant = 50,
841    OpSpecConstantComposite = 51,
842    OpSpecConstantOp = 52,
843    OpFunction = 54,
844    OpFunctionParameter = 55,
845    OpFunctionEnd = 56,
846    OpFunctionCall = 57,
847    OpVariable = 59,
848    OpImageTexelPointer = 60,
849    OpLoad = 61,
850    OpStore = 62,
851    OpCopyMemory = 63,
852    OpCopyMemorySized = 64,
853    OpAccessChain = 65,
854    OpInBoundsAccessChain = 66,
855    OpPtrAccessChain = 67,
856    OpArrayLength = 68,
857    OpGenericPtrMemSemantics = 69,
858    OpInBoundsPtrAccessChain = 70,
859    OpDecorate = 71,
860    OpMemberDecorate = 72,
861    OpDecorationGroup = 73,
862    OpGroupDecorate = 74,
863    OpGroupMemberDecorate = 75,
864    OpVectorExtractDynamic = 77,
865    OpVectorInsertDynamic = 78,
866    OpVectorShuffle = 79,
867    OpCompositeConstruct = 80,
868    OpCompositeExtract = 81,
869    OpCompositeInsert = 82,
870    OpCopyObject = 83,
871    OpTranspose = 84,
872    OpSampledImage = 86,
873    OpImageSampleImplicitLod = 87,
874    OpImageSampleExplicitLod = 88,
875    OpImageSampleDrefImplicitLod = 89,
876    OpImageSampleDrefExplicitLod = 90,
877    OpImageSampleProjImplicitLod = 91,
878    OpImageSampleProjExplicitLod = 92,
879    OpImageSampleProjDrefImplicitLod = 93,
880    OpImageSampleProjDrefExplicitLod = 94,
881    OpImageFetch = 95,
882    OpImageGather = 96,
883    OpImageDrefGather = 97,
884    OpImageRead = 98,
885    OpImageWrite = 99,
886    OpImage = 100,
887    OpImageQueryFormat = 101,
888    OpImageQueryOrder = 102,
889    OpImageQuerySizeLod = 103,
890    OpImageQuerySize = 104,
891    OpImageQueryLod = 105,
892    OpImageQueryLevels = 106,
893    OpImageQuerySamples = 107,
894    OpConvertFToU = 109,
895    OpConvertFToS = 110,
896    OpConvertSToF = 111,
897    OpConvertUToF = 112,
898    OpUConvert = 113,
899    OpSConvert = 114,
900    OpFConvert = 115,
901    OpQuantizeToF16 = 116,
902    OpConvertPtrToU = 117,
903    OpSatConvertSToU = 118,
904    OpSatConvertUToS = 119,
905    OpConvertUToPtr = 120,
906    OpPtrCastToGeneric = 121,
907    OpGenericCastToPtr = 122,
908    OpGenericCastToPtrExplicit = 123,
909    OpBitcast = 124,
910    OpSNegate = 126,
911    OpFNegate = 127,
912    OpIAdd = 128,
913    OpFAdd = 129,
914    OpISub = 130,
915    OpFSub = 131,
916    OpIMul = 132,
917    OpFMul = 133,
918    OpUDiv = 134,
919    OpSDiv = 135,
920    OpFDiv = 136,
921    OpUMod = 137,
922    OpSRem = 138,
923    OpSMod = 139,
924    OpFRem = 140,
925    OpFMod = 141,
926    OpVectorTimesScalar = 142,
927    OpMatrixTimesScalar = 143,
928    OpVectorTimesMatrix = 144,
929    OpMatrixTimesVector = 145,
930    OpMatrixTimesMatrix = 146,
931    OpOuterProduct = 147,
932    OpDot = 148,
933    OpIAddCarry = 149,
934    OpISubBorrow = 150,
935    OpUMulExtended = 151,
936    OpSMulExtended = 152,
937    OpAny = 154,
938    OpAll = 155,
939    OpIsNan = 156,
940    OpIsInf = 157,
941    OpIsFinite = 158,
942    OpIsNormal = 159,
943    OpSignBitSet = 160,
944    OpLessOrGreater = 161,
945    OpOrdered = 162,
946    OpUnordered = 163,
947    OpLogicalEqual = 164,
948    OpLogicalNotEqual = 165,
949    OpLogicalOr = 166,
950    OpLogicalAnd = 167,
951    OpLogicalNot = 168,
952    OpSelect = 169,
953    OpIEqual = 170,
954    OpINotEqual = 171,
955    OpUGreaterThan = 172,
956    OpSGreaterThan = 173,
957    OpUGreaterThanEqual = 174,
958    OpSGreaterThanEqual = 175,
959    OpULessThan = 176,
960    OpSLessThan = 177,
961    OpULessThanEqual = 178,
962    OpSLessThanEqual = 179,
963    OpFOrdEqual = 180,
964    OpFUnordEqual = 181,
965    OpFOrdNotEqual = 182,
966    OpFUnordNotEqual = 183,
967    OpFOrdLessThan = 184,
968    OpFUnordLessThan = 185,
969    OpFOrdGreaterThan = 186,
970    OpFUnordGreaterThan = 187,
971    OpFOrdLessThanEqual = 188,
972    OpFUnordLessThanEqual = 189,
973    OpFOrdGreaterThanEqual = 190,
974    OpFUnordGreaterThanEqual = 191,
975    OpShiftRightLogical = 194,
976    OpShiftRightArithmetic = 195,
977    OpShiftLeftLogical = 196,
978    OpBitwiseOr = 197,
979    OpBitwiseXor = 198,
980    OpBitwiseAnd = 199,
981    OpNot = 200,
982    OpBitFieldInsert = 201,
983    OpBitFieldSExtract = 202,
984    OpBitFieldUExtract = 203,
985    OpBitReverse = 204,
986    OpBitCount = 205,
987    OpDPdx = 207,
988    OpDPdy = 208,
989    OpFwidth = 209,
990    OpDPdxFine = 210,
991    OpDPdyFine = 211,
992    OpFwidthFine = 212,
993    OpDPdxCoarse = 213,
994    OpDPdyCoarse = 214,
995    OpFwidthCoarse = 215,
996    OpEmitVertex = 218,
997    OpEndPrimitive = 219,
998    OpEmitStreamVertex = 220,
999    OpEndStreamPrimitive = 221,
1000    OpControlBarrier = 224,
1001    OpMemoryBarrier = 225,
1002    OpAtomicLoad = 227,
1003    OpAtomicStore = 228,
1004    OpAtomicExchange = 229,
1005    OpAtomicCompareExchange = 230,
1006    OpAtomicCompareExchangeWeak = 231,
1007    OpAtomicIIncrement = 232,
1008    OpAtomicIDecrement = 233,
1009    OpAtomicIAdd = 234,
1010    OpAtomicISub = 235,
1011    OpAtomicSMin = 236,
1012    OpAtomicUMin = 237,
1013    OpAtomicSMax = 238,
1014    OpAtomicUMax = 239,
1015    OpAtomicAnd = 240,
1016    OpAtomicOr = 241,
1017    OpAtomicXor = 242,
1018    OpPhi = 245,
1019    OpLoopMerge = 246,
1020    OpSelectionMerge = 247,
1021    OpLabel = 248,
1022    OpBranch = 249,
1023    OpBranchConditional = 250,
1024    OpSwitch = 251,
1025    OpKill = 252,
1026    OpReturn = 253,
1027    OpReturnValue = 254,
1028    OpUnreachable = 255,
1029    OpLifetimeStart = 256,
1030    OpLifetimeStop = 257,
1031    OpGroupAsyncCopy = 259,
1032    OpGroupWaitEvents = 260,
1033    OpGroupAll = 261,
1034    OpGroupAny = 262,
1035    OpGroupBroadcast = 263,
1036    OpGroupIAdd = 264,
1037    OpGroupFAdd = 265,
1038    OpGroupFMin = 266,
1039    OpGroupUMin = 267,
1040    OpGroupSMin = 268,
1041    OpGroupFMax = 269,
1042    OpGroupUMax = 270,
1043    OpGroupSMax = 271,
1044    OpReadPipe = 274,
1045    OpWritePipe = 275,
1046    OpReservedReadPipe = 276,
1047    OpReservedWritePipe = 277,
1048    OpReserveReadPipePackets = 278,
1049    OpReserveWritePipePackets = 279,
1050    OpCommitReadPipe = 280,
1051    OpCommitWritePipe = 281,
1052    OpIsValidReserveId = 282,
1053    OpGetNumPipePackets = 283,
1054    OpGetMaxPipePackets = 284,
1055    OpGroupReserveReadPipePackets = 285,
1056    OpGroupReserveWritePipePackets = 286,
1057    OpGroupCommitReadPipe = 287,
1058    OpGroupCommitWritePipe = 288,
1059    OpEnqueueMarker = 291,
1060    OpEnqueueKernel = 292,
1061    OpGetKernelNDrangeSubGroupCount = 293,
1062    OpGetKernelNDrangeMaxSubGroupSize = 294,
1063    OpGetKernelWorkGroupSize = 295,
1064    OpGetKernelPreferredWorkGroupSizeMultiple = 296,
1065    OpRetainEvent = 297,
1066    OpReleaseEvent = 298,
1067    OpCreateUserEvent = 299,
1068    OpIsValidEvent = 300,
1069    OpSetUserEventStatus = 301,
1070    OpCaptureEventProfilingInfo = 302,
1071    OpGetDefaultQueue = 303,
1072    OpBuildNDRange = 304,
1073    OpImageSparseSampleImplicitLod = 305,
1074    OpImageSparseSampleExplicitLod = 306,
1075    OpImageSparseSampleDrefImplicitLod = 307,
1076    OpImageSparseSampleDrefExplicitLod = 308,
1077    OpImageSparseSampleProjImplicitLod = 309,
1078    OpImageSparseSampleProjExplicitLod = 310,
1079    OpImageSparseSampleProjDrefImplicitLod = 311,
1080    OpImageSparseSampleProjDrefExplicitLod = 312,
1081    OpImageSparseFetch = 313,
1082    OpImageSparseGather = 314,
1083    OpImageSparseDrefGather = 315,
1084    OpImageSparseTexelsResident = 316,
1085    OpNoLine = 317,
1086    OpAtomicFlagTestAndSet = 318,
1087    OpAtomicFlagClear = 319,
1088    OpImageSparseRead = 320,
1089    OpSizeOf = 321,
1090    OpTypePipeStorage = 322,
1091    OpConstantPipeStorage = 323,
1092    OpCreatePipeFromPipeStorage = 324,
1093    OpGetKernelLocalSizeForSubgroupCount = 325,
1094    OpGetKernelMaxNumSubgroups = 326,
1095    OpTypeNamedBarrier = 327,
1096    OpNamedBarrierInitialize = 328,
1097    OpMemoryNamedBarrier = 329,
1098    OpModuleProcessed = 330,
1099    OpExecutionModeId = 331,
1100    OpDecorateId = 332,
1101    OpGroupNonUniformElect = 333,
1102    OpGroupNonUniformAll = 334,
1103    OpGroupNonUniformAny = 335,
1104    OpGroupNonUniformAllEqual = 336,
1105    OpGroupNonUniformBroadcast = 337,
1106    OpGroupNonUniformBroadcastFirst = 338,
1107    OpGroupNonUniformBallot = 339,
1108    OpGroupNonUniformInverseBallot = 340,
1109    OpGroupNonUniformBallotBitExtract = 341,
1110    OpGroupNonUniformBallotBitCount = 342,
1111    OpGroupNonUniformBallotFindLSB = 343,
1112    OpGroupNonUniformBallotFindMSB = 344,
1113    OpGroupNonUniformShuffle = 345,
1114    OpGroupNonUniformShuffleXor = 346,
1115    OpGroupNonUniformShuffleUp = 347,
1116    OpGroupNonUniformShuffleDown = 348,
1117    OpGroupNonUniformIAdd = 349,
1118    OpGroupNonUniformFAdd = 350,
1119    OpGroupNonUniformIMul = 351,
1120    OpGroupNonUniformFMul = 352,
1121    OpGroupNonUniformSMin = 353,
1122    OpGroupNonUniformUMin = 354,
1123    OpGroupNonUniformFMin = 355,
1124    OpGroupNonUniformSMax = 356,
1125    OpGroupNonUniformUMax = 357,
1126    OpGroupNonUniformFMax = 358,
1127    OpGroupNonUniformBitwiseAnd = 359,
1128    OpGroupNonUniformBitwiseOr = 360,
1129    OpGroupNonUniformBitwiseXor = 361,
1130    OpGroupNonUniformLogicalAnd = 362,
1131    OpGroupNonUniformLogicalOr = 363,
1132    OpGroupNonUniformLogicalXor = 364,
1133    OpGroupNonUniformQuadBroadcast = 365,
1134    OpGroupNonUniformQuadSwap = 366,
1135    OpSubgroupBallotKHR = 4421,
1136    OpSubgroupFirstInvocationKHR = 4422,
1137    OpSubgroupAllKHR = 4428,
1138    OpSubgroupAnyKHR = 4429,
1139    OpSubgroupAllEqualKHR = 4430,
1140    OpSubgroupReadInvocationKHR = 4432,
1141    OpGroupIAddNonUniformAMD = 5000,
1142    OpGroupFAddNonUniformAMD = 5001,
1143    OpGroupFMinNonUniformAMD = 5002,
1144    OpGroupUMinNonUniformAMD = 5003,
1145    OpGroupSMinNonUniformAMD = 5004,
1146    OpGroupFMaxNonUniformAMD = 5005,
1147    OpGroupUMaxNonUniformAMD = 5006,
1148    OpGroupSMaxNonUniformAMD = 5007,
1149    OpFragmentMaskFetchAMD = 5011,
1150    OpFragmentFetchAMD = 5012,
1151    OpImageSampleFootprintNV = 5283,
1152    OpGroupNonUniformPartitionNV = 5296,
1153    OpWritePackedPrimitiveIndices4x8NV = 5299,
1154    OpReportIntersectionNVX = 5334,
1155    OpIgnoreIntersectionNVX = 5335,
1156    OpTerminateRayNVX = 5336,
1157    OpTraceNVX = 5337,
1158    OpTypeAccelerationStructureNVX = 5341,
1159    OpSubgroupShuffleINTEL = 5571,
1160    OpSubgroupShuffleDownINTEL = 5572,
1161    OpSubgroupShuffleUpINTEL = 5573,
1162    OpSubgroupShuffleXorINTEL = 5574,
1163    OpSubgroupBlockReadINTEL = 5575,
1164    OpSubgroupBlockWriteINTEL = 5576,
1165    OpSubgroupImageBlockReadINTEL = 5577,
1166    OpSubgroupImageBlockWriteINTEL = 5578,
1167    OpDecorateStringGOOGLE = 5632,
1168    OpMemberDecorateStringGOOGLE = 5633,
1169    Max = 0x7fffffff,
1170};
1171
1172// Overload operator| for mask bit combining
1173
1174inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
1175inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
1176inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
1177inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
1178inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
1179inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
1180inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
1181inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
1182
1183}  // end namespace spv
1184
1185#endif  // #ifndef spirv_HPP
1186
1187