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