-#ifdef __cplusplus
-
-namespace spv {
-
-static const int MagicNumber = 0x07230203;
-static const int Version = 99;
-
-typedef unsigned int Id;
-
-static const unsigned int OpCodeMask = 0xFFFF;
-static const unsigned int WordCountShift = 16;
-
-enum SourceLanguage {
- SourceLanguageUnknown = 0,
- SourceLanguageESSL = 1,
- SourceLanguageGLSL = 2,
- SourceLanguageOpenCL = 3,
-};
-
-enum ExecutionModel {
- ExecutionModelVertex = 0,
- ExecutionModelTessellationControl = 1,
- ExecutionModelTessellationEvaluation = 2,
- ExecutionModelGeometry = 3,
- ExecutionModelFragment = 4,
- ExecutionModelGLCompute = 5,
- ExecutionModelKernel = 6,
-};
-
-enum AddressingModel {
- AddressingModelLogical = 0,
- AddressingModelPhysical32 = 1,
- AddressingModelPhysical64 = 2,
-};
-
-enum MemoryModel {
- MemoryModelSimple = 0,
- MemoryModelGLSL450 = 1,
- MemoryModelOpenCL12 = 2,
- MemoryModelOpenCL20 = 3,
- MemoryModelOpenCL21 = 4,
-};
-
-enum ExecutionMode {
- ExecutionModeInvocations = 0,
- ExecutionModeSpacingEqual = 1,
- ExecutionModeSpacingFractionalEven = 2,
- ExecutionModeSpacingFractionalOdd = 3,
- ExecutionModeVertexOrderCw = 4,
- ExecutionModeVertexOrderCcw = 5,
- ExecutionModePixelCenterInteger = 6,
- ExecutionModeOriginUpperLeft = 7,
- ExecutionModeEarlyFragmentTests = 8,
- ExecutionModePointMode = 9,
- ExecutionModeXfb = 10,
- ExecutionModeDepthReplacing = 11,
- ExecutionModeDepthAny = 12,
- ExecutionModeDepthGreater = 13,
- ExecutionModeDepthLess = 14,
- ExecutionModeDepthUnchanged = 15,
- ExecutionModeLocalSize = 16,
- ExecutionModeLocalSizeHint = 17,
- ExecutionModeInputPoints = 18,
- ExecutionModeInputLines = 19,
- ExecutionModeInputLinesAdjacency = 20,
- ExecutionModeInputTriangles = 21,
- ExecutionModeInputTrianglesAdjacency = 22,
- ExecutionModeInputQuads = 23,
- ExecutionModeInputIsolines = 24,
- ExecutionModeOutputVertices = 25,
- ExecutionModeOutputPoints = 26,
- ExecutionModeOutputLineStrip = 27,
- ExecutionModeOutputTriangleStrip = 28,
- ExecutionModeVecTypeHint = 29,
- ExecutionModeContractionOff = 30,
-};
-
-enum StorageClass {
- StorageClassUniformConstant = 0,
- StorageClassInput = 1,
- StorageClassUniform = 2,
- StorageClassOutput = 3,
- StorageClassWorkgroupLocal = 4,
- StorageClassWorkgroupGlobal = 5,
- StorageClassPrivateGlobal = 6,
- StorageClassFunction = 7,
- StorageClassGeneric = 8,
- StorageClassPrivate = 9,
- StorageClassAtomicCounter = 10,
-};
-
-enum Dim {
- Dim1D = 0,
- Dim2D = 1,
- Dim3D = 2,
- DimCube = 3,
- DimRect = 4,
- DimBuffer = 5,
-};
-
-enum SamplerAddressingMode {
- SamplerAddressingModeNone = 0,
- SamplerAddressingModeClampToEdge = 1,
- SamplerAddressingModeClamp = 2,
- SamplerAddressingModeRepeat = 3,
- SamplerAddressingModeRepeatMirrored = 4,
-};
-
-enum SamplerFilterMode {
- SamplerFilterModeNearest = 0,
- SamplerFilterModeLinear = 1,
-};
-
-enum FPFastMathModeShift {
- FPFastMathModeNotNaNShift = 0,
- FPFastMathModeNotInfShift = 1,
- FPFastMathModeNSZShift = 2,
- FPFastMathModeAllowRecipShift = 3,
- FPFastMathModeFastShift = 4,
-};
-
-enum FPFastMathModeMask {
- FPFastMathModeMaskNone = 0,
- FPFastMathModeNotNaNMask = 0x00000001,
- FPFastMathModeNotInfMask = 0x00000002,
- FPFastMathModeNSZMask = 0x00000004,
- FPFastMathModeAllowRecipMask = 0x00000008,
- FPFastMathModeFastMask = 0x00000010,
-};
-
-enum FPRoundingMode {
- FPRoundingModeRTE = 0,
- FPRoundingModeRTZ = 1,
- FPRoundingModeRTP = 2,
- FPRoundingModeRTN = 3,
-};
-
-enum LinkageType {
- LinkageTypeExport = 0,
- LinkageTypeImport = 1,
-};
-
-enum AccessQualifier {
- AccessQualifierReadOnly = 0,
- AccessQualifierWriteOnly = 1,
- AccessQualifierReadWrite = 2,
-};
-
-enum FunctionParameterAttribute {
- FunctionParameterAttributeZext = 0,
- FunctionParameterAttributeSext = 1,
- FunctionParameterAttributeByVal = 2,
- FunctionParameterAttributeSret = 3,
- FunctionParameterAttributeNoAlias = 4,
- FunctionParameterAttributeNoCapture = 5,
- FunctionParameterAttributeSVM = 6,
- FunctionParameterAttributeNoWrite = 7,
- FunctionParameterAttributeNoReadWrite = 8,
-};
-
-enum Decoration {
- DecorationPrecisionLow = 0,
- DecorationPrecisionMedium = 1,
- DecorationPrecisionHigh = 2,
- DecorationBlock = 3,
- DecorationBufferBlock = 4,
- DecorationRowMajor = 5,
- DecorationColMajor = 6,
- DecorationGLSLShared = 7,
- DecorationGLSLStd140 = 8,
- DecorationGLSLStd430 = 9,
- DecorationGLSLPacked = 10,
- DecorationSmooth = 11,
- DecorationNoperspective = 12,
- DecorationFlat = 13,
- DecorationPatch = 14,
- DecorationCentroid = 15,
- DecorationSample = 16,
- DecorationInvariant = 17,
- DecorationRestrict = 18,
- DecorationAliased = 19,
- DecorationVolatile = 20,
- DecorationConstant = 21,
- DecorationCoherent = 22,
- DecorationNonwritable = 23,
- DecorationNonreadable = 24,
- DecorationUniform = 25,
- DecorationNoStaticUse = 26,
- DecorationCPacked = 27,
- DecorationSaturatedConversion = 28,
- DecorationStream = 29,
- DecorationLocation = 30,
- DecorationComponent = 31,
- DecorationIndex = 32,
- DecorationBinding = 33,
- DecorationDescriptorSet = 34,
- DecorationOffset = 35,
- DecorationAlignment = 36,
- DecorationXfbBuffer = 37,
- DecorationStride = 38,
- DecorationBuiltIn = 39,
- DecorationFuncParamAttr = 40,
- DecorationFPRoundingMode = 41,
- DecorationFPFastMathMode = 42,
- DecorationLinkageAttributes = 43,
- DecorationSpecId = 44,
-};
-
-enum BuiltIn {
- BuiltInPosition = 0,
- BuiltInPointSize = 1,
- BuiltInClipVertex = 2,
- BuiltInClipDistance = 3,
- BuiltInCullDistance = 4,
- BuiltInVertexId = 5,
- BuiltInInstanceId = 6,
- BuiltInPrimitiveId = 7,
- BuiltInInvocationId = 8,
- BuiltInLayer = 9,
- BuiltInViewportIndex = 10,
- BuiltInTessLevelOuter = 11,
- BuiltInTessLevelInner = 12,
- BuiltInTessCoord = 13,
- BuiltInPatchVertices = 14,
- BuiltInFragCoord = 15,
- BuiltInPointCoord = 16,
- BuiltInFrontFacing = 17,
- BuiltInSampleId = 18,
- BuiltInSamplePosition = 19,
- BuiltInSampleMask = 20,
- BuiltInFragColor = 21,
- BuiltInFragDepth = 22,
- BuiltInHelperInvocation = 23,
- BuiltInNumWorkgroups = 24,
- BuiltInWorkgroupSize = 25,
- BuiltInWorkgroupId = 26,
- BuiltInLocalInvocationId = 27,
- BuiltInGlobalInvocationId = 28,
- BuiltInLocalInvocationIndex = 29,
- BuiltInWorkDim = 30,
- BuiltInGlobalSize = 31,
- BuiltInEnqueuedWorkgroupSize = 32,
- BuiltInGlobalOffset = 33,
- BuiltInGlobalLinearId = 34,
- BuiltInWorkgroupLinearId = 35,
- BuiltInSubgroupSize = 36,
- BuiltInSubgroupMaxSize = 37,
- BuiltInNumSubgroups = 38,
- BuiltInNumEnqueuedSubgroups = 39,
- BuiltInSubgroupId = 40,
- BuiltInSubgroupLocalInvocationId = 41,
-};
-
-enum SelectionControlShift {
- SelectionControlFlattenShift = 0,
- SelectionControlDontFlattenShift = 1,
-};
-
-enum SelectionControlMask {
- SelectionControlMaskNone = 0,
- SelectionControlFlattenMask = 0x00000001,
- SelectionControlDontFlattenMask = 0x00000002,
-};
-
-enum LoopControlShift {
- LoopControlUnrollShift = 0,
- LoopControlDontUnrollShift = 1,
-};
-
-enum LoopControlMask {
- LoopControlMaskNone = 0,
- LoopControlUnrollMask = 0x00000001,
- LoopControlDontUnrollMask = 0x00000002,
-};
-
-enum FunctionControlShift {
- FunctionControlInlineShift = 0,
- FunctionControlDontInlineShift = 1,
- FunctionControlPureShift = 2,
- FunctionControlConstShift = 3,
-};
-
-enum FunctionControlMask {
- FunctionControlMaskNone = 0,
- FunctionControlInlineMask = 0x00000001,
- FunctionControlDontInlineMask = 0x00000002,
- FunctionControlPureMask = 0x00000004,
- FunctionControlConstMask = 0x00000008,
-};
-
-enum MemorySemanticsShift {
- MemorySemanticsRelaxedShift = 0,
- MemorySemanticsSequentiallyConsistentShift = 1,
- MemorySemanticsAcquireShift = 2,
- MemorySemanticsReleaseShift = 3,
- MemorySemanticsUniformMemoryShift = 4,
- MemorySemanticsSubgroupMemoryShift = 5,
- MemorySemanticsWorkgroupLocalMemoryShift = 6,
- MemorySemanticsWorkgroupGlobalMemoryShift = 7,
- MemorySemanticsAtomicCounterMemoryShift = 8,
- MemorySemanticsImageMemoryShift = 9,
-};
-
-enum MemorySemanticsMask {
- MemorySemanticsMaskNone = 0,
- MemorySemanticsRelaxedMask = 0x00000001,
- MemorySemanticsSequentiallyConsistentMask = 0x00000002,
- MemorySemanticsAcquireMask = 0x00000004,
- MemorySemanticsReleaseMask = 0x00000008,
- MemorySemanticsUniformMemoryMask = 0x00000010,
- MemorySemanticsSubgroupMemoryMask = 0x00000020,
- MemorySemanticsWorkgroupLocalMemoryMask = 0x00000040,
- MemorySemanticsWorkgroupGlobalMemoryMask = 0x00000080,
- MemorySemanticsAtomicCounterMemoryMask = 0x00000100,
- MemorySemanticsImageMemoryMask = 0x00000200,
-};
-
-enum MemoryAccessShift {
- MemoryAccessVolatileShift = 0,
- MemoryAccessAlignedShift = 1,
-};
-
-enum MemoryAccessMask {
- MemoryAccessMaskNone = 0,
- MemoryAccessVolatileMask = 0x00000001,
- MemoryAccessAlignedMask = 0x00000002,
-};
-
-enum ExecutionScope {
- ExecutionScopeCrossDevice = 0,
- ExecutionScopeDevice = 1,
- ExecutionScopeWorkgroup = 2,
- ExecutionScopeSubgroup = 3,
-};
-
-enum GroupOperation {
- GroupOperationReduce = 0,
- GroupOperationInclusiveScan = 1,
- GroupOperationExclusiveScan = 2,
-};
-
-enum KernelEnqueueFlags {
- KernelEnqueueFlagsNoWait = 0,
- KernelEnqueueFlagsWaitKernel = 1,
- KernelEnqueueFlagsWaitWorkGroup = 2,
-};
-
-enum KernelProfilingInfoShift {
- KernelProfilingInfoCmdExecTimeShift = 0,
-};
-
-enum KernelProfilingInfoMask {
- KernelProfilingInfoMaskNone = 0,
- KernelProfilingInfoCmdExecTimeMask = 0x00000001,
-};
-
-enum Op {
- OpNop = 0,
- OpSource = 1,
- OpSourceExtension = 2,
- OpExtension = 3,
- OpExtInstImport = 4,
- OpMemoryModel = 5,
- OpEntryPoint = 6,
- OpExecutionMode = 7,
- OpTypeVoid = 8,
- OpTypeBool = 9,
- OpTypeInt = 10,
- OpTypeFloat = 11,
- OpTypeVector = 12,
- OpTypeMatrix = 13,
- OpTypeSampler = 14,
- OpTypeFilter = 15,
- OpTypeArray = 16,
- OpTypeRuntimeArray = 17,
- OpTypeStruct = 18,
- OpTypeOpaque = 19,
- OpTypePointer = 20,
- OpTypeFunction = 21,
- OpTypeEvent = 22,
- OpTypeDeviceEvent = 23,
- OpTypeReserveId = 24,
- OpTypeQueue = 25,
- OpTypePipe = 26,
- OpConstantTrue = 27,
- OpConstantFalse = 28,
- OpConstant = 29,
- OpConstantComposite = 30,
- OpConstantSampler = 31,
- OpConstantNullPointer = 32,
- OpConstantNullObject = 33,
- OpSpecConstantTrue = 34,
- OpSpecConstantFalse = 35,
- OpSpecConstant = 36,
- OpSpecConstantComposite = 37,
- OpVariable = 38,
- OpVariableArray = 39,
- OpFunction = 40,
- OpFunctionParameter = 41,
- OpFunctionEnd = 42,
- OpFunctionCall = 43,
- OpExtInst = 44,
- OpUndef = 45,
- OpLoad = 46,
- OpStore = 47,
- OpPhi = 48,
- OpDecorationGroup = 49,
- OpDecorate = 50,
- OpMemberDecorate = 51,
- OpGroupDecorate = 52,
- OpGroupMemberDecorate = 53,
- OpName = 54,
- OpMemberName = 55,
- OpString = 56,
- OpLine = 57,
- OpVectorExtractDynamic = 58,
- OpVectorInsertDynamic = 59,
- OpVectorShuffle = 60,
- OpCompositeConstruct = 61,
- OpCompositeExtract = 62,
- OpCompositeInsert = 63,
- OpCopyObject = 64,
- OpCopyMemory = 65,
- OpCopyMemorySized = 66,
- OpSampler = 67,
- OpTextureSample = 68,
- OpTextureSampleDref = 69,
- OpTextureSampleLod = 70,
- OpTextureSampleProj = 71,
- OpTextureSampleGrad = 72,
- OpTextureSampleOffset = 73,
- OpTextureSampleProjLod = 74,
- OpTextureSampleProjGrad = 75,
- OpTextureSampleLodOffset = 76,
- OpTextureSampleProjOffset = 77,
- OpTextureSampleGradOffset = 78,
- OpTextureSampleProjLodOffset = 79,
- OpTextureSampleProjGradOffset = 80,
- OpTextureFetchTexelLod = 81,
- OpTextureFetchTexelOffset = 82,
- OpTextureFetchSample = 83,
- OpTextureFetchTexel = 84,
- OpTextureGather = 85,
- OpTextureGatherOffset = 86,
- OpTextureGatherOffsets = 87,
- OpTextureQuerySizeLod = 88,
- OpTextureQuerySize = 89,
- OpTextureQueryLod = 90,
- OpTextureQueryLevels = 91,
- OpTextureQuerySamples = 92,
- OpAccessChain = 93,
- OpInBoundsAccessChain = 94,
- OpSNegate = 95,
- OpFNegate = 96,
- OpNot = 97,
- OpAny = 98,
- OpAll = 99,
- OpConvertFToU = 100,
- OpConvertFToS = 101,
- OpConvertSToF = 102,
- OpConvertUToF = 103,
- OpUConvert = 104,
- OpSConvert = 105,
- OpFConvert = 106,
- OpConvertPtrToU = 107,
- OpConvertUToPtr = 108,
- OpPtrCastToGeneric = 109,
- OpGenericCastToPtr = 110,
- OpBitcast = 111,
- OpTranspose = 112,
- OpIsNan = 113,
- OpIsInf = 114,
- OpIsFinite = 115,
- OpIsNormal = 116,
- OpSignBitSet = 117,
- OpLessOrGreater = 118,
- OpOrdered = 119,
- OpUnordered = 120,
- OpArrayLength = 121,
- OpIAdd = 122,
- OpFAdd = 123,
- OpISub = 124,
- OpFSub = 125,
- OpIMul = 126,
- OpFMul = 127,
- OpUDiv = 128,
- OpSDiv = 129,
- OpFDiv = 130,
- OpUMod = 131,
- OpSRem = 132,
- OpSMod = 133,
- OpFRem = 134,
- OpFMod = 135,
- OpVectorTimesScalar = 136,
- OpMatrixTimesScalar = 137,
- OpVectorTimesMatrix = 138,
- OpMatrixTimesVector = 139,
- OpMatrixTimesMatrix = 140,
- OpOuterProduct = 141,
- OpDot = 142,
- OpShiftRightLogical = 143,
- OpShiftRightArithmetic = 144,
- OpShiftLeftLogical = 145,
- OpLogicalOr = 146,
- OpLogicalXor = 147,
- OpLogicalAnd = 148,
- OpBitwiseOr = 149,
- OpBitwiseXor = 150,
- OpBitwiseAnd = 151,
- OpSelect = 152,
- OpIEqual = 153,
- OpFOrdEqual = 154,
- OpFUnordEqual = 155,
- OpINotEqual = 156,
- OpFOrdNotEqual = 157,
- OpFUnordNotEqual = 158,
- OpULessThan = 159,
- OpSLessThan = 160,
- OpFOrdLessThan = 161,
- OpFUnordLessThan = 162,
- OpUGreaterThan = 163,
- OpSGreaterThan = 164,
- OpFOrdGreaterThan = 165,
- OpFUnordGreaterThan = 166,
- OpULessThanEqual = 167,
- OpSLessThanEqual = 168,
- OpFOrdLessThanEqual = 169,
- OpFUnordLessThanEqual = 170,
- OpUGreaterThanEqual = 171,
- OpSGreaterThanEqual = 172,
- OpFOrdGreaterThanEqual = 173,
- OpFUnordGreaterThanEqual = 174,
- OpDPdx = 175,
- OpDPdy = 176,
- OpFwidth = 177,
- OpDPdxFine = 178,
- OpDPdyFine = 179,
- OpFwidthFine = 180,
- OpDPdxCoarse = 181,
- OpDPdyCoarse = 182,
- OpFwidthCoarse = 183,
- OpEmitVertex = 184,
- OpEndPrimitive = 185,
- OpEmitStreamVertex = 186,
- OpEndStreamPrimitive = 187,
- OpControlBarrier = 188,
- OpMemoryBarrier = 189,
- OpImagePointer = 190,
- OpAtomicInit = 191,
- OpAtomicLoad = 192,
- OpAtomicStore = 193,
- OpAtomicExchange = 194,
- OpAtomicCompareExchange = 195,
- OpAtomicCompareExchangeWeak = 196,
- OpAtomicIIncrement = 197,
- OpAtomicIDecrement = 198,
- OpAtomicIAdd = 199,
- OpAtomicISub = 200,
- OpAtomicUMin = 201,
- OpAtomicUMax = 202,
- OpAtomicAnd = 203,
- OpAtomicOr = 204,
- OpAtomicXor = 205,
- OpLoopMerge = 206,
- OpSelectionMerge = 207,
- OpLabel = 208,
- OpBranch = 209,
- OpBranchConditional = 210,
- OpSwitch = 211,
- OpKill = 212,
- OpReturn = 213,
- OpReturnValue = 214,
- OpUnreachable = 215,
- OpLifetimeStart = 216,
- OpLifetimeStop = 217,
- OpCompileFlag = 218,
- OpAsyncGroupCopy = 219,
- OpWaitGroupEvents = 220,
- OpGroupAll = 221,
- OpGroupAny = 222,
- OpGroupBroadcast = 223,
- OpGroupIAdd = 224,
- OpGroupFAdd = 225,
- OpGroupFMin = 226,
- OpGroupUMin = 227,
- OpGroupSMin = 228,
- OpGroupFMax = 229,
- OpGroupUMax = 230,
- OpGroupSMax = 231,
- OpGenericCastToPtrExplicit = 232,
- OpGenericPtrMemSemantics = 233,
- OpReadPipe = 234,
- OpWritePipe = 235,
- OpReservedReadPipe = 236,
- OpReservedWritePipe = 237,
- OpReserveReadPipePackets = 238,
- OpReserveWritePipePackets = 239,
- OpCommitReadPipe = 240,
- OpCommitWritePipe = 241,
- OpIsValidReserveId = 242,
- OpGetNumPipePackets = 243,
- OpGetMaxPipePackets = 244,
- OpGroupReserveReadPipePackets = 245,
- OpGroupReserveWritePipePackets = 246,
- OpGroupCommitReadPipe = 247,
- OpGroupCommitWritePipe = 248,
- OpEnqueueMarker = 249,
- OpEnqueueKernel = 250,
- OpGetKernelNDrangeSubGroupCount = 251,
- OpGetKernelNDrangeMaxSubGroupSize = 252,
- OpGetKernelWorkGroupSize = 253,
- OpGetKernelPreferredWorkGroupSizeMultiple = 254,
- OpRetainEvent = 255,
- OpReleaseEvent = 256,
- OpCreateUserEvent = 257,
- OpIsValidEvent = 258,
- OpSetUserEventStatus = 259,
- OpCaptureEventProfilingInfo = 260,
- OpGetDefaultQueue = 261,
- OpBuildNDRange = 262,
- OpSatConvertSToU = 263,
- OpSatConvertUToS = 264,
- OpAtomicIMin = 265,
- OpAtomicIMax = 266,
-};
-
-}; // end namespace spv
-
-#endif // #ifdef __cplusplus
-
-
-#ifndef __cplusplus
-
-static const int SpvMagicNumber = 0x07230203;
-static const int SpvVersion = 99;
-