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