1 /* 2 ** Copyright (c) 2014-2016 The Khronos Group Inc. 3 ** 4 ** Permission is hereby granted, free of charge, to any person obtaining a copy 5 ** of this software and/or associated documentation files (the "Materials"), 6 ** to deal in the Materials without restriction, including without limitation 7 ** the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 ** and/or sell copies of the Materials, and to permit persons to whom the 9 ** Materials are furnished to do so, subject to the following conditions: 10 ** 11 ** The above copyright notice and this permission notice shall be included in 12 ** all copies or substantial portions of the Materials. 13 ** 14 ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS 15 ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND 16 ** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ 17 ** 18 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 ** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 ** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS 24 ** IN THE MATERIALS. 25 */ 26 27 /* 28 ** This header is automatically generated by the same tool that creates 29 ** the Binary Section of the SPIR-V specification. 30 */ 31 32 /* 33 ** Enumeration tokens for SPIR-V, in various styles: 34 ** C, C++, C++11, JSON, Lua, Python 35 ** 36 ** - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL 37 ** - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL 38 ** - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL 39 ** - Lua will use tables, e.g.: spv.SourceLanguage.GLSL 40 ** - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] 41 ** 42 ** Some tokens act like mask values, which can be OR'd together, 43 ** while others are mutually exclusive. The mask-like ones have 44 ** "Mask" in their name, and a parallel enum that has the shift 45 ** amount (1 << x) for each corresponding enumerant. 46 */ 47 48 #ifndef spirv_H 49 #define spirv_H 50 51 typedef unsigned int SpvId; 52 53 #define SPV_VERSION 0x10000 54 #define SPV_REVISION 4 55 56 static const unsigned int SpvMagicNumber = 0x07230203; 57 #ifdef SKSL_EXT 58 static const unsigned int SpvVersion = (1 << 16) | (5 << 8); // spv 1.5 59 #else 60 static const unsigned int SpvVersion = 0x00010000; 61 #endif 62 static const unsigned int SpvRevision = 4; 63 static const unsigned int SpvOpCodeMask = 0xffff; 64 static const unsigned int SpvWordCountShift = 16; 65 66 typedef enum SpvSourceLanguage_ { 67 SpvSourceLanguageUnknown = 0, 68 SpvSourceLanguageESSL = 1, 69 SpvSourceLanguageGLSL = 2, 70 SpvSourceLanguageOpenCL_C = 3, 71 SpvSourceLanguageOpenCL_CPP = 4, 72 } SpvSourceLanguage; 73 74 typedef enum SpvExecutionModel_ { 75 SpvExecutionModelVertex = 0, 76 SpvExecutionModelTessellationControl = 1, 77 SpvExecutionModelTessellationEvaluation = 2, 78 SpvExecutionModelGeometry = 3, 79 SpvExecutionModelFragment = 4, 80 SpvExecutionModelGLCompute = 5, 81 SpvExecutionModelKernel = 6, 82 } SpvExecutionModel; 83 84 typedef enum SpvAddressingModel_ { 85 SpvAddressingModelLogical = 0, 86 SpvAddressingModelPhysical32 = 1, 87 SpvAddressingModelPhysical64 = 2, 88 } SpvAddressingModel; 89 90 typedef enum SpvMemoryModel_ { 91 SpvMemoryModelSimple = 0, 92 SpvMemoryModelGLSL450 = 1, 93 SpvMemoryModelOpenCL = 2, 94 } SpvMemoryModel; 95 96 typedef enum SpvExecutionMode_ { 97 SpvExecutionModeInvocations = 0, 98 SpvExecutionModeSpacingEqual = 1, 99 SpvExecutionModeSpacingFractionalEven = 2, 100 SpvExecutionModeSpacingFractionalOdd = 3, 101 SpvExecutionModeVertexOrderCw = 4, 102 SpvExecutionModeVertexOrderCcw = 5, 103 SpvExecutionModePixelCenterInteger = 6, 104 SpvExecutionModeOriginUpperLeft = 7, 105 SpvExecutionModeOriginLowerLeft = 8, 106 SpvExecutionModeEarlyFragmentTests = 9, 107 SpvExecutionModePointMode = 10, 108 SpvExecutionModeXfb = 11, 109 SpvExecutionModeDepthReplacing = 12, 110 SpvExecutionModeDepthGreater = 14, 111 SpvExecutionModeDepthLess = 15, 112 SpvExecutionModeDepthUnchanged = 16, 113 SpvExecutionModeLocalSize = 17, 114 SpvExecutionModeLocalSizeHint = 18, 115 SpvExecutionModeInputPoints = 19, 116 SpvExecutionModeInputLines = 20, 117 SpvExecutionModeInputLinesAdjacency = 21, 118 SpvExecutionModeTriangles = 22, 119 SpvExecutionModeInputTrianglesAdjacency = 23, 120 SpvExecutionModeQuads = 24, 121 SpvExecutionModeIsolines = 25, 122 SpvExecutionModeOutputVertices = 26, 123 SpvExecutionModeOutputPoints = 27, 124 SpvExecutionModeOutputLineStrip = 28, 125 SpvExecutionModeOutputTriangleStrip = 29, 126 SpvExecutionModeVecTypeHint = 30, 127 SpvExecutionModeContractionOff = 31, 128 } SpvExecutionMode; 129 130 typedef enum SpvStorageClass_ { 131 SpvStorageClassUniformConstant = 0, 132 SpvStorageClassInput = 1, 133 SpvStorageClassUniform = 2, 134 SpvStorageClassOutput = 3, 135 SpvStorageClassWorkgroup = 4, 136 SpvStorageClassCrossWorkgroup = 5, 137 SpvStorageClassPrivate = 6, 138 SpvStorageClassFunction = 7, 139 SpvStorageClassGeneric = 8, 140 SpvStorageClassPushConstant = 9, 141 SpvStorageClassAtomicCounter = 10, 142 SpvStorageClassImage = 11, 143 #ifdef SKSL_EXT 144 SpvStorageClassStorageBuffer = 12, 145 #endif 146 } SpvStorageClass; 147 148 typedef enum SpvDim_ { 149 SpvDim1D = 0, 150 SpvDim2D = 1, 151 SpvDim3D = 2, 152 SpvDimCube = 3, 153 SpvDimRect = 4, 154 SpvDimBuffer = 5, 155 SpvDimSubpassData = 6, 156 } SpvDim; 157 158 typedef enum SpvSamplerAddressingMode_ { 159 SpvSamplerAddressingModeNone = 0, 160 SpvSamplerAddressingModeClampToEdge = 1, 161 SpvSamplerAddressingModeClamp = 2, 162 SpvSamplerAddressingModeRepeat = 3, 163 SpvSamplerAddressingModeRepeatMirrored = 4, 164 } SpvSamplerAddressingMode; 165 166 typedef enum SpvSamplerFilterMode_ { 167 SpvSamplerFilterModeNearest = 0, 168 SpvSamplerFilterModeLinear = 1, 169 } SpvSamplerFilterMode; 170 171 typedef enum SpvImageFormat_ { 172 SpvImageFormatUnknown = 0, 173 SpvImageFormatRgba32f = 1, 174 SpvImageFormatRgba16f = 2, 175 SpvImageFormatR32f = 3, 176 SpvImageFormatRgba8 = 4, 177 SpvImageFormatRgba8Snorm = 5, 178 SpvImageFormatRg32f = 6, 179 SpvImageFormatRg16f = 7, 180 SpvImageFormatR11fG11fB10f = 8, 181 SpvImageFormatR16f = 9, 182 SpvImageFormatRgba16 = 10, 183 SpvImageFormatRgb10A2 = 11, 184 SpvImageFormatRg16 = 12, 185 SpvImageFormatRg8 = 13, 186 SpvImageFormatR16 = 14, 187 SpvImageFormatR8 = 15, 188 SpvImageFormatRgba16Snorm = 16, 189 SpvImageFormatRg16Snorm = 17, 190 SpvImageFormatRg8Snorm = 18, 191 SpvImageFormatR16Snorm = 19, 192 SpvImageFormatR8Snorm = 20, 193 SpvImageFormatRgba32i = 21, 194 SpvImageFormatRgba16i = 22, 195 SpvImageFormatRgba8i = 23, 196 SpvImageFormatR32i = 24, 197 SpvImageFormatRg32i = 25, 198 SpvImageFormatRg16i = 26, 199 SpvImageFormatRg8i = 27, 200 SpvImageFormatR16i = 28, 201 SpvImageFormatR8i = 29, 202 SpvImageFormatRgba32ui = 30, 203 SpvImageFormatRgba16ui = 31, 204 SpvImageFormatRgba8ui = 32, 205 SpvImageFormatR32ui = 33, 206 SpvImageFormatRgb10a2ui = 34, 207 SpvImageFormatRg32ui = 35, 208 SpvImageFormatRg16ui = 36, 209 SpvImageFormatRg8ui = 37, 210 SpvImageFormatR16ui = 38, 211 SpvImageFormatR8ui = 39, 212 } SpvImageFormat; 213 214 typedef enum SpvImageChannelOrder_ { 215 SpvImageChannelOrderR = 0, 216 SpvImageChannelOrderA = 1, 217 SpvImageChannelOrderRG = 2, 218 SpvImageChannelOrderRA = 3, 219 SpvImageChannelOrderRGB = 4, 220 SpvImageChannelOrderRGBA = 5, 221 SpvImageChannelOrderBGRA = 6, 222 SpvImageChannelOrderARGB = 7, 223 SpvImageChannelOrderIntensity = 8, 224 SpvImageChannelOrderLuminance = 9, 225 SpvImageChannelOrderRx = 10, 226 SpvImageChannelOrderRGx = 11, 227 SpvImageChannelOrderRGBx = 12, 228 SpvImageChannelOrderDepth = 13, 229 SpvImageChannelOrderDepthStencil = 14, 230 SpvImageChannelOrdersRGB = 15, 231 SpvImageChannelOrdersRGBx = 16, 232 SpvImageChannelOrdersRGBA = 17, 233 SpvImageChannelOrdersBGRA = 18, 234 } SpvImageChannelOrder; 235 236 typedef enum SpvImageChannelDataType_ { 237 SpvImageChannelDataTypeSnormInt8 = 0, 238 SpvImageChannelDataTypeSnormInt16 = 1, 239 SpvImageChannelDataTypeUnormInt8 = 2, 240 SpvImageChannelDataTypeUnormInt16 = 3, 241 SpvImageChannelDataTypeUnormShort565 = 4, 242 SpvImageChannelDataTypeUnormShort555 = 5, 243 SpvImageChannelDataTypeUnormInt101010 = 6, 244 SpvImageChannelDataTypeSignedInt8 = 7, 245 SpvImageChannelDataTypeSignedInt16 = 8, 246 SpvImageChannelDataTypeSignedInt32 = 9, 247 SpvImageChannelDataTypeUnsignedInt8 = 10, 248 SpvImageChannelDataTypeUnsignedInt16 = 11, 249 SpvImageChannelDataTypeUnsignedInt32 = 12, 250 SpvImageChannelDataTypeHalfFloat = 13, 251 SpvImageChannelDataTypeFloat = 14, 252 SpvImageChannelDataTypeUnormInt24 = 15, 253 SpvImageChannelDataTypeUnormInt101010_2 = 16, 254 } SpvImageChannelDataType; 255 256 typedef enum SpvImageOperandsShift_ { 257 SpvImageOperandsBiasShift = 0, 258 SpvImageOperandsLodShift = 1, 259 SpvImageOperandsGradShift = 2, 260 SpvImageOperandsConstOffsetShift = 3, 261 SpvImageOperandsOffsetShift = 4, 262 SpvImageOperandsConstOffsetsShift = 5, 263 SpvImageOperandsSampleShift = 6, 264 SpvImageOperandsMinLodShift = 7, 265 } SpvImageOperandsShift; 266 267 typedef enum SpvImageOperandsMask_ { 268 SpvImageOperandsMaskNone = 0, 269 SpvImageOperandsBiasMask = 0x00000001, 270 SpvImageOperandsLodMask = 0x00000002, 271 SpvImageOperandsGradMask = 0x00000004, 272 SpvImageOperandsConstOffsetMask = 0x00000008, 273 SpvImageOperandsOffsetMask = 0x00000010, 274 SpvImageOperandsConstOffsetsMask = 0x00000020, 275 SpvImageOperandsSampleMask = 0x00000040, 276 SpvImageOperandsMinLodMask = 0x00000080, 277 } SpvImageOperandsMask; 278 279 typedef enum SpvFPFastMathModeShift_ { 280 SpvFPFastMathModeNotNaNShift = 0, 281 SpvFPFastMathModeNotInfShift = 1, 282 SpvFPFastMathModeNSZShift = 2, 283 SpvFPFastMathModeAllowRecipShift = 3, 284 SpvFPFastMathModeFastShift = 4, 285 } SpvFPFastMathModeShift; 286 287 typedef enum SpvFPFastMathModeMask_ { 288 SpvFPFastMathModeMaskNone = 0, 289 SpvFPFastMathModeNotNaNMask = 0x00000001, 290 SpvFPFastMathModeNotInfMask = 0x00000002, 291 SpvFPFastMathModeNSZMask = 0x00000004, 292 SpvFPFastMathModeAllowRecipMask = 0x00000008, 293 SpvFPFastMathModeFastMask = 0x00000010, 294 } SpvFPFastMathModeMask; 295 296 typedef enum SpvFPRoundingMode_ { 297 SpvFPRoundingModeRTE = 0, 298 SpvFPRoundingModeRTZ = 1, 299 SpvFPRoundingModeRTP = 2, 300 SpvFPRoundingModeRTN = 3, 301 } SpvFPRoundingMode; 302 303 typedef enum SpvLinkageType_ { 304 SpvLinkageTypeExport = 0, 305 SpvLinkageTypeImport = 1, 306 } SpvLinkageType; 307 308 typedef enum SpvAccessQualifier_ { 309 SpvAccessQualifierReadOnly = 0, 310 SpvAccessQualifierWriteOnly = 1, 311 SpvAccessQualifierReadWrite = 2, 312 } SpvAccessQualifier; 313 314 typedef enum SpvFunctionParameterAttribute_ { 315 SpvFunctionParameterAttributeZext = 0, 316 SpvFunctionParameterAttributeSext = 1, 317 SpvFunctionParameterAttributeByVal = 2, 318 SpvFunctionParameterAttributeSret = 3, 319 SpvFunctionParameterAttributeNoAlias = 4, 320 SpvFunctionParameterAttributeNoCapture = 5, 321 SpvFunctionParameterAttributeNoWrite = 6, 322 SpvFunctionParameterAttributeNoReadWrite = 7, 323 } SpvFunctionParameterAttribute; 324 325 typedef enum SpvDecoration_ { 326 SpvDecorationRelaxedPrecision = 0, 327 SpvDecorationSpecId = 1, 328 SpvDecorationBlock = 2, 329 SpvDecorationBufferBlock = 3, 330 SpvDecorationRowMajor = 4, 331 SpvDecorationColMajor = 5, 332 SpvDecorationArrayStride = 6, 333 SpvDecorationMatrixStride = 7, 334 SpvDecorationGLSLShared = 8, 335 SpvDecorationGLSLPacked = 9, 336 SpvDecorationCPacked = 10, 337 SpvDecorationBuiltIn = 11, 338 SpvDecorationNoPerspective = 13, 339 SpvDecorationFlat = 14, 340 SpvDecorationPatch = 15, 341 SpvDecorationCentroid = 16, 342 SpvDecorationSample = 17, 343 SpvDecorationInvariant = 18, 344 SpvDecorationRestrict = 19, 345 SpvDecorationAliased = 20, 346 SpvDecorationVolatile = 21, 347 SpvDecorationConstant = 22, 348 SpvDecorationCoherent = 23, 349 SpvDecorationNonWritable = 24, 350 SpvDecorationNonReadable = 25, 351 SpvDecorationUniform = 26, 352 SpvDecorationSaturatedConversion = 28, 353 SpvDecorationStream = 29, 354 SpvDecorationLocation = 30, 355 SpvDecorationComponent = 31, 356 SpvDecorationIndex = 32, 357 SpvDecorationBinding = 33, 358 SpvDecorationDescriptorSet = 34, 359 SpvDecorationOffset = 35, 360 SpvDecorationXfbBuffer = 36, 361 SpvDecorationXfbStride = 37, 362 SpvDecorationFuncParamAttr = 38, 363 SpvDecorationFPRoundingMode = 39, 364 SpvDecorationFPFastMathMode = 40, 365 SpvDecorationLinkageAttributes = 41, 366 SpvDecorationNoContraction = 42, 367 SpvDecorationInputAttachmentIndex = 43, 368 SpvDecorationAlignment = 44, 369 #ifdef SKSL_EXT 370 SpvDecorationNonUniform = 5300, 371 #endif 372 } SpvDecoration; 373 374 typedef enum SpvBuiltIn_ { 375 SpvBuiltInPosition = 0, 376 SpvBuiltInPointSize = 1, 377 SpvBuiltInClipDistance = 3, 378 SpvBuiltInCullDistance = 4, 379 SpvBuiltInVertexId = 5, 380 SpvBuiltInInstanceId = 6, 381 SpvBuiltInPrimitiveId = 7, 382 SpvBuiltInInvocationId = 8, 383 SpvBuiltInLayer = 9, 384 SpvBuiltInViewportIndex = 10, 385 SpvBuiltInTessLevelOuter = 11, 386 SpvBuiltInTessLevelInner = 12, 387 SpvBuiltInTessCoord = 13, 388 SpvBuiltInPatchVertices = 14, 389 SpvBuiltInFragCoord = 15, 390 SpvBuiltInPointCoord = 16, 391 SpvBuiltInFrontFacing = 17, 392 SpvBuiltInSampleId = 18, 393 SpvBuiltInSamplePosition = 19, 394 SpvBuiltInSampleMask = 20, 395 SpvBuiltInFragDepth = 22, 396 SpvBuiltInHelperInvocation = 23, 397 SpvBuiltInNumWorkgroups = 24, 398 SpvBuiltInWorkgroupSize = 25, 399 SpvBuiltInWorkgroupId = 26, 400 SpvBuiltInLocalInvocationId = 27, 401 SpvBuiltInGlobalInvocationId = 28, 402 SpvBuiltInLocalInvocationIndex = 29, 403 SpvBuiltInWorkDim = 30, 404 SpvBuiltInGlobalSize = 31, 405 SpvBuiltInEnqueuedWorkgroupSize = 32, 406 SpvBuiltInGlobalOffset = 33, 407 SpvBuiltInGlobalLinearId = 34, 408 SpvBuiltInSubgroupSize = 36, 409 SpvBuiltInSubgroupMaxSize = 37, 410 SpvBuiltInNumSubgroups = 38, 411 SpvBuiltInNumEnqueuedSubgroups = 39, 412 SpvBuiltInSubgroupId = 40, 413 SpvBuiltInSubgroupLocalInvocationId = 41, 414 SpvBuiltInVertexIndex = 42, 415 SpvBuiltInInstanceIndex = 43, 416 } SpvBuiltIn; 417 418 typedef enum SpvSelectionControlShift_ { 419 SpvSelectionControlFlattenShift = 0, 420 SpvSelectionControlDontFlattenShift = 1, 421 } SpvSelectionControlShift; 422 423 typedef enum SpvSelectionControlMask_ { 424 SpvSelectionControlMaskNone = 0, 425 SpvSelectionControlFlattenMask = 0x00000001, 426 SpvSelectionControlDontFlattenMask = 0x00000002, 427 } SpvSelectionControlMask; 428 429 typedef enum SpvLoopControlShift_ { 430 SpvLoopControlUnrollShift = 0, 431 SpvLoopControlDontUnrollShift = 1, 432 } SpvLoopControlShift; 433 434 typedef enum SpvLoopControlMask_ { 435 SpvLoopControlMaskNone = 0, 436 SpvLoopControlUnrollMask = 0x00000001, 437 SpvLoopControlDontUnrollMask = 0x00000002, 438 } SpvLoopControlMask; 439 440 typedef enum SpvFunctionControlShift_ { 441 SpvFunctionControlInlineShift = 0, 442 SpvFunctionControlDontInlineShift = 1, 443 SpvFunctionControlPureShift = 2, 444 SpvFunctionControlConstShift = 3, 445 } SpvFunctionControlShift; 446 447 typedef enum SpvFunctionControlMask_ { 448 SpvFunctionControlMaskNone = 0, 449 SpvFunctionControlInlineMask = 0x00000001, 450 SpvFunctionControlDontInlineMask = 0x00000002, 451 SpvFunctionControlPureMask = 0x00000004, 452 SpvFunctionControlConstMask = 0x00000008, 453 } SpvFunctionControlMask; 454 455 typedef enum SpvMemorySemanticsShift_ { 456 SpvMemorySemanticsAcquireShift = 1, 457 SpvMemorySemanticsReleaseShift = 2, 458 SpvMemorySemanticsAcquireReleaseShift = 3, 459 SpvMemorySemanticsSequentiallyConsistentShift = 4, 460 SpvMemorySemanticsUniformMemoryShift = 6, 461 SpvMemorySemanticsSubgroupMemoryShift = 7, 462 SpvMemorySemanticsWorkgroupMemoryShift = 8, 463 SpvMemorySemanticsCrossWorkgroupMemoryShift = 9, 464 SpvMemorySemanticsAtomicCounterMemoryShift = 10, 465 SpvMemorySemanticsImageMemoryShift = 11, 466 } SpvMemorySemanticsShift; 467 468 typedef enum SpvMemorySemanticsMask_ { 469 SpvMemorySemanticsMaskNone = 0, 470 SpvMemorySemanticsAcquireMask = 0x00000002, 471 SpvMemorySemanticsReleaseMask = 0x00000004, 472 SpvMemorySemanticsAcquireReleaseMask = 0x00000008, 473 SpvMemorySemanticsSequentiallyConsistentMask = 0x00000010, 474 SpvMemorySemanticsUniformMemoryMask = 0x00000040, 475 SpvMemorySemanticsSubgroupMemoryMask = 0x00000080, 476 SpvMemorySemanticsWorkgroupMemoryMask = 0x00000100, 477 SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, 478 SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400, 479 SpvMemorySemanticsImageMemoryMask = 0x00000800, 480 } SpvMemorySemanticsMask; 481 482 typedef enum SpvMemoryAccessShift_ { 483 SpvMemoryAccessVolatileShift = 0, 484 SpvMemoryAccessAlignedShift = 1, 485 SpvMemoryAccessNontemporalShift = 2, 486 } SpvMemoryAccessShift; 487 488 typedef enum SpvMemoryAccessMask_ { 489 SpvMemoryAccessMaskNone = 0, 490 SpvMemoryAccessVolatileMask = 0x00000001, 491 SpvMemoryAccessAlignedMask = 0x00000002, 492 SpvMemoryAccessNontemporalMask = 0x00000004, 493 } SpvMemoryAccessMask; 494 495 typedef enum SpvScope_ { 496 SpvScopeCrossDevice = 0, 497 SpvScopeDevice = 1, 498 SpvScopeWorkgroup = 2, 499 SpvScopeSubgroup = 3, 500 SpvScopeInvocation = 4, 501 } SpvScope; 502 503 typedef enum SpvGroupOperation_ { 504 SpvGroupOperationReduce = 0, 505 SpvGroupOperationInclusiveScan = 1, 506 SpvGroupOperationExclusiveScan = 2, 507 } SpvGroupOperation; 508 509 typedef enum SpvKernelEnqueueFlags_ { 510 SpvKernelEnqueueFlagsNoWait = 0, 511 SpvKernelEnqueueFlagsWaitKernel = 1, 512 SpvKernelEnqueueFlagsWaitWorkGroup = 2, 513 } SpvKernelEnqueueFlags; 514 515 typedef enum SpvKernelProfilingInfoShift_ { 516 SpvKernelProfilingInfoCmdExecTimeShift = 0, 517 } SpvKernelProfilingInfoShift; 518 519 typedef enum SpvKernelProfilingInfoMask_ { 520 SpvKernelProfilingInfoMaskNone = 0, 521 SpvKernelProfilingInfoCmdExecTimeMask = 0x00000001, 522 } SpvKernelProfilingInfoMask; 523 524 typedef enum SpvCapability_ { 525 SpvCapabilityMatrix = 0, 526 SpvCapabilityShader = 1, 527 SpvCapabilityGeometry = 2, 528 SpvCapabilityTessellation = 3, 529 SpvCapabilityAddresses = 4, 530 SpvCapabilityLinkage = 5, 531 SpvCapabilityKernel = 6, 532 SpvCapabilityVector16 = 7, 533 SpvCapabilityFloat16Buffer = 8, 534 SpvCapabilityFloat16 = 9, 535 SpvCapabilityFloat64 = 10, 536 SpvCapabilityInt64 = 11, 537 SpvCapabilityInt64Atomics = 12, 538 SpvCapabilityImageBasic = 13, 539 SpvCapabilityImageReadWrite = 14, 540 SpvCapabilityImageMipmap = 15, 541 SpvCapabilityPipes = 17, 542 SpvCapabilityGroups = 18, 543 SpvCapabilityDeviceEnqueue = 19, 544 SpvCapabilityLiteralSampler = 20, 545 SpvCapabilityAtomicStorage = 21, 546 SpvCapabilityInt16 = 22, 547 SpvCapabilityTessellationPointSize = 23, 548 SpvCapabilityGeometryPointSize = 24, 549 SpvCapabilityImageGatherExtended = 25, 550 SpvCapabilityStorageImageMultisample = 27, 551 SpvCapabilityUniformBufferArrayDynamicIndexing = 28, 552 SpvCapabilitySampledImageArrayDynamicIndexing = 29, 553 SpvCapabilityStorageBufferArrayDynamicIndexing = 30, 554 SpvCapabilityStorageImageArrayDynamicIndexing = 31, 555 SpvCapabilityClipDistance = 32, 556 SpvCapabilityCullDistance = 33, 557 SpvCapabilityImageCubeArray = 34, 558 SpvCapabilitySampleRateShading = 35, 559 SpvCapabilityImageRect = 36, 560 SpvCapabilitySampledRect = 37, 561 SpvCapabilityGenericPointer = 38, 562 SpvCapabilityInt8 = 39, 563 SpvCapabilityInputAttachment = 40, 564 SpvCapabilitySparseResidency = 41, 565 SpvCapabilityMinLod = 42, 566 SpvCapabilitySampled1D = 43, 567 SpvCapabilityImage1D = 44, 568 SpvCapabilitySampledCubeArray = 45, 569 SpvCapabilitySampledBuffer = 46, 570 SpvCapabilityImageBuffer = 47, 571 SpvCapabilityImageMSArray = 48, 572 SpvCapabilityStorageImageExtendedFormats = 49, 573 SpvCapabilityImageQuery = 50, 574 SpvCapabilityDerivativeControl = 51, 575 SpvCapabilityInterpolationFunction = 52, 576 SpvCapabilityTransformFeedback = 53, 577 SpvCapabilityGeometryStreams = 54, 578 SpvCapabilityStorageImageReadWithoutFormat = 55, 579 SpvCapabilityStorageImageWriteWithoutFormat = 56, 580 SpvCapabilityMultiViewport = 57, 581 #ifdef SKSL_EXT 582 SpvCapabilityShaderNonUniform = 5301, 583 SpvCapabilityRuntimeDescriptorArray = 5302, 584 #endif 585 } SpvCapability; 586 587 typedef enum SpvOp_ { 588 SpvOpNop = 0, 589 SpvOpUndef = 1, 590 SpvOpSourceContinued = 2, 591 SpvOpSource = 3, 592 SpvOpSourceExtension = 4, 593 SpvOpName = 5, 594 SpvOpMemberName = 6, 595 SpvOpString = 7, 596 SpvOpLine = 8, 597 SpvOpExtension = 10, 598 SpvOpExtInstImport = 11, 599 SpvOpExtInst = 12, 600 SpvOpMemoryModel = 14, 601 SpvOpEntryPoint = 15, 602 SpvOpExecutionMode = 16, 603 SpvOpCapability = 17, 604 SpvOpTypeVoid = 19, 605 SpvOpTypeBool = 20, 606 SpvOpTypeInt = 21, 607 SpvOpTypeFloat = 22, 608 SpvOpTypeVector = 23, 609 SpvOpTypeMatrix = 24, 610 SpvOpTypeImage = 25, 611 SpvOpTypeSampler = 26, 612 SpvOpTypeSampledImage = 27, 613 SpvOpTypeArray = 28, 614 SpvOpTypeRuntimeArray = 29, 615 SpvOpTypeStruct = 30, 616 SpvOpTypeOpaque = 31, 617 SpvOpTypePointer = 32, 618 SpvOpTypeFunction = 33, 619 SpvOpTypeEvent = 34, 620 SpvOpTypeDeviceEvent = 35, 621 SpvOpTypeReserveId = 36, 622 SpvOpTypeQueue = 37, 623 SpvOpTypePipe = 38, 624 SpvOpTypeForwardPointer = 39, 625 SpvOpConstantTrue = 41, 626 SpvOpConstantFalse = 42, 627 SpvOpConstant = 43, 628 SpvOpConstantComposite = 44, 629 SpvOpConstantSampler = 45, 630 SpvOpConstantNull = 46, 631 SpvOpSpecConstantTrue = 48, 632 SpvOpSpecConstantFalse = 49, 633 SpvOpSpecConstant = 50, 634 SpvOpSpecConstantComposite = 51, 635 SpvOpSpecConstantOp = 52, 636 SpvOpFunction = 54, 637 SpvOpFunctionParameter = 55, 638 SpvOpFunctionEnd = 56, 639 SpvOpFunctionCall = 57, 640 SpvOpVariable = 59, 641 SpvOpImageTexelPointer = 60, 642 SpvOpLoad = 61, 643 SpvOpStore = 62, 644 SpvOpCopyMemory = 63, 645 SpvOpCopyMemorySized = 64, 646 SpvOpAccessChain = 65, 647 SpvOpInBoundsAccessChain = 66, 648 SpvOpPtrAccessChain = 67, 649 SpvOpArrayLength = 68, 650 SpvOpGenericPtrMemSemantics = 69, 651 SpvOpInBoundsPtrAccessChain = 70, 652 SpvOpDecorate = 71, 653 SpvOpMemberDecorate = 72, 654 SpvOpDecorationGroup = 73, 655 SpvOpGroupDecorate = 74, 656 SpvOpGroupMemberDecorate = 75, 657 SpvOpVectorExtractDynamic = 77, 658 SpvOpVectorInsertDynamic = 78, 659 SpvOpVectorShuffle = 79, 660 SpvOpCompositeConstruct = 80, 661 SpvOpCompositeExtract = 81, 662 SpvOpCompositeInsert = 82, 663 SpvOpCopyObject = 83, 664 SpvOpTranspose = 84, 665 SpvOpSampledImage = 86, 666 SpvOpImageSampleImplicitLod = 87, 667 SpvOpImageSampleExplicitLod = 88, 668 SpvOpImageSampleDrefImplicitLod = 89, 669 SpvOpImageSampleDrefExplicitLod = 90, 670 SpvOpImageSampleProjImplicitLod = 91, 671 SpvOpImageSampleProjExplicitLod = 92, 672 SpvOpImageSampleProjDrefImplicitLod = 93, 673 SpvOpImageSampleProjDrefExplicitLod = 94, 674 SpvOpImageFetch = 95, 675 SpvOpImageGather = 96, 676 SpvOpImageDrefGather = 97, 677 SpvOpImageRead = 98, 678 SpvOpImageWrite = 99, 679 SpvOpImage = 100, 680 SpvOpImageQueryFormat = 101, 681 SpvOpImageQueryOrder = 102, 682 SpvOpImageQuerySizeLod = 103, 683 SpvOpImageQuerySize = 104, 684 SpvOpImageQueryLod = 105, 685 SpvOpImageQueryLevels = 106, 686 SpvOpImageQuerySamples = 107, 687 SpvOpConvertFToU = 109, 688 SpvOpConvertFToS = 110, 689 SpvOpConvertSToF = 111, 690 SpvOpConvertUToF = 112, 691 SpvOpUConvert = 113, 692 SpvOpSConvert = 114, 693 SpvOpFConvert = 115, 694 SpvOpQuantizeToF16 = 116, 695 SpvOpConvertPtrToU = 117, 696 SpvOpSatConvertSToU = 118, 697 SpvOpSatConvertUToS = 119, 698 SpvOpConvertUToPtr = 120, 699 SpvOpPtrCastToGeneric = 121, 700 SpvOpGenericCastToPtr = 122, 701 SpvOpGenericCastToPtrExplicit = 123, 702 SpvOpBitcast = 124, 703 SpvOpSNegate = 126, 704 SpvOpFNegate = 127, 705 SpvOpIAdd = 128, 706 SpvOpFAdd = 129, 707 SpvOpISub = 130, 708 SpvOpFSub = 131, 709 SpvOpIMul = 132, 710 SpvOpFMul = 133, 711 SpvOpUDiv = 134, 712 SpvOpSDiv = 135, 713 SpvOpFDiv = 136, 714 SpvOpUMod = 137, 715 SpvOpSRem = 138, 716 SpvOpSMod = 139, 717 SpvOpFRem = 140, 718 SpvOpFMod = 141, 719 SpvOpVectorTimesScalar = 142, 720 SpvOpMatrixTimesScalar = 143, 721 SpvOpVectorTimesMatrix = 144, 722 SpvOpMatrixTimesVector = 145, 723 SpvOpMatrixTimesMatrix = 146, 724 SpvOpOuterProduct = 147, 725 SpvOpDot = 148, 726 SpvOpIAddCarry = 149, 727 SpvOpISubBorrow = 150, 728 SpvOpUMulExtended = 151, 729 SpvOpSMulExtended = 152, 730 SpvOpAny = 154, 731 SpvOpAll = 155, 732 SpvOpIsNan = 156, 733 SpvOpIsInf = 157, 734 SpvOpIsFinite = 158, 735 SpvOpIsNormal = 159, 736 SpvOpSignBitSet = 160, 737 SpvOpLessOrGreater = 161, 738 SpvOpOrdered = 162, 739 SpvOpUnordered = 163, 740 SpvOpLogicalEqual = 164, 741 SpvOpLogicalNotEqual = 165, 742 SpvOpLogicalOr = 166, 743 SpvOpLogicalAnd = 167, 744 SpvOpLogicalNot = 168, 745 SpvOpSelect = 169, 746 SpvOpIEqual = 170, 747 SpvOpINotEqual = 171, 748 SpvOpUGreaterThan = 172, 749 SpvOpSGreaterThan = 173, 750 SpvOpUGreaterThanEqual = 174, 751 SpvOpSGreaterThanEqual = 175, 752 SpvOpULessThan = 176, 753 SpvOpSLessThan = 177, 754 SpvOpULessThanEqual = 178, 755 SpvOpSLessThanEqual = 179, 756 SpvOpFOrdEqual = 180, 757 SpvOpFUnordEqual = 181, 758 SpvOpFOrdNotEqual = 182, 759 SpvOpFUnordNotEqual = 183, 760 SpvOpFOrdLessThan = 184, 761 SpvOpFUnordLessThan = 185, 762 SpvOpFOrdGreaterThan = 186, 763 SpvOpFUnordGreaterThan = 187, 764 SpvOpFOrdLessThanEqual = 188, 765 SpvOpFUnordLessThanEqual = 189, 766 SpvOpFOrdGreaterThanEqual = 190, 767 SpvOpFUnordGreaterThanEqual = 191, 768 SpvOpShiftRightLogical = 194, 769 SpvOpShiftRightArithmetic = 195, 770 SpvOpShiftLeftLogical = 196, 771 SpvOpBitwiseOr = 197, 772 SpvOpBitwiseXor = 198, 773 SpvOpBitwiseAnd = 199, 774 SpvOpNot = 200, 775 SpvOpBitFieldInsert = 201, 776 SpvOpBitFieldSExtract = 202, 777 SpvOpBitFieldUExtract = 203, 778 SpvOpBitReverse = 204, 779 SpvOpBitCount = 205, 780 SpvOpDPdx = 207, 781 SpvOpDPdy = 208, 782 SpvOpFwidth = 209, 783 SpvOpDPdxFine = 210, 784 SpvOpDPdyFine = 211, 785 SpvOpFwidthFine = 212, 786 SpvOpDPdxCoarse = 213, 787 SpvOpDPdyCoarse = 214, 788 SpvOpFwidthCoarse = 215, 789 SpvOpEmitVertex = 218, 790 SpvOpEndPrimitive = 219, 791 SpvOpEmitStreamVertex = 220, 792 SpvOpEndStreamPrimitive = 221, 793 SpvOpControlBarrier = 224, 794 SpvOpMemoryBarrier = 225, 795 SpvOpAtomicLoad = 227, 796 SpvOpAtomicStore = 228, 797 SpvOpAtomicExchange = 229, 798 SpvOpAtomicCompareExchange = 230, 799 SpvOpAtomicCompareExchangeWeak = 231, 800 SpvOpAtomicIIncrement = 232, 801 SpvOpAtomicIDecrement = 233, 802 SpvOpAtomicIAdd = 234, 803 SpvOpAtomicISub = 235, 804 SpvOpAtomicSMin = 236, 805 SpvOpAtomicUMin = 237, 806 SpvOpAtomicSMax = 238, 807 SpvOpAtomicUMax = 239, 808 SpvOpAtomicAnd = 240, 809 SpvOpAtomicOr = 241, 810 SpvOpAtomicXor = 242, 811 SpvOpPhi = 245, 812 SpvOpLoopMerge = 246, 813 SpvOpSelectionMerge = 247, 814 SpvOpLabel = 248, 815 SpvOpBranch = 249, 816 SpvOpBranchConditional = 250, 817 SpvOpSwitch = 251, 818 SpvOpKill = 252, 819 SpvOpReturn = 253, 820 SpvOpReturnValue = 254, 821 SpvOpUnreachable = 255, 822 SpvOpLifetimeStart = 256, 823 SpvOpLifetimeStop = 257, 824 SpvOpGroupAsyncCopy = 259, 825 SpvOpGroupWaitEvents = 260, 826 SpvOpGroupAll = 261, 827 SpvOpGroupAny = 262, 828 SpvOpGroupBroadcast = 263, 829 SpvOpGroupIAdd = 264, 830 SpvOpGroupFAdd = 265, 831 SpvOpGroupFMin = 266, 832 SpvOpGroupUMin = 267, 833 SpvOpGroupSMin = 268, 834 SpvOpGroupFMax = 269, 835 SpvOpGroupUMax = 270, 836 SpvOpGroupSMax = 271, 837 SpvOpReadPipe = 274, 838 SpvOpWritePipe = 275, 839 SpvOpReservedReadPipe = 276, 840 SpvOpReservedWritePipe = 277, 841 SpvOpReserveReadPipePackets = 278, 842 SpvOpReserveWritePipePackets = 279, 843 SpvOpCommitReadPipe = 280, 844 SpvOpCommitWritePipe = 281, 845 SpvOpIsValidReserveId = 282, 846 SpvOpGetNumPipePackets = 283, 847 SpvOpGetMaxPipePackets = 284, 848 SpvOpGroupReserveReadPipePackets = 285, 849 SpvOpGroupReserveWritePipePackets = 286, 850 SpvOpGroupCommitReadPipe = 287, 851 SpvOpGroupCommitWritePipe = 288, 852 SpvOpEnqueueMarker = 291, 853 SpvOpEnqueueKernel = 292, 854 SpvOpGetKernelNDrangeSubGroupCount = 293, 855 SpvOpGetKernelNDrangeMaxSubGroupSize = 294, 856 SpvOpGetKernelWorkGroupSize = 295, 857 SpvOpGetKernelPreferredWorkGroupSizeMultiple = 296, 858 SpvOpRetainEvent = 297, 859 SpvOpReleaseEvent = 298, 860 SpvOpCreateUserEvent = 299, 861 SpvOpIsValidEvent = 300, 862 SpvOpSetUserEventStatus = 301, 863 SpvOpCaptureEventProfilingInfo = 302, 864 SpvOpGetDefaultQueue = 303, 865 SpvOpBuildNDRange = 304, 866 SpvOpImageSparseSampleImplicitLod = 305, 867 SpvOpImageSparseSampleExplicitLod = 306, 868 SpvOpImageSparseSampleDrefImplicitLod = 307, 869 SpvOpImageSparseSampleDrefExplicitLod = 308, 870 SpvOpImageSparseSampleProjImplicitLod = 309, 871 SpvOpImageSparseSampleProjExplicitLod = 310, 872 SpvOpImageSparseSampleProjDrefImplicitLod = 311, 873 SpvOpImageSparseSampleProjDrefExplicitLod = 312, 874 SpvOpImageSparseFetch = 313, 875 SpvOpImageSparseGather = 314, 876 SpvOpImageSparseDrefGather = 315, 877 SpvOpImageSparseTexelsResident = 316, 878 SpvOpNoLine = 317, 879 SpvOpAtomicFlagTestAndSet = 318, 880 SpvOpAtomicFlagClear = 319, 881 SpvOpImageSparseRead = 320, 882 #ifdef SKSL_EXT 883 SpvOpModuleProcessed = 330, 884 #endif 885 } SpvOp; 886 887 #endif // #ifndef spirv_H 888