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