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