Home | History | Annotate | Download | only in libSPIRV
      1 // Copyright (c) 2014-2016 The Khronos Group Inc.
      2 //
      3 // Permission is hereby granted, free of charge, to any person obtaining a copy
      4 // of this software and/or associated documentation files (the "Materials"),
      5 // to deal in the Materials without restriction, including without limitation
      6 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
      7 // and/or sell copies of the Materials, and to permit persons to whom the
      8 // Materials are furnished to do so, subject to the following conditions:
      9 //
     10 // The above copyright notice and this permission notice shall be included in
     11 // all copies or substantial portions of the Materials.
     12 //
     13 // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
     14 // STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
     15 // HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
     16 //
     17 // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
     18 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
     20 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     22 // FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
     23 // IN THE MATERIALS.
     24 
     25 // This header is automatically generated by the same tool that creates
     26 // the Binary Section of the SPIR-V specification.
     27 
     28 // Enumeration tokens for SPIR-V, in various styles:
     29 //   C, C++, C++11, JSON, Lua, Python
     30 //
     31 // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
     32 // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
     33 // - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
     34 // - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
     35 // - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
     36 //
     37 // Some tokens act like mask values, which can be OR'd together,
     38 // while others are mutually exclusive.  The mask-like ones have
     39 // "Mask" in their name, and a parallel enum that has the shift
     40 // amount (1 << x) for each corresponding enumerant.
     41 
     42 #ifndef spirv_HPP
     43 #define spirv_HPP
     44 
     45 namespace spv {
     46 
     47 typedef unsigned int Id;
     48 
     49 #define SPV_VERSION 0x10100
     50 #define SPV_REVISION 1
     51 
     52 static const unsigned int MagicNumber = 0x07230203;
     53 static const unsigned int Version = 0x00010100;
     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 };
     65 
     66 enum ExecutionModel {
     67     ExecutionModelVertex = 0,
     68     ExecutionModelTessellationControl = 1,
     69     ExecutionModelTessellationEvaluation = 2,
     70     ExecutionModelGeometry = 3,
     71     ExecutionModelFragment = 4,
     72     ExecutionModelGLCompute = 5,
     73     ExecutionModelKernel = 6,
     74 };
     75 
     76 enum AddressingModel {
     77     AddressingModelLogical = 0,
     78     AddressingModelPhysical32 = 1,
     79     AddressingModelPhysical64 = 2,
     80 };
     81 
     82 enum MemoryModel {
     83     MemoryModelSimple = 0,
     84     MemoryModelGLSL450 = 1,
     85     MemoryModelOpenCL = 2,
     86 };
     87 
     88 enum ExecutionMode {
     89     ExecutionModeInvocations = 0,
     90     ExecutionModeSpacingEqual = 1,
     91     ExecutionModeSpacingFractionalEven = 2,
     92     ExecutionModeSpacingFractionalOdd = 3,
     93     ExecutionModeVertexOrderCw = 4,
     94     ExecutionModeVertexOrderCcw = 5,
     95     ExecutionModePixelCenterInteger = 6,
     96     ExecutionModeOriginUpperLeft = 7,
     97     ExecutionModeOriginLowerLeft = 8,
     98     ExecutionModeEarlyFragmentTests = 9,
     99     ExecutionModePointMode = 10,
    100     ExecutionModeXfb = 11,
    101     ExecutionModeDepthReplacing = 12,
    102     ExecutionModeDepthGreater = 14,
    103     ExecutionModeDepthLess = 15,
    104     ExecutionModeDepthUnchanged = 16,
    105     ExecutionModeLocalSize = 17,
    106     ExecutionModeLocalSizeHint = 18,
    107     ExecutionModeInputPoints = 19,
    108     ExecutionModeInputLines = 20,
    109     ExecutionModeInputLinesAdjacency = 21,
    110     ExecutionModeTriangles = 22,
    111     ExecutionModeInputTrianglesAdjacency = 23,
    112     ExecutionModeQuads = 24,
    113     ExecutionModeIsolines = 25,
    114     ExecutionModeOutputVertices = 26,
    115     ExecutionModeOutputPoints = 27,
    116     ExecutionModeOutputLineStrip = 28,
    117     ExecutionModeOutputTriangleStrip = 29,
    118     ExecutionModeVecTypeHint = 30,
    119     ExecutionModeContractionOff = 31,
    120     ExecutionModeInitializer = 33,
    121     ExecutionModeFinalizer = 34,
    122     ExecutionModeSubgroupSize = 35,
    123     ExecutionModeSubgroupsPerWorkgroup = 36,
    124 };
    125 
    126 enum StorageClass {
    127     StorageClassUniformConstant = 0,
    128     StorageClassInput = 1,
    129     StorageClassUniform = 2,
    130     StorageClassOutput = 3,
    131     StorageClassWorkgroup = 4,
    132     StorageClassCrossWorkgroup = 5,
    133     StorageClassPrivate = 6,
    134     StorageClassFunction = 7,
    135     StorageClassGeneric = 8,
    136     StorageClassPushConstant = 9,
    137     StorageClassAtomicCounter = 10,
    138     StorageClassImage = 11,
    139 };
    140 
    141 enum Dim {
    142     Dim1D = 0,
    143     Dim2D = 1,
    144     Dim3D = 2,
    145     DimCube = 3,
    146     DimRect = 4,
    147     DimBuffer = 5,
    148     DimSubpassData = 6,
    149 };
    150 
    151 enum SamplerAddressingMode {
    152     SamplerAddressingModeNone = 0,
    153     SamplerAddressingModeClampToEdge = 1,
    154     SamplerAddressingModeClamp = 2,
    155     SamplerAddressingModeRepeat = 3,
    156     SamplerAddressingModeRepeatMirrored = 4,
    157 };
    158 
    159 enum SamplerFilterMode {
    160     SamplerFilterModeNearest = 0,
    161     SamplerFilterModeLinear = 1,
    162 };
    163 
    164 enum ImageFormat {
    165     ImageFormatUnknown = 0,
    166     ImageFormatRgba32f = 1,
    167     ImageFormatRgba16f = 2,
    168     ImageFormatR32f = 3,
    169     ImageFormatRgba8 = 4,
    170     ImageFormatRgba8Snorm = 5,
    171     ImageFormatRg32f = 6,
    172     ImageFormatRg16f = 7,
    173     ImageFormatR11fG11fB10f = 8,
    174     ImageFormatR16f = 9,
    175     ImageFormatRgba16 = 10,
    176     ImageFormatRgb10A2 = 11,
    177     ImageFormatRg16 = 12,
    178     ImageFormatRg8 = 13,
    179     ImageFormatR16 = 14,
    180     ImageFormatR8 = 15,
    181     ImageFormatRgba16Snorm = 16,
    182     ImageFormatRg16Snorm = 17,
    183     ImageFormatRg8Snorm = 18,
    184     ImageFormatR16Snorm = 19,
    185     ImageFormatR8Snorm = 20,
    186     ImageFormatRgba32i = 21,
    187     ImageFormatRgba16i = 22,
    188     ImageFormatRgba8i = 23,
    189     ImageFormatR32i = 24,
    190     ImageFormatRg32i = 25,
    191     ImageFormatRg16i = 26,
    192     ImageFormatRg8i = 27,
    193     ImageFormatR16i = 28,
    194     ImageFormatR8i = 29,
    195     ImageFormatRgba32ui = 30,
    196     ImageFormatRgba16ui = 31,
    197     ImageFormatRgba8ui = 32,
    198     ImageFormatR32ui = 33,
    199     ImageFormatRgb10a2ui = 34,
    200     ImageFormatRg32ui = 35,
    201     ImageFormatRg16ui = 36,
    202     ImageFormatRg8ui = 37,
    203     ImageFormatR16ui = 38,
    204     ImageFormatR8ui = 39,
    205 };
    206 
    207 enum ImageChannelOrder {
    208     ImageChannelOrderR = 0,
    209     ImageChannelOrderA = 1,
    210     ImageChannelOrderRG = 2,
    211     ImageChannelOrderRA = 3,
    212     ImageChannelOrderRGB = 4,
    213     ImageChannelOrderRGBA = 5,
    214     ImageChannelOrderBGRA = 6,
    215     ImageChannelOrderARGB = 7,
    216     ImageChannelOrderIntensity = 8,
    217     ImageChannelOrderLuminance = 9,
    218     ImageChannelOrderRx = 10,
    219     ImageChannelOrderRGx = 11,
    220     ImageChannelOrderRGBx = 12,
    221     ImageChannelOrderDepth = 13,
    222     ImageChannelOrderDepthStencil = 14,
    223     ImageChannelOrdersRGB = 15,
    224     ImageChannelOrdersRGBx = 16,
    225     ImageChannelOrdersRGBA = 17,
    226     ImageChannelOrdersBGRA = 18,
    227     ImageChannelOrderABGR = 19,
    228 };
    229 
    230 enum ImageChannelDataType {
    231     ImageChannelDataTypeSnormInt8 = 0,
    232     ImageChannelDataTypeSnormInt16 = 1,
    233     ImageChannelDataTypeUnormInt8 = 2,
    234     ImageChannelDataTypeUnormInt16 = 3,
    235     ImageChannelDataTypeUnormShort565 = 4,
    236     ImageChannelDataTypeUnormShort555 = 5,
    237     ImageChannelDataTypeUnormInt101010 = 6,
    238     ImageChannelDataTypeSignedInt8 = 7,
    239     ImageChannelDataTypeSignedInt16 = 8,
    240     ImageChannelDataTypeSignedInt32 = 9,
    241     ImageChannelDataTypeUnsignedInt8 = 10,
    242     ImageChannelDataTypeUnsignedInt16 = 11,
    243     ImageChannelDataTypeUnsignedInt32 = 12,
    244     ImageChannelDataTypeHalfFloat = 13,
    245     ImageChannelDataTypeFloat = 14,
    246     ImageChannelDataTypeUnormInt24 = 15,
    247     ImageChannelDataTypeUnormInt101010_2 = 16,
    248 };
    249 
    250 enum ImageOperandsShift {
    251     ImageOperandsBiasShift = 0,
    252     ImageOperandsLodShift = 1,
    253     ImageOperandsGradShift = 2,
    254     ImageOperandsConstOffsetShift = 3,
    255     ImageOperandsOffsetShift = 4,
    256     ImageOperandsConstOffsetsShift = 5,
    257     ImageOperandsSampleShift = 6,
    258     ImageOperandsMinLodShift = 7,
    259 };
    260 
    261 enum ImageOperandsMask {
    262     ImageOperandsMaskNone = 0,
    263     ImageOperandsBiasMask = 0x00000001,
    264     ImageOperandsLodMask = 0x00000002,
    265     ImageOperandsGradMask = 0x00000004,
    266     ImageOperandsConstOffsetMask = 0x00000008,
    267     ImageOperandsOffsetMask = 0x00000010,
    268     ImageOperandsConstOffsetsMask = 0x00000020,
    269     ImageOperandsSampleMask = 0x00000040,
    270     ImageOperandsMinLodMask = 0x00000080,
    271 };
    272 
    273 enum FPFastMathModeShift {
    274     FPFastMathModeNotNaNShift = 0,
    275     FPFastMathModeNotInfShift = 1,
    276     FPFastMathModeNSZShift = 2,
    277     FPFastMathModeAllowRecipShift = 3,
    278     FPFastMathModeFastShift = 4,
    279 };
    280 
    281 enum FPFastMathModeMask {
    282     FPFastMathModeMaskNone = 0,
    283     FPFastMathModeNotNaNMask = 0x00000001,
    284     FPFastMathModeNotInfMask = 0x00000002,
    285     FPFastMathModeNSZMask = 0x00000004,
    286     FPFastMathModeAllowRecipMask = 0x00000008,
    287     FPFastMathModeFastMask = 0x00000010,
    288 };
    289 
    290 enum FPRoundingMode {
    291     FPRoundingModeRTE = 0,
    292     FPRoundingModeRTZ = 1,
    293     FPRoundingModeRTP = 2,
    294     FPRoundingModeRTN = 3,
    295 };
    296 
    297 enum LinkageType {
    298     LinkageTypeExport = 0,
    299     LinkageTypeImport = 1,
    300     LinkageTypeInternal, /* internal use only */
    301 };
    302 
    303 enum AccessQualifier {
    304     AccessQualifierReadOnly = 0,
    305     AccessQualifierWriteOnly = 1,
    306     AccessQualifierReadWrite = 2,
    307 };
    308 
    309 enum FunctionParameterAttribute {
    310     FunctionParameterAttributeZext = 0,
    311     FunctionParameterAttributeSext = 1,
    312     FunctionParameterAttributeByVal = 2,
    313     FunctionParameterAttributeSret = 3,
    314     FunctionParameterAttributeNoAlias = 4,
    315     FunctionParameterAttributeNoCapture = 5,
    316     FunctionParameterAttributeNoWrite = 6,
    317     FunctionParameterAttributeNoReadWrite = 7,
    318 };
    319 
    320 enum Decoration {
    321     DecorationRelaxedPrecision = 0,
    322     DecorationSpecId = 1,
    323     DecorationBlock = 2,
    324     DecorationBufferBlock = 3,
    325     DecorationRowMajor = 4,
    326     DecorationColMajor = 5,
    327     DecorationArrayStride = 6,
    328     DecorationMatrixStride = 7,
    329     DecorationGLSLShared = 8,
    330     DecorationGLSLPacked = 9,
    331     DecorationCPacked = 10,
    332     DecorationBuiltIn = 11,
    333     DecorationNoPerspective = 13,
    334     DecorationFlat = 14,
    335     DecorationPatch = 15,
    336     DecorationCentroid = 16,
    337     DecorationSample = 17,
    338     DecorationInvariant = 18,
    339     DecorationRestrict = 19,
    340     DecorationAliased = 20,
    341     DecorationVolatile = 21,
    342     DecorationConstant = 22,
    343     DecorationCoherent = 23,
    344     DecorationNonWritable = 24,
    345     DecorationNonReadable = 25,
    346     DecorationUniform = 26,
    347     DecorationSaturatedConversion = 28,
    348     DecorationStream = 29,
    349     DecorationLocation = 30,
    350     DecorationComponent = 31,
    351     DecorationIndex = 32,
    352     DecorationBinding = 33,
    353     DecorationDescriptorSet = 34,
    354     DecorationOffset = 35,
    355     DecorationXfbBuffer = 36,
    356     DecorationXfbStride = 37,
    357     DecorationFuncParamAttr = 38,
    358     DecorationFPRoundingMode = 39,
    359     DecorationFPFastMathMode = 40,
    360     DecorationLinkageAttributes = 41,
    361     DecorationNoContraction = 42,
    362     DecorationInputAttachmentIndex = 43,
    363     DecorationAlignment = 44,
    364     DecorationMaxByteOffset = 45,
    365 };
    366 
    367 enum BuiltIn {
    368     BuiltInPosition = 0,
    369     BuiltInPointSize = 1,
    370     BuiltInClipDistance = 3,
    371     BuiltInCullDistance = 4,
    372     BuiltInVertexId = 5,
    373     BuiltInInstanceId = 6,
    374     BuiltInPrimitiveId = 7,
    375     BuiltInInvocationId = 8,
    376     BuiltInLayer = 9,
    377     BuiltInViewportIndex = 10,
    378     BuiltInTessLevelOuter = 11,
    379     BuiltInTessLevelInner = 12,
    380     BuiltInTessCoord = 13,
    381     BuiltInPatchVertices = 14,
    382     BuiltInFragCoord = 15,
    383     BuiltInPointCoord = 16,
    384     BuiltInFrontFacing = 17,
    385     BuiltInSampleId = 18,
    386     BuiltInSamplePosition = 19,
    387     BuiltInSampleMask = 20,
    388     BuiltInFragDepth = 22,
    389     BuiltInHelperInvocation = 23,
    390     BuiltInNumWorkgroups = 24,
    391     BuiltInWorkgroupSize = 25,
    392     BuiltInWorkgroupId = 26,
    393     BuiltInLocalInvocationId = 27,
    394     BuiltInGlobalInvocationId = 28,
    395     BuiltInLocalInvocationIndex = 29,
    396     BuiltInWorkDim = 30,
    397     BuiltInGlobalSize = 31,
    398     BuiltInEnqueuedWorkgroupSize = 32,
    399     BuiltInGlobalOffset = 33,
    400     BuiltInGlobalLinearId = 34,
    401     BuiltInSubgroupSize = 36,
    402     BuiltInSubgroupMaxSize = 37,
    403     BuiltInNumSubgroups = 38,
    404     BuiltInNumEnqueuedSubgroups = 39,
    405     BuiltInSubgroupId = 40,
    406     BuiltInSubgroupLocalInvocationId = 41,
    407     BuiltInVertexIndex = 42,
    408     BuiltInInstanceIndex = 43,
    409 };
    410 
    411 enum SelectionControlShift {
    412     SelectionControlFlattenShift = 0,
    413     SelectionControlDontFlattenShift = 1,
    414 };
    415 
    416 enum SelectionControlMask {
    417     SelectionControlMaskNone = 0,
    418     SelectionControlFlattenMask = 0x00000001,
    419     SelectionControlDontFlattenMask = 0x00000002,
    420 };
    421 
    422 enum LoopControlShift {
    423     LoopControlUnrollShift = 0,
    424     LoopControlDontUnrollShift = 1,
    425     LoopControlDependencyInfiniteShift = 2,
    426     LoopControlDependencyLengthShift = 3,
    427 };
    428 
    429 enum LoopControlMask {
    430     LoopControlMaskNone = 0,
    431     LoopControlUnrollMask = 0x00000001,
    432     LoopControlDontUnrollMask = 0x00000002,
    433     LoopControlDependencyInfiniteMask = 0x00000004,
    434     LoopControlDependencyLengthMask = 0x00000008,
    435 };
    436 
    437 enum FunctionControlShift {
    438     FunctionControlInlineShift = 0,
    439     FunctionControlDontInlineShift = 1,
    440     FunctionControlPureShift = 2,
    441     FunctionControlConstShift = 3,
    442 };
    443 
    444 enum FunctionControlMask {
    445     FunctionControlMaskNone = 0,
    446     FunctionControlInlineMask = 0x00000001,
    447     FunctionControlDontInlineMask = 0x00000002,
    448     FunctionControlPureMask = 0x00000004,
    449     FunctionControlConstMask = 0x00000008,
    450 };
    451 
    452 enum MemorySemanticsShift {
    453     MemorySemanticsAcquireShift = 1,
    454     MemorySemanticsReleaseShift = 2,
    455     MemorySemanticsAcquireReleaseShift = 3,
    456     MemorySemanticsSequentiallyConsistentShift = 4,
    457     MemorySemanticsUniformMemoryShift = 6,
    458     MemorySemanticsSubgroupMemoryShift = 7,
    459     MemorySemanticsWorkgroupMemoryShift = 8,
    460     MemorySemanticsCrossWorkgroupMemoryShift = 9,
    461     MemorySemanticsAtomicCounterMemoryShift = 10,
    462     MemorySemanticsImageMemoryShift = 11,
    463 };
    464 
    465 enum MemorySemanticsMask {
    466     MemorySemanticsMaskNone = 0,
    467     MemorySemanticsAcquireMask = 0x00000002,
    468     MemorySemanticsReleaseMask = 0x00000004,
    469     MemorySemanticsAcquireReleaseMask = 0x00000008,
    470     MemorySemanticsSequentiallyConsistentMask = 0x00000010,
    471     MemorySemanticsUniformMemoryMask = 0x00000040,
    472     MemorySemanticsSubgroupMemoryMask = 0x00000080,
    473     MemorySemanticsWorkgroupMemoryMask = 0x00000100,
    474     MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
    475     MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
    476     MemorySemanticsImageMemoryMask = 0x00000800,
    477 };
    478 
    479 enum MemoryAccessShift {
    480     MemoryAccessVolatileShift = 0,
    481     MemoryAccessAlignedShift = 1,
    482     MemoryAccessNontemporalShift = 2,
    483 };
    484 
    485 enum MemoryAccessMask {
    486     MemoryAccessMaskNone = 0,
    487     MemoryAccessVolatileMask = 0x00000001,
    488     MemoryAccessAlignedMask = 0x00000002,
    489     MemoryAccessNontemporalMask = 0x00000004,
    490 };
    491 
    492 enum Scope {
    493     ScopeCrossDevice = 0,
    494     ScopeDevice = 1,
    495     ScopeWorkgroup = 2,
    496     ScopeSubgroup = 3,
    497     ScopeInvocation = 4,
    498 };
    499 
    500 enum GroupOperation {
    501     GroupOperationReduce = 0,
    502     GroupOperationInclusiveScan = 1,
    503     GroupOperationExclusiveScan = 2,
    504 };
    505 
    506 enum KernelEnqueueFlags {
    507     KernelEnqueueFlagsNoWait = 0,
    508     KernelEnqueueFlagsWaitKernel = 1,
    509     KernelEnqueueFlagsWaitWorkGroup = 2,
    510 };
    511 
    512 enum KernelProfilingInfoShift {
    513     KernelProfilingInfoCmdExecTimeShift = 0,
    514 };
    515 
    516 enum KernelProfilingInfoMask {
    517     KernelProfilingInfoMaskNone = 0,
    518     KernelProfilingInfoCmdExecTimeMask = 0x00000001,
    519 };
    520 
    521 enum Capability {
    522     CapabilityMatrix = 0,
    523     CapabilityShader = 1,
    524     CapabilityGeometry = 2,
    525     CapabilityTessellation = 3,
    526     CapabilityAddresses = 4,
    527     CapabilityLinkage = 5,
    528     CapabilityKernel = 6,
    529     CapabilityVector16 = 7,
    530     CapabilityFloat16Buffer = 8,
    531     CapabilityFloat16 = 9,
    532     CapabilityFloat64 = 10,
    533     CapabilityInt64 = 11,
    534     CapabilityInt64Atomics = 12,
    535     CapabilityImageBasic = 13,
    536     CapabilityImageReadWrite = 14,
    537     CapabilityImageMipmap = 15,
    538     CapabilityPipes = 17,
    539     CapabilityGroups = 18,
    540     CapabilityDeviceEnqueue = 19,
    541     CapabilityLiteralSampler = 20,
    542     CapabilityAtomicStorage = 21,
    543     CapabilityInt16 = 22,
    544     CapabilityTessellationPointSize = 23,
    545     CapabilityGeometryPointSize = 24,
    546     CapabilityImageGatherExtended = 25,
    547     CapabilityStorageImageMultisample = 27,
    548     CapabilityUniformBufferArrayDynamicIndexing = 28,
    549     CapabilitySampledImageArrayDynamicIndexing = 29,
    550     CapabilityStorageBufferArrayDynamicIndexing = 30,
    551     CapabilityStorageImageArrayDynamicIndexing = 31,
    552     CapabilityClipDistance = 32,
    553     CapabilityCullDistance = 33,
    554     CapabilityImageCubeArray = 34,
    555     CapabilitySampleRateShading = 35,
    556     CapabilityImageRect = 36,
    557     CapabilitySampledRect = 37,
    558     CapabilityGenericPointer = 38,
    559     CapabilityInt8 = 39,
    560     CapabilityInputAttachment = 40,
    561     CapabilitySparseResidency = 41,
    562     CapabilityMinLod = 42,
    563     CapabilitySampled1D = 43,
    564     CapabilityImage1D = 44,
    565     CapabilitySampledCubeArray = 45,
    566     CapabilitySampledBuffer = 46,
    567     CapabilityImageBuffer = 47,
    568     CapabilityImageMSArray = 48,
    569     CapabilityStorageImageExtendedFormats = 49,
    570     CapabilityImageQuery = 50,
    571     CapabilityDerivativeControl = 51,
    572     CapabilityInterpolationFunction = 52,
    573     CapabilityTransformFeedback = 53,
    574     CapabilityGeometryStreams = 54,
    575     CapabilityStorageImageReadWithoutFormat = 55,
    576     CapabilityStorageImageWriteWithoutFormat = 56,
    577     CapabilityMultiViewport = 57,
    578     CapabilitySubgroupDispatch = 58,
    579     CapabilityNamedBarrier = 59,
    580     CapabilityPipeStorage = 60,
    581 };
    582 
    583 enum Op {
    584     OpNop = 0,
    585     OpUndef = 1,
    586     OpSourceContinued = 2,
    587     OpSource = 3,
    588     OpSourceExtension = 4,
    589     OpName = 5,
    590     OpMemberName = 6,
    591     OpString = 7,
    592     OpLine = 8,
    593     OpExtension = 10,
    594     OpExtInstImport = 11,
    595     OpExtInst = 12,
    596     OpMemoryModel = 14,
    597     OpEntryPoint = 15,
    598     OpExecutionMode = 16,
    599     OpCapability = 17,
    600     OpTypeVoid = 19,
    601     OpTypeBool = 20,
    602     OpTypeInt = 21,
    603     OpTypeFloat = 22,
    604     OpTypeVector = 23,
    605     OpTypeMatrix = 24,
    606     OpTypeImage = 25,
    607     OpTypeSampler = 26,
    608     OpTypeSampledImage = 27,
    609     OpTypeArray = 28,
    610     OpTypeRuntimeArray = 29,
    611     OpTypeStruct = 30,
    612     OpTypeOpaque = 31,
    613     OpTypePointer = 32,
    614     OpTypeFunction = 33,
    615     OpTypeEvent = 34,
    616     OpTypeDeviceEvent = 35,
    617     OpTypeReserveId = 36,
    618     OpTypeQueue = 37,
    619     OpTypePipe = 38,
    620     OpTypeForwardPointer = 39,
    621     OpConstantTrue = 41,
    622     OpConstantFalse = 42,
    623     OpConstant = 43,
    624     OpConstantComposite = 44,
    625     OpConstantSampler = 45,
    626     OpConstantNull = 46,
    627     OpSpecConstantTrue = 48,
    628     OpSpecConstantFalse = 49,
    629     OpSpecConstant = 50,
    630     OpSpecConstantComposite = 51,
    631     OpSpecConstantOp = 52,
    632     OpFunction = 54,
    633     OpFunctionParameter = 55,
    634     OpFunctionEnd = 56,
    635     OpFunctionCall = 57,
    636     OpVariable = 59,
    637     OpImageTexelPointer = 60,
    638     OpLoad = 61,
    639     OpStore = 62,
    640     OpCopyMemory = 63,
    641     OpCopyMemorySized = 64,
    642     OpAccessChain = 65,
    643     OpInBoundsAccessChain = 66,
    644     OpPtrAccessChain = 67,
    645     OpArrayLength = 68,
    646     OpGenericPtrMemSemantics = 69,
    647     OpInBoundsPtrAccessChain = 70,
    648     OpDecorate = 71,
    649     OpMemberDecorate = 72,
    650     OpDecorationGroup = 73,
    651     OpGroupDecorate = 74,
    652     OpGroupMemberDecorate = 75,
    653     OpVectorExtractDynamic = 77,
    654     OpVectorInsertDynamic = 78,
    655     OpVectorShuffle = 79,
    656     OpCompositeConstruct = 80,
    657     OpCompositeExtract = 81,
    658     OpCompositeInsert = 82,
    659     OpCopyObject = 83,
    660     OpTranspose = 84,
    661     OpSampledImage = 86,
    662     OpImageSampleImplicitLod = 87,
    663     OpImageSampleExplicitLod = 88,
    664     OpImageSampleDrefImplicitLod = 89,
    665     OpImageSampleDrefExplicitLod = 90,
    666     OpImageSampleProjImplicitLod = 91,
    667     OpImageSampleProjExplicitLod = 92,
    668     OpImageSampleProjDrefImplicitLod = 93,
    669     OpImageSampleProjDrefExplicitLod = 94,
    670     OpImageFetch = 95,
    671     OpImageGather = 96,
    672     OpImageDrefGather = 97,
    673     OpImageRead = 98,
    674     OpImageWrite = 99,
    675     OpImage = 100,
    676     OpImageQueryFormat = 101,
    677     OpImageQueryOrder = 102,
    678     OpImageQuerySizeLod = 103,
    679     OpImageQuerySize = 104,
    680     OpImageQueryLod = 105,
    681     OpImageQueryLevels = 106,
    682     OpImageQuerySamples = 107,
    683     OpConvertFToU = 109,
    684     OpConvertFToS = 110,
    685     OpConvertSToF = 111,
    686     OpConvertUToF = 112,
    687     OpUConvert = 113,
    688     OpSConvert = 114,
    689     OpFConvert = 115,
    690     OpQuantizeToF16 = 116,
    691     OpConvertPtrToU = 117,
    692     OpSatConvertSToU = 118,
    693     OpSatConvertUToS = 119,
    694     OpConvertUToPtr = 120,
    695     OpPtrCastToGeneric = 121,
    696     OpGenericCastToPtr = 122,
    697     OpGenericCastToPtrExplicit = 123,
    698     OpBitcast = 124,
    699     OpSNegate = 126,
    700     OpFNegate = 127,
    701     OpIAdd = 128,
    702     OpFAdd = 129,
    703     OpISub = 130,
    704     OpFSub = 131,
    705     OpIMul = 132,
    706     OpFMul = 133,
    707     OpUDiv = 134,
    708     OpSDiv = 135,
    709     OpFDiv = 136,
    710     OpUMod = 137,
    711     OpSRem = 138,
    712     OpSMod = 139,
    713     OpFRem = 140,
    714     OpFMod = 141,
    715     OpVectorTimesScalar = 142,
    716     OpMatrixTimesScalar = 143,
    717     OpVectorTimesMatrix = 144,
    718     OpMatrixTimesVector = 145,
    719     OpMatrixTimesMatrix = 146,
    720     OpOuterProduct = 147,
    721     OpDot = 148,
    722     OpIAddCarry = 149,
    723     OpISubBorrow = 150,
    724     OpUMulExtended = 151,
    725     OpSMulExtended = 152,
    726     OpAny = 154,
    727     OpAll = 155,
    728     OpIsNan = 156,
    729     OpIsInf = 157,
    730     OpIsFinite = 158,
    731     OpIsNormal = 159,
    732     OpSignBitSet = 160,
    733     OpLessOrGreater = 161,
    734     OpOrdered = 162,
    735     OpUnordered = 163,
    736     OpLogicalEqual = 164,
    737     OpLogicalNotEqual = 165,
    738     OpLogicalOr = 166,
    739     OpLogicalAnd = 167,
    740     OpLogicalNot = 168,
    741     OpSelect = 169,
    742     OpIEqual = 170,
    743     OpINotEqual = 171,
    744     OpUGreaterThan = 172,
    745     OpSGreaterThan = 173,
    746     OpUGreaterThanEqual = 174,
    747     OpSGreaterThanEqual = 175,
    748     OpULessThan = 176,
    749     OpSLessThan = 177,
    750     OpULessThanEqual = 178,
    751     OpSLessThanEqual = 179,
    752     OpFOrdEqual = 180,
    753     OpFUnordEqual = 181,
    754     OpFOrdNotEqual = 182,
    755     OpFUnordNotEqual = 183,
    756     OpFOrdLessThan = 184,
    757     OpFUnordLessThan = 185,
    758     OpFOrdGreaterThan = 186,
    759     OpFUnordGreaterThan = 187,
    760     OpFOrdLessThanEqual = 188,
    761     OpFUnordLessThanEqual = 189,
    762     OpFOrdGreaterThanEqual = 190,
    763     OpFUnordGreaterThanEqual = 191,
    764     OpShiftRightLogical = 194,
    765     OpShiftRightArithmetic = 195,
    766     OpShiftLeftLogical = 196,
    767     OpBitwiseOr = 197,
    768     OpBitwiseXor = 198,
    769     OpBitwiseAnd = 199,
    770     OpNot = 200,
    771     OpBitFieldInsert = 201,
    772     OpBitFieldSExtract = 202,
    773     OpBitFieldUExtract = 203,
    774     OpBitReverse = 204,
    775     OpBitCount = 205,
    776     OpDPdx = 207,
    777     OpDPdy = 208,
    778     OpFwidth = 209,
    779     OpDPdxFine = 210,
    780     OpDPdyFine = 211,
    781     OpFwidthFine = 212,
    782     OpDPdxCoarse = 213,
    783     OpDPdyCoarse = 214,
    784     OpFwidthCoarse = 215,
    785     OpEmitVertex = 218,
    786     OpEndPrimitive = 219,
    787     OpEmitStreamVertex = 220,
    788     OpEndStreamPrimitive = 221,
    789     OpControlBarrier = 224,
    790     OpMemoryBarrier = 225,
    791     OpAtomicLoad = 227,
    792     OpAtomicStore = 228,
    793     OpAtomicExchange = 229,
    794     OpAtomicCompareExchange = 230,
    795     OpAtomicCompareExchangeWeak = 231,
    796     OpAtomicIIncrement = 232,
    797     OpAtomicIDecrement = 233,
    798     OpAtomicIAdd = 234,
    799     OpAtomicISub = 235,
    800     OpAtomicSMin = 236,
    801     OpAtomicUMin = 237,
    802     OpAtomicSMax = 238,
    803     OpAtomicUMax = 239,
    804     OpAtomicAnd = 240,
    805     OpAtomicOr = 241,
    806     OpAtomicXor = 242,
    807     OpPhi = 245,
    808     OpLoopMerge = 246,
    809     OpSelectionMerge = 247,
    810     OpLabel = 248,
    811     OpBranch = 249,
    812     OpBranchConditional = 250,
    813     OpSwitch = 251,
    814     OpKill = 252,
    815     OpReturn = 253,
    816     OpReturnValue = 254,
    817     OpUnreachable = 255,
    818     OpLifetimeStart = 256,
    819     OpLifetimeStop = 257,
    820     OpGroupAsyncCopy = 259,
    821     OpGroupWaitEvents = 260,
    822     OpGroupAll = 261,
    823     OpGroupAny = 262,
    824     OpGroupBroadcast = 263,
    825     OpGroupIAdd = 264,
    826     OpGroupFAdd = 265,
    827     OpGroupFMin = 266,
    828     OpGroupUMin = 267,
    829     OpGroupSMin = 268,
    830     OpGroupFMax = 269,
    831     OpGroupUMax = 270,
    832     OpGroupSMax = 271,
    833     OpReadPipe = 274,
    834     OpWritePipe = 275,
    835     OpReservedReadPipe = 276,
    836     OpReservedWritePipe = 277,
    837     OpReserveReadPipePackets = 278,
    838     OpReserveWritePipePackets = 279,
    839     OpCommitReadPipe = 280,
    840     OpCommitWritePipe = 281,
    841     OpIsValidReserveId = 282,
    842     OpGetNumPipePackets = 283,
    843     OpGetMaxPipePackets = 284,
    844     OpGroupReserveReadPipePackets = 285,
    845     OpGroupReserveWritePipePackets = 286,
    846     OpGroupCommitReadPipe = 287,
    847     OpGroupCommitWritePipe = 288,
    848     OpEnqueueMarker = 291,
    849     OpEnqueueKernel = 292,
    850     OpGetKernelNDrangeSubGroupCount = 293,
    851     OpGetKernelNDrangeMaxSubGroupSize = 294,
    852     OpGetKernelWorkGroupSize = 295,
    853     OpGetKernelPreferredWorkGroupSizeMultiple = 296,
    854     OpRetainEvent = 297,
    855     OpReleaseEvent = 298,
    856     OpCreateUserEvent = 299,
    857     OpIsValidEvent = 300,
    858     OpSetUserEventStatus = 301,
    859     OpCaptureEventProfilingInfo = 302,
    860     OpGetDefaultQueue = 303,
    861     OpBuildNDRange = 304,
    862     OpImageSparseSampleImplicitLod = 305,
    863     OpImageSparseSampleExplicitLod = 306,
    864     OpImageSparseSampleDrefImplicitLod = 307,
    865     OpImageSparseSampleDrefExplicitLod = 308,
    866     OpImageSparseSampleProjImplicitLod = 309,
    867     OpImageSparseSampleProjExplicitLod = 310,
    868     OpImageSparseSampleProjDrefImplicitLod = 311,
    869     OpImageSparseSampleProjDrefExplicitLod = 312,
    870     OpImageSparseFetch = 313,
    871     OpImageSparseGather = 314,
    872     OpImageSparseDrefGather = 315,
    873     OpImageSparseTexelsResident = 316,
    874     OpNoLine = 317,
    875     OpAtomicFlagTestAndSet = 318,
    876     OpAtomicFlagClear = 319,
    877     OpImageSparseRead = 320,
    878     OpSizeOf = 321,
    879     OpTypePipeStorage = 322,
    880     OpConstantPipeStorage = 323,
    881     OpCreatePipeFromPipeStorage = 324,
    882     OpGetKernelLocalSizeForSubgroupCount = 325,
    883     OpGetKernelMaxNumSubgroups = 326,
    884     OpTypeNamedBarrier = 327,
    885     OpNamedBarrierInitialize = 328,
    886     OpMemoryNamedBarrier = 329,
    887     OpModuleProcessed = 330,
    888     OpForward = 1024, /* internal use only */
    889 };
    890 
    891 // Overload operator| for mask bit combining
    892 
    893 inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
    894 inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
    895 inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
    896 inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
    897 inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
    898 inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
    899 inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
    900 inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
    901 
    902 }  // end namespace spv
    903 
    904 #endif  // #ifndef spirv_HPP
    905 
    906