1 /* 2 ** Copyright (c) 2014-2017 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 11 55 56 static const unsigned int SpvMagicNumber = 0x07230203; 57 static const unsigned int SpvVersion = 0x00010000; 58 static const unsigned int SpvRevision = 11; 59 static const unsigned int SpvOpCodeMask = 0xffff; 60 static const unsigned int SpvWordCountShift = 16; 61 62 typedef enum SpvSourceLanguage_ { 63 SpvSourceLanguageUnknown = 0, 64 SpvSourceLanguageESSL = 1, 65 SpvSourceLanguageGLSL = 2, 66 SpvSourceLanguageOpenCL_C = 3, 67 SpvSourceLanguageOpenCL_CPP = 4, 68 SpvSourceLanguageHLSL = 5, 69 SpvSourceLanguageMax = 0x7fffffff, 70 } SpvSourceLanguage; 71 72 typedef enum SpvExecutionModel_ { 73 SpvExecutionModelVertex = 0, 74 SpvExecutionModelTessellationControl = 1, 75 SpvExecutionModelTessellationEvaluation = 2, 76 SpvExecutionModelGeometry = 3, 77 SpvExecutionModelFragment = 4, 78 SpvExecutionModelGLCompute = 5, 79 SpvExecutionModelKernel = 6, 80 SpvExecutionModelMax = 0x7fffffff, 81 } SpvExecutionModel; 82 83 typedef enum SpvAddressingModel_ { 84 SpvAddressingModelLogical = 0, 85 SpvAddressingModelPhysical32 = 1, 86 SpvAddressingModelPhysical64 = 2, 87 SpvAddressingModelMax = 0x7fffffff, 88 } SpvAddressingModel; 89 90 typedef enum SpvMemoryModel_ { 91 SpvMemoryModelSimple = 0, 92 SpvMemoryModelGLSL450 = 1, 93 SpvMemoryModelOpenCL = 2, 94 SpvMemoryModelMax = 0x7fffffff, 95 } SpvMemoryModel; 96 97 typedef enum SpvExecutionMode_ { 98 SpvExecutionModeInvocations = 0, 99 SpvExecutionModeSpacingEqual = 1, 100 SpvExecutionModeSpacingFractionalEven = 2, 101 SpvExecutionModeSpacingFractionalOdd = 3, 102 SpvExecutionModeVertexOrderCw = 4, 103 SpvExecutionModeVertexOrderCcw = 5, 104 SpvExecutionModePixelCenterInteger = 6, 105 SpvExecutionModeOriginUpperLeft = 7, 106 SpvExecutionModeOriginLowerLeft = 8, 107 SpvExecutionModeEarlyFragmentTests = 9, 108 SpvExecutionModePointMode = 10, 109 SpvExecutionModeXfb = 11, 110 SpvExecutionModeDepthReplacing = 12, 111 SpvExecutionModeDepthGreater = 14, 112 SpvExecutionModeDepthLess = 15, 113 SpvExecutionModeDepthUnchanged = 16, 114 SpvExecutionModeLocalSize = 17, 115 SpvExecutionModeLocalSizeHint = 18, 116 SpvExecutionModeInputPoints = 19, 117 SpvExecutionModeInputLines = 20, 118 SpvExecutionModeInputLinesAdjacency = 21, 119 SpvExecutionModeTriangles = 22, 120 SpvExecutionModeInputTrianglesAdjacency = 23, 121 SpvExecutionModeQuads = 24, 122 SpvExecutionModeIsolines = 25, 123 SpvExecutionModeOutputVertices = 26, 124 SpvExecutionModeOutputPoints = 27, 125 SpvExecutionModeOutputLineStrip = 28, 126 SpvExecutionModeOutputTriangleStrip = 29, 127 SpvExecutionModeVecTypeHint = 30, 128 SpvExecutionModeContractionOff = 31, 129 SpvExecutionModePostDepthCoverage = 4446, 130 SpvExecutionModeMax = 0x7fffffff, 131 } SpvExecutionMode; 132 133 typedef enum SpvStorageClass_ { 134 SpvStorageClassUniformConstant = 0, 135 SpvStorageClassInput = 1, 136 SpvStorageClassUniform = 2, 137 SpvStorageClassOutput = 3, 138 SpvStorageClassWorkgroup = 4, 139 SpvStorageClassCrossWorkgroup = 5, 140 SpvStorageClassPrivate = 6, 141 SpvStorageClassFunction = 7, 142 SpvStorageClassGeneric = 8, 143 SpvStorageClassPushConstant = 9, 144 SpvStorageClassAtomicCounter = 10, 145 SpvStorageClassImage = 11, 146 SpvStorageClassStorageBuffer = 12, 147 SpvStorageClassMax = 0x7fffffff, 148 } SpvStorageClass; 149 150 typedef enum SpvDim_ { 151 SpvDim1D = 0, 152 SpvDim2D = 1, 153 SpvDim3D = 2, 154 SpvDimCube = 3, 155 SpvDimRect = 4, 156 SpvDimBuffer = 5, 157 SpvDimSubpassData = 6, 158 SpvDimMax = 0x7fffffff, 159 } SpvDim; 160 161 typedef enum SpvSamplerAddressingMode_ { 162 SpvSamplerAddressingModeNone = 0, 163 SpvSamplerAddressingModeClampToEdge = 1, 164 SpvSamplerAddressingModeClamp = 2, 165 SpvSamplerAddressingModeRepeat = 3, 166 SpvSamplerAddressingModeRepeatMirrored = 4, 167 SpvSamplerAddressingModeMax = 0x7fffffff, 168 } SpvSamplerAddressingMode; 169 170 typedef enum SpvSamplerFilterMode_ { 171 SpvSamplerFilterModeNearest = 0, 172 SpvSamplerFilterModeLinear = 1, 173 SpvSamplerFilterModeMax = 0x7fffffff, 174 } SpvSamplerFilterMode; 175 176 typedef enum SpvImageFormat_ { 177 SpvImageFormatUnknown = 0, 178 SpvImageFormatRgba32f = 1, 179 SpvImageFormatRgba16f = 2, 180 SpvImageFormatR32f = 3, 181 SpvImageFormatRgba8 = 4, 182 SpvImageFormatRgba8Snorm = 5, 183 SpvImageFormatRg32f = 6, 184 SpvImageFormatRg16f = 7, 185 SpvImageFormatR11fG11fB10f = 8, 186 SpvImageFormatR16f = 9, 187 SpvImageFormatRgba16 = 10, 188 SpvImageFormatRgb10A2 = 11, 189 SpvImageFormatRg16 = 12, 190 SpvImageFormatRg8 = 13, 191 SpvImageFormatR16 = 14, 192 SpvImageFormatR8 = 15, 193 SpvImageFormatRgba16Snorm = 16, 194 SpvImageFormatRg16Snorm = 17, 195 SpvImageFormatRg8Snorm = 18, 196 SpvImageFormatR16Snorm = 19, 197 SpvImageFormatR8Snorm = 20, 198 SpvImageFormatRgba32i = 21, 199 SpvImageFormatRgba16i = 22, 200 SpvImageFormatRgba8i = 23, 201 SpvImageFormatR32i = 24, 202 SpvImageFormatRg32i = 25, 203 SpvImageFormatRg16i = 26, 204 SpvImageFormatRg8i = 27, 205 SpvImageFormatR16i = 28, 206 SpvImageFormatR8i = 29, 207 SpvImageFormatRgba32ui = 30, 208 SpvImageFormatRgba16ui = 31, 209 SpvImageFormatRgba8ui = 32, 210 SpvImageFormatR32ui = 33, 211 SpvImageFormatRgb10a2ui = 34, 212 SpvImageFormatRg32ui = 35, 213 SpvImageFormatRg16ui = 36, 214 SpvImageFormatRg8ui = 37, 215 SpvImageFormatR16ui = 38, 216 SpvImageFormatR8ui = 39, 217 SpvImageFormatMax = 0x7fffffff, 218 } SpvImageFormat; 219 220 typedef enum SpvImageChannelOrder_ { 221 SpvImageChannelOrderR = 0, 222 SpvImageChannelOrderA = 1, 223 SpvImageChannelOrderRG = 2, 224 SpvImageChannelOrderRA = 3, 225 SpvImageChannelOrderRGB = 4, 226 SpvImageChannelOrderRGBA = 5, 227 SpvImageChannelOrderBGRA = 6, 228 SpvImageChannelOrderARGB = 7, 229 SpvImageChannelOrderIntensity = 8, 230 SpvImageChannelOrderLuminance = 9, 231 SpvImageChannelOrderRx = 10, 232 SpvImageChannelOrderRGx = 11, 233 SpvImageChannelOrderRGBx = 12, 234 SpvImageChannelOrderDepth = 13, 235 SpvImageChannelOrderDepthStencil = 14, 236 SpvImageChannelOrdersRGB = 15, 237 SpvImageChannelOrdersRGBx = 16, 238 SpvImageChannelOrdersRGBA = 17, 239 SpvImageChannelOrdersBGRA = 18, 240 SpvImageChannelOrderABGR = 19, 241 SpvImageChannelOrderMax = 0x7fffffff, 242 } SpvImageChannelOrder; 243 244 typedef enum SpvImageChannelDataType_ { 245 SpvImageChannelDataTypeSnormInt8 = 0, 246 SpvImageChannelDataTypeSnormInt16 = 1, 247 SpvImageChannelDataTypeUnormInt8 = 2, 248 SpvImageChannelDataTypeUnormInt16 = 3, 249 SpvImageChannelDataTypeUnormShort565 = 4, 250 SpvImageChannelDataTypeUnormShort555 = 5, 251 SpvImageChannelDataTypeUnormInt101010 = 6, 252 SpvImageChannelDataTypeSignedInt8 = 7, 253 SpvImageChannelDataTypeSignedInt16 = 8, 254 SpvImageChannelDataTypeSignedInt32 = 9, 255 SpvImageChannelDataTypeUnsignedInt8 = 10, 256 SpvImageChannelDataTypeUnsignedInt16 = 11, 257 SpvImageChannelDataTypeUnsignedInt32 = 12, 258 SpvImageChannelDataTypeHalfFloat = 13, 259 SpvImageChannelDataTypeFloat = 14, 260 SpvImageChannelDataTypeUnormInt24 = 15, 261 SpvImageChannelDataTypeUnormInt101010_2 = 16, 262 SpvImageChannelDataTypeMax = 0x7fffffff, 263 } SpvImageChannelDataType; 264 265 typedef enum SpvImageOperandsShift_ { 266 SpvImageOperandsBiasShift = 0, 267 SpvImageOperandsLodShift = 1, 268 SpvImageOperandsGradShift = 2, 269 SpvImageOperandsConstOffsetShift = 3, 270 SpvImageOperandsOffsetShift = 4, 271 SpvImageOperandsConstOffsetsShift = 5, 272 SpvImageOperandsSampleShift = 6, 273 SpvImageOperandsMinLodShift = 7, 274 SpvImageOperandsMax = 0x7fffffff, 275 } SpvImageOperandsShift; 276 277 typedef enum SpvImageOperandsMask_ { 278 SpvImageOperandsMaskNone = 0, 279 SpvImageOperandsBiasMask = 0x00000001, 280 SpvImageOperandsLodMask = 0x00000002, 281 SpvImageOperandsGradMask = 0x00000004, 282 SpvImageOperandsConstOffsetMask = 0x00000008, 283 SpvImageOperandsOffsetMask = 0x00000010, 284 SpvImageOperandsConstOffsetsMask = 0x00000020, 285 SpvImageOperandsSampleMask = 0x00000040, 286 SpvImageOperandsMinLodMask = 0x00000080, 287 } SpvImageOperandsMask; 288 289 typedef enum SpvFPFastMathModeShift_ { 290 SpvFPFastMathModeNotNaNShift = 0, 291 SpvFPFastMathModeNotInfShift = 1, 292 SpvFPFastMathModeNSZShift = 2, 293 SpvFPFastMathModeAllowRecipShift = 3, 294 SpvFPFastMathModeFastShift = 4, 295 SpvFPFastMathModeMax = 0x7fffffff, 296 } SpvFPFastMathModeShift; 297 298 typedef enum SpvFPFastMathModeMask_ { 299 SpvFPFastMathModeMaskNone = 0, 300 SpvFPFastMathModeNotNaNMask = 0x00000001, 301 SpvFPFastMathModeNotInfMask = 0x00000002, 302 SpvFPFastMathModeNSZMask = 0x00000004, 303 SpvFPFastMathModeAllowRecipMask = 0x00000008, 304 SpvFPFastMathModeFastMask = 0x00000010, 305 } SpvFPFastMathModeMask; 306 307 typedef enum SpvFPRoundingMode_ { 308 SpvFPRoundingModeRTE = 0, 309 SpvFPRoundingModeRTZ = 1, 310 SpvFPRoundingModeRTP = 2, 311 SpvFPRoundingModeRTN = 3, 312 SpvFPRoundingModeMax = 0x7fffffff, 313 } SpvFPRoundingMode; 314 315 typedef enum SpvLinkageType_ { 316 SpvLinkageTypeExport = 0, 317 SpvLinkageTypeImport = 1, 318 SpvLinkageTypeMax = 0x7fffffff, 319 } SpvLinkageType; 320 321 typedef enum SpvAccessQualifier_ { 322 SpvAccessQualifierReadOnly = 0, 323 SpvAccessQualifierWriteOnly = 1, 324 SpvAccessQualifierReadWrite = 2, 325 SpvAccessQualifierMax = 0x7fffffff, 326 } SpvAccessQualifier; 327 328 typedef enum SpvFunctionParameterAttribute_ { 329 SpvFunctionParameterAttributeZext = 0, 330 SpvFunctionParameterAttributeSext = 1, 331 SpvFunctionParameterAttributeByVal = 2, 332 SpvFunctionParameterAttributeSret = 3, 333 SpvFunctionParameterAttributeNoAlias = 4, 334 SpvFunctionParameterAttributeNoCapture = 5, 335 SpvFunctionParameterAttributeNoWrite = 6, 336 SpvFunctionParameterAttributeNoReadWrite = 7, 337 SpvFunctionParameterAttributeMax = 0x7fffffff, 338 } SpvFunctionParameterAttribute; 339 340 typedef enum SpvDecoration_ { 341 SpvDecorationRelaxedPrecision = 0, 342 SpvDecorationSpecId = 1, 343 SpvDecorationBlock = 2, 344 SpvDecorationBufferBlock = 3, 345 SpvDecorationRowMajor = 4, 346 SpvDecorationColMajor = 5, 347 SpvDecorationArrayStride = 6, 348 SpvDecorationMatrixStride = 7, 349 SpvDecorationGLSLShared = 8, 350 SpvDecorationGLSLPacked = 9, 351 SpvDecorationCPacked = 10, 352 SpvDecorationBuiltIn = 11, 353 SpvDecorationNoPerspective = 13, 354 SpvDecorationFlat = 14, 355 SpvDecorationPatch = 15, 356 SpvDecorationCentroid = 16, 357 SpvDecorationSample = 17, 358 SpvDecorationInvariant = 18, 359 SpvDecorationRestrict = 19, 360 SpvDecorationAliased = 20, 361 SpvDecorationVolatile = 21, 362 SpvDecorationConstant = 22, 363 SpvDecorationCoherent = 23, 364 SpvDecorationNonWritable = 24, 365 SpvDecorationNonReadable = 25, 366 SpvDecorationUniform = 26, 367 SpvDecorationSaturatedConversion = 28, 368 SpvDecorationStream = 29, 369 SpvDecorationLocation = 30, 370 SpvDecorationComponent = 31, 371 SpvDecorationIndex = 32, 372 SpvDecorationBinding = 33, 373 SpvDecorationDescriptorSet = 34, 374 SpvDecorationOffset = 35, 375 SpvDecorationXfbBuffer = 36, 376 SpvDecorationXfbStride = 37, 377 SpvDecorationFuncParamAttr = 38, 378 SpvDecorationFPRoundingMode = 39, 379 SpvDecorationFPFastMathMode = 40, 380 SpvDecorationLinkageAttributes = 41, 381 SpvDecorationNoContraction = 42, 382 SpvDecorationInputAttachmentIndex = 43, 383 SpvDecorationAlignment = 44, 384 SpvDecorationExplicitInterpAMD = 4999, 385 SpvDecorationOverrideCoverageNV = 5248, 386 SpvDecorationPassthroughNV = 5250, 387 SpvDecorationViewportRelativeNV = 5252, 388 SpvDecorationSecondaryViewportRelativeNV = 5256, 389 SpvDecorationMax = 0x7fffffff, 390 } SpvDecoration; 391 392 typedef enum SpvBuiltIn_ { 393 SpvBuiltInPosition = 0, 394 SpvBuiltInPointSize = 1, 395 SpvBuiltInClipDistance = 3, 396 SpvBuiltInCullDistance = 4, 397 SpvBuiltInVertexId = 5, 398 SpvBuiltInInstanceId = 6, 399 SpvBuiltInPrimitiveId = 7, 400 SpvBuiltInInvocationId = 8, 401 SpvBuiltInLayer = 9, 402 SpvBuiltInViewportIndex = 10, 403 SpvBuiltInTessLevelOuter = 11, 404 SpvBuiltInTessLevelInner = 12, 405 SpvBuiltInTessCoord = 13, 406 SpvBuiltInPatchVertices = 14, 407 SpvBuiltInFragCoord = 15, 408 SpvBuiltInPointCoord = 16, 409 SpvBuiltInFrontFacing = 17, 410 SpvBuiltInSampleId = 18, 411 SpvBuiltInSamplePosition = 19, 412 SpvBuiltInSampleMask = 20, 413 SpvBuiltInFragDepth = 22, 414 SpvBuiltInHelperInvocation = 23, 415 SpvBuiltInNumWorkgroups = 24, 416 SpvBuiltInWorkgroupSize = 25, 417 SpvBuiltInWorkgroupId = 26, 418 SpvBuiltInLocalInvocationId = 27, 419 SpvBuiltInGlobalInvocationId = 28, 420 SpvBuiltInLocalInvocationIndex = 29, 421 SpvBuiltInWorkDim = 30, 422 SpvBuiltInGlobalSize = 31, 423 SpvBuiltInEnqueuedWorkgroupSize = 32, 424 SpvBuiltInGlobalOffset = 33, 425 SpvBuiltInGlobalLinearId = 34, 426 SpvBuiltInSubgroupSize = 36, 427 SpvBuiltInSubgroupMaxSize = 37, 428 SpvBuiltInNumSubgroups = 38, 429 SpvBuiltInNumEnqueuedSubgroups = 39, 430 SpvBuiltInSubgroupId = 40, 431 SpvBuiltInSubgroupLocalInvocationId = 41, 432 SpvBuiltInVertexIndex = 42, 433 SpvBuiltInInstanceIndex = 43, 434 SpvBuiltInSubgroupEqMaskKHR = 4416, 435 SpvBuiltInSubgroupGeMaskKHR = 4417, 436 SpvBuiltInSubgroupGtMaskKHR = 4418, 437 SpvBuiltInSubgroupLeMaskKHR = 4419, 438 SpvBuiltInSubgroupLtMaskKHR = 4420, 439 SpvBuiltInBaseVertex = 4424, 440 SpvBuiltInBaseInstance = 4425, 441 SpvBuiltInDrawIndex = 4426, 442 SpvBuiltInDeviceIndex = 4438, 443 SpvBuiltInViewIndex = 4440, 444 SpvBuiltInBaryCoordNoPerspAMD = 4992, 445 SpvBuiltInBaryCoordNoPerspCentroidAMD = 4993, 446 SpvBuiltInBaryCoordNoPerspSampleAMD = 4994, 447 SpvBuiltInBaryCoordSmoothAMD = 4995, 448 SpvBuiltInBaryCoordSmoothCentroidAMD = 4996, 449 SpvBuiltInBaryCoordSmoothSampleAMD = 4997, 450 SpvBuiltInBaryCoordPullModelAMD = 4998, 451 SpvBuiltInViewportMaskNV = 5253, 452 SpvBuiltInSecondaryPositionNV = 5257, 453 SpvBuiltInSecondaryViewportMaskNV = 5258, 454 SpvBuiltInPositionPerViewNV = 5261, 455 SpvBuiltInViewportMaskPerViewNV = 5262, 456 SpvBuiltInMax = 0x7fffffff, 457 } SpvBuiltIn; 458 459 typedef enum SpvSelectionControlShift_ { 460 SpvSelectionControlFlattenShift = 0, 461 SpvSelectionControlDontFlattenShift = 1, 462 SpvSelectionControlMax = 0x7fffffff, 463 } SpvSelectionControlShift; 464 465 typedef enum SpvSelectionControlMask_ { 466 SpvSelectionControlMaskNone = 0, 467 SpvSelectionControlFlattenMask = 0x00000001, 468 SpvSelectionControlDontFlattenMask = 0x00000002, 469 } SpvSelectionControlMask; 470 471 typedef enum SpvLoopControlShift_ { 472 SpvLoopControlUnrollShift = 0, 473 SpvLoopControlDontUnrollShift = 1, 474 SpvLoopControlMax = 0x7fffffff, 475 } SpvLoopControlShift; 476 477 typedef enum SpvLoopControlMask_ { 478 SpvLoopControlMaskNone = 0, 479 SpvLoopControlUnrollMask = 0x00000001, 480 SpvLoopControlDontUnrollMask = 0x00000002, 481 } SpvLoopControlMask; 482 483 typedef enum SpvFunctionControlShift_ { 484 SpvFunctionControlInlineShift = 0, 485 SpvFunctionControlDontInlineShift = 1, 486 SpvFunctionControlPureShift = 2, 487 SpvFunctionControlConstShift = 3, 488 SpvFunctionControlMax = 0x7fffffff, 489 } SpvFunctionControlShift; 490 491 typedef enum SpvFunctionControlMask_ { 492 SpvFunctionControlMaskNone = 0, 493 SpvFunctionControlInlineMask = 0x00000001, 494 SpvFunctionControlDontInlineMask = 0x00000002, 495 SpvFunctionControlPureMask = 0x00000004, 496 SpvFunctionControlConstMask = 0x00000008, 497 } SpvFunctionControlMask; 498 499 typedef enum SpvMemorySemanticsShift_ { 500 SpvMemorySemanticsAcquireShift = 1, 501 SpvMemorySemanticsReleaseShift = 2, 502 SpvMemorySemanticsAcquireReleaseShift = 3, 503 SpvMemorySemanticsSequentiallyConsistentShift = 4, 504 SpvMemorySemanticsUniformMemoryShift = 6, 505 SpvMemorySemanticsSubgroupMemoryShift = 7, 506 SpvMemorySemanticsWorkgroupMemoryShift = 8, 507 SpvMemorySemanticsCrossWorkgroupMemoryShift = 9, 508 SpvMemorySemanticsAtomicCounterMemoryShift = 10, 509 SpvMemorySemanticsImageMemoryShift = 11, 510 SpvMemorySemanticsMax = 0x7fffffff, 511 } SpvMemorySemanticsShift; 512 513 typedef enum SpvMemorySemanticsMask_ { 514 SpvMemorySemanticsMaskNone = 0, 515 SpvMemorySemanticsAcquireMask = 0x00000002, 516 SpvMemorySemanticsReleaseMask = 0x00000004, 517 SpvMemorySemanticsAcquireReleaseMask = 0x00000008, 518 SpvMemorySemanticsSequentiallyConsistentMask = 0x00000010, 519 SpvMemorySemanticsUniformMemoryMask = 0x00000040, 520 SpvMemorySemanticsSubgroupMemoryMask = 0x00000080, 521 SpvMemorySemanticsWorkgroupMemoryMask = 0x00000100, 522 SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, 523 SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400, 524 SpvMemorySemanticsImageMemoryMask = 0x00000800, 525 } SpvMemorySemanticsMask; 526 527 typedef enum SpvMemoryAccessShift_ { 528 SpvMemoryAccessVolatileShift = 0, 529 SpvMemoryAccessAlignedShift = 1, 530 SpvMemoryAccessNontemporalShift = 2, 531 SpvMemoryAccessMax = 0x7fffffff, 532 } SpvMemoryAccessShift; 533 534 typedef enum SpvMemoryAccessMask_ { 535 SpvMemoryAccessMaskNone = 0, 536 SpvMemoryAccessVolatileMask = 0x00000001, 537 SpvMemoryAccessAlignedMask = 0x00000002, 538 SpvMemoryAccessNontemporalMask = 0x00000004, 539 } SpvMemoryAccessMask; 540 541 typedef enum SpvScope_ { 542 SpvScopeCrossDevice = 0, 543 SpvScopeDevice = 1, 544 SpvScopeWorkgroup = 2, 545 SpvScopeSubgroup = 3, 546 SpvScopeInvocation = 4, 547 SpvScopeMax = 0x7fffffff, 548 } SpvScope; 549 550 typedef enum SpvGroupOperation_ { 551 SpvGroupOperationReduce = 0, 552 SpvGroupOperationInclusiveScan = 1, 553 SpvGroupOperationExclusiveScan = 2, 554 SpvGroupOperationMax = 0x7fffffff, 555 } SpvGroupOperation; 556 557 typedef enum SpvKernelEnqueueFlags_ { 558 SpvKernelEnqueueFlagsNoWait = 0, 559 SpvKernelEnqueueFlagsWaitKernel = 1, 560 SpvKernelEnqueueFlagsWaitWorkGroup = 2, 561 SpvKernelEnqueueFlagsMax = 0x7fffffff, 562 } SpvKernelEnqueueFlags; 563 564 typedef enum SpvKernelProfilingInfoShift_ { 565 SpvKernelProfilingInfoCmdExecTimeShift = 0, 566 SpvKernelProfilingInfoMax = 0x7fffffff, 567 } SpvKernelProfilingInfoShift; 568 569 typedef enum SpvKernelProfilingInfoMask_ { 570 SpvKernelProfilingInfoMaskNone = 0, 571 SpvKernelProfilingInfoCmdExecTimeMask = 0x00000001, 572 } SpvKernelProfilingInfoMask; 573 574 typedef enum SpvCapability_ { 575 SpvCapabilityMatrix = 0, 576 SpvCapabilityShader = 1, 577 SpvCapabilityGeometry = 2, 578 SpvCapabilityTessellation = 3, 579 SpvCapabilityAddresses = 4, 580 SpvCapabilityLinkage = 5, 581 SpvCapabilityKernel = 6, 582 SpvCapabilityVector16 = 7, 583 SpvCapabilityFloat16Buffer = 8, 584 SpvCapabilityFloat16 = 9, 585 SpvCapabilityFloat64 = 10, 586 SpvCapabilityInt64 = 11, 587 SpvCapabilityInt64Atomics = 12, 588 SpvCapabilityImageBasic = 13, 589 SpvCapabilityImageReadWrite = 14, 590 SpvCapabilityImageMipmap = 15, 591 SpvCapabilityPipes = 17, 592 SpvCapabilityGroups = 18, 593 SpvCapabilityDeviceEnqueue = 19, 594 SpvCapabilityLiteralSampler = 20, 595 SpvCapabilityAtomicStorage = 21, 596 SpvCapabilityInt16 = 22, 597 SpvCapabilityTessellationPointSize = 23, 598 SpvCapabilityGeometryPointSize = 24, 599 SpvCapabilityImageGatherExtended = 25, 600 SpvCapabilityStorageImageMultisample = 27, 601 SpvCapabilityUniformBufferArrayDynamicIndexing = 28, 602 SpvCapabilitySampledImageArrayDynamicIndexing = 29, 603 SpvCapabilityStorageBufferArrayDynamicIndexing = 30, 604 SpvCapabilityStorageImageArrayDynamicIndexing = 31, 605 SpvCapabilityClipDistance = 32, 606 SpvCapabilityCullDistance = 33, 607 SpvCapabilityImageCubeArray = 34, 608 SpvCapabilitySampleRateShading = 35, 609 SpvCapabilityImageRect = 36, 610 SpvCapabilitySampledRect = 37, 611 SpvCapabilityGenericPointer = 38, 612 SpvCapabilityInt8 = 39, 613 SpvCapabilityInputAttachment = 40, 614 SpvCapabilitySparseResidency = 41, 615 SpvCapabilityMinLod = 42, 616 SpvCapabilitySampled1D = 43, 617 SpvCapabilityImage1D = 44, 618 SpvCapabilitySampledCubeArray = 45, 619 SpvCapabilitySampledBuffer = 46, 620 SpvCapabilityImageBuffer = 47, 621 SpvCapabilityImageMSArray = 48, 622 SpvCapabilityStorageImageExtendedFormats = 49, 623 SpvCapabilityImageQuery = 50, 624 SpvCapabilityDerivativeControl = 51, 625 SpvCapabilityInterpolationFunction = 52, 626 SpvCapabilityTransformFeedback = 53, 627 SpvCapabilityGeometryStreams = 54, 628 SpvCapabilityStorageImageReadWithoutFormat = 55, 629 SpvCapabilityStorageImageWriteWithoutFormat = 56, 630 SpvCapabilityMultiViewport = 57, 631 SpvCapabilitySubgroupBallotKHR = 4423, 632 SpvCapabilityDrawParameters = 4427, 633 SpvCapabilitySubgroupVoteKHR = 4431, 634 SpvCapabilityStorageBuffer16BitAccess = 4433, 635 SpvCapabilityStorageUniformBufferBlock16 = 4433, 636 SpvCapabilityStorageUniform16 = 4434, 637 SpvCapabilityUniformAndStorageBuffer16BitAccess = 4434, 638 SpvCapabilityStoragePushConstant16 = 4435, 639 SpvCapabilityStorageInputOutput16 = 4436, 640 SpvCapabilityDeviceGroup = 4437, 641 SpvCapabilityMultiView = 4439, 642 SpvCapabilityVariablePointersStorageBuffer = 4441, 643 SpvCapabilityVariablePointers = 4442, 644 SpvCapabilityAtomicStorageOps = 4445, 645 SpvCapabilitySampleMaskPostDepthCoverage = 4447, 646 SpvCapabilityImageGatherBiasLodAMD = 5009, 647 SpvCapabilitySampleMaskOverrideCoverageNV = 5249, 648 SpvCapabilityGeometryShaderPassthroughNV = 5251, 649 SpvCapabilityShaderViewportIndexLayerNV = 5254, 650 SpvCapabilityShaderViewportMaskNV = 5255, 651 SpvCapabilityShaderStereoViewNV = 5259, 652 SpvCapabilityPerViewAttributesNV = 5260, 653 SpvCapabilityMax = 0x7fffffff, 654 } SpvCapability; 655 656 typedef enum SpvOp_ { 657 SpvOpNop = 0, 658 SpvOpUndef = 1, 659 SpvOpSourceContinued = 2, 660 SpvOpSource = 3, 661 SpvOpSourceExtension = 4, 662 SpvOpName = 5, 663 SpvOpMemberName = 6, 664 SpvOpString = 7, 665 SpvOpLine = 8, 666 SpvOpExtension = 10, 667 SpvOpExtInstImport = 11, 668 SpvOpExtInst = 12, 669 SpvOpMemoryModel = 14, 670 SpvOpEntryPoint = 15, 671 SpvOpExecutionMode = 16, 672 SpvOpCapability = 17, 673 SpvOpTypeVoid = 19, 674 SpvOpTypeBool = 20, 675 SpvOpTypeInt = 21, 676 SpvOpTypeFloat = 22, 677 SpvOpTypeVector = 23, 678 SpvOpTypeMatrix = 24, 679 SpvOpTypeImage = 25, 680 SpvOpTypeSampler = 26, 681 SpvOpTypeSampledImage = 27, 682 SpvOpTypeArray = 28, 683 SpvOpTypeRuntimeArray = 29, 684 SpvOpTypeStruct = 30, 685 SpvOpTypeOpaque = 31, 686 SpvOpTypePointer = 32, 687 SpvOpTypeFunction = 33, 688 SpvOpTypeEvent = 34, 689 SpvOpTypeDeviceEvent = 35, 690 SpvOpTypeReserveId = 36, 691 SpvOpTypeQueue = 37, 692 SpvOpTypePipe = 38, 693 SpvOpTypeForwardPointer = 39, 694 SpvOpConstantTrue = 41, 695 SpvOpConstantFalse = 42, 696 SpvOpConstant = 43, 697 SpvOpConstantComposite = 44, 698 SpvOpConstantSampler = 45, 699 SpvOpConstantNull = 46, 700 SpvOpSpecConstantTrue = 48, 701 SpvOpSpecConstantFalse = 49, 702 SpvOpSpecConstant = 50, 703 SpvOpSpecConstantComposite = 51, 704 SpvOpSpecConstantOp = 52, 705 SpvOpFunction = 54, 706 SpvOpFunctionParameter = 55, 707 SpvOpFunctionEnd = 56, 708 SpvOpFunctionCall = 57, 709 SpvOpVariable = 59, 710 SpvOpImageTexelPointer = 60, 711 SpvOpLoad = 61, 712 SpvOpStore = 62, 713 SpvOpCopyMemory = 63, 714 SpvOpCopyMemorySized = 64, 715 SpvOpAccessChain = 65, 716 SpvOpInBoundsAccessChain = 66, 717 SpvOpPtrAccessChain = 67, 718 SpvOpArrayLength = 68, 719 SpvOpGenericPtrMemSemantics = 69, 720 SpvOpInBoundsPtrAccessChain = 70, 721 SpvOpDecorate = 71, 722 SpvOpMemberDecorate = 72, 723 SpvOpDecorationGroup = 73, 724 SpvOpGroupDecorate = 74, 725 SpvOpGroupMemberDecorate = 75, 726 SpvOpVectorExtractDynamic = 77, 727 SpvOpVectorInsertDynamic = 78, 728 SpvOpVectorShuffle = 79, 729 SpvOpCompositeConstruct = 80, 730 SpvOpCompositeExtract = 81, 731 SpvOpCompositeInsert = 82, 732 SpvOpCopyObject = 83, 733 SpvOpTranspose = 84, 734 SpvOpSampledImage = 86, 735 SpvOpImageSampleImplicitLod = 87, 736 SpvOpImageSampleExplicitLod = 88, 737 SpvOpImageSampleDrefImplicitLod = 89, 738 SpvOpImageSampleDrefExplicitLod = 90, 739 SpvOpImageSampleProjImplicitLod = 91, 740 SpvOpImageSampleProjExplicitLod = 92, 741 SpvOpImageSampleProjDrefImplicitLod = 93, 742 SpvOpImageSampleProjDrefExplicitLod = 94, 743 SpvOpImageFetch = 95, 744 SpvOpImageGather = 96, 745 SpvOpImageDrefGather = 97, 746 SpvOpImageRead = 98, 747 SpvOpImageWrite = 99, 748 SpvOpImage = 100, 749 SpvOpImageQueryFormat = 101, 750 SpvOpImageQueryOrder = 102, 751 SpvOpImageQuerySizeLod = 103, 752 SpvOpImageQuerySize = 104, 753 SpvOpImageQueryLod = 105, 754 SpvOpImageQueryLevels = 106, 755 SpvOpImageQuerySamples = 107, 756 SpvOpConvertFToU = 109, 757 SpvOpConvertFToS = 110, 758 SpvOpConvertSToF = 111, 759 SpvOpConvertUToF = 112, 760 SpvOpUConvert = 113, 761 SpvOpSConvert = 114, 762 SpvOpFConvert = 115, 763 SpvOpQuantizeToF16 = 116, 764 SpvOpConvertPtrToU = 117, 765 SpvOpSatConvertSToU = 118, 766 SpvOpSatConvertUToS = 119, 767 SpvOpConvertUToPtr = 120, 768 SpvOpPtrCastToGeneric = 121, 769 SpvOpGenericCastToPtr = 122, 770 SpvOpGenericCastToPtrExplicit = 123, 771 SpvOpBitcast = 124, 772 SpvOpSNegate = 126, 773 SpvOpFNegate = 127, 774 SpvOpIAdd = 128, 775 SpvOpFAdd = 129, 776 SpvOpISub = 130, 777 SpvOpFSub = 131, 778 SpvOpIMul = 132, 779 SpvOpFMul = 133, 780 SpvOpUDiv = 134, 781 SpvOpSDiv = 135, 782 SpvOpFDiv = 136, 783 SpvOpUMod = 137, 784 SpvOpSRem = 138, 785 SpvOpSMod = 139, 786 SpvOpFRem = 140, 787 SpvOpFMod = 141, 788 SpvOpVectorTimesScalar = 142, 789 SpvOpMatrixTimesScalar = 143, 790 SpvOpVectorTimesMatrix = 144, 791 SpvOpMatrixTimesVector = 145, 792 SpvOpMatrixTimesMatrix = 146, 793 SpvOpOuterProduct = 147, 794 SpvOpDot = 148, 795 SpvOpIAddCarry = 149, 796 SpvOpISubBorrow = 150, 797 SpvOpUMulExtended = 151, 798 SpvOpSMulExtended = 152, 799 SpvOpAny = 154, 800 SpvOpAll = 155, 801 SpvOpIsNan = 156, 802 SpvOpIsInf = 157, 803 SpvOpIsFinite = 158, 804 SpvOpIsNormal = 159, 805 SpvOpSignBitSet = 160, 806 SpvOpLessOrGreater = 161, 807 SpvOpOrdered = 162, 808 SpvOpUnordered = 163, 809 SpvOpLogicalEqual = 164, 810 SpvOpLogicalNotEqual = 165, 811 SpvOpLogicalOr = 166, 812 SpvOpLogicalAnd = 167, 813 SpvOpLogicalNot = 168, 814 SpvOpSelect = 169, 815 SpvOpIEqual = 170, 816 SpvOpINotEqual = 171, 817 SpvOpUGreaterThan = 172, 818 SpvOpSGreaterThan = 173, 819 SpvOpUGreaterThanEqual = 174, 820 SpvOpSGreaterThanEqual = 175, 821 SpvOpULessThan = 176, 822 SpvOpSLessThan = 177, 823 SpvOpULessThanEqual = 178, 824 SpvOpSLessThanEqual = 179, 825 SpvOpFOrdEqual = 180, 826 SpvOpFUnordEqual = 181, 827 SpvOpFOrdNotEqual = 182, 828 SpvOpFUnordNotEqual = 183, 829 SpvOpFOrdLessThan = 184, 830 SpvOpFUnordLessThan = 185, 831 SpvOpFOrdGreaterThan = 186, 832 SpvOpFUnordGreaterThan = 187, 833 SpvOpFOrdLessThanEqual = 188, 834 SpvOpFUnordLessThanEqual = 189, 835 SpvOpFOrdGreaterThanEqual = 190, 836 SpvOpFUnordGreaterThanEqual = 191, 837 SpvOpShiftRightLogical = 194, 838 SpvOpShiftRightArithmetic = 195, 839 SpvOpShiftLeftLogical = 196, 840 SpvOpBitwiseOr = 197, 841 SpvOpBitwiseXor = 198, 842 SpvOpBitwiseAnd = 199, 843 SpvOpNot = 200, 844 SpvOpBitFieldInsert = 201, 845 SpvOpBitFieldSExtract = 202, 846 SpvOpBitFieldUExtract = 203, 847 SpvOpBitReverse = 204, 848 SpvOpBitCount = 205, 849 SpvOpDPdx = 207, 850 SpvOpDPdy = 208, 851 SpvOpFwidth = 209, 852 SpvOpDPdxFine = 210, 853 SpvOpDPdyFine = 211, 854 SpvOpFwidthFine = 212, 855 SpvOpDPdxCoarse = 213, 856 SpvOpDPdyCoarse = 214, 857 SpvOpFwidthCoarse = 215, 858 SpvOpEmitVertex = 218, 859 SpvOpEndPrimitive = 219, 860 SpvOpEmitStreamVertex = 220, 861 SpvOpEndStreamPrimitive = 221, 862 SpvOpControlBarrier = 224, 863 SpvOpMemoryBarrier = 225, 864 SpvOpAtomicLoad = 227, 865 SpvOpAtomicStore = 228, 866 SpvOpAtomicExchange = 229, 867 SpvOpAtomicCompareExchange = 230, 868 SpvOpAtomicCompareExchangeWeak = 231, 869 SpvOpAtomicIIncrement = 232, 870 SpvOpAtomicIDecrement = 233, 871 SpvOpAtomicIAdd = 234, 872 SpvOpAtomicISub = 235, 873 SpvOpAtomicSMin = 236, 874 SpvOpAtomicUMin = 237, 875 SpvOpAtomicSMax = 238, 876 SpvOpAtomicUMax = 239, 877 SpvOpAtomicAnd = 240, 878 SpvOpAtomicOr = 241, 879 SpvOpAtomicXor = 242, 880 SpvOpPhi = 245, 881 SpvOpLoopMerge = 246, 882 SpvOpSelectionMerge = 247, 883 SpvOpLabel = 248, 884 SpvOpBranch = 249, 885 SpvOpBranchConditional = 250, 886 SpvOpSwitch = 251, 887 SpvOpKill = 252, 888 SpvOpReturn = 253, 889 SpvOpReturnValue = 254, 890 SpvOpUnreachable = 255, 891 SpvOpLifetimeStart = 256, 892 SpvOpLifetimeStop = 257, 893 SpvOpGroupAsyncCopy = 259, 894 SpvOpGroupWaitEvents = 260, 895 SpvOpGroupAll = 261, 896 SpvOpGroupAny = 262, 897 SpvOpGroupBroadcast = 263, 898 SpvOpGroupIAdd = 264, 899 SpvOpGroupFAdd = 265, 900 SpvOpGroupFMin = 266, 901 SpvOpGroupUMin = 267, 902 SpvOpGroupSMin = 268, 903 SpvOpGroupFMax = 269, 904 SpvOpGroupUMax = 270, 905 SpvOpGroupSMax = 271, 906 SpvOpReadPipe = 274, 907 SpvOpWritePipe = 275, 908 SpvOpReservedReadPipe = 276, 909 SpvOpReservedWritePipe = 277, 910 SpvOpReserveReadPipePackets = 278, 911 SpvOpReserveWritePipePackets = 279, 912 SpvOpCommitReadPipe = 280, 913 SpvOpCommitWritePipe = 281, 914 SpvOpIsValidReserveId = 282, 915 SpvOpGetNumPipePackets = 283, 916 SpvOpGetMaxPipePackets = 284, 917 SpvOpGroupReserveReadPipePackets = 285, 918 SpvOpGroupReserveWritePipePackets = 286, 919 SpvOpGroupCommitReadPipe = 287, 920 SpvOpGroupCommitWritePipe = 288, 921 SpvOpEnqueueMarker = 291, 922 SpvOpEnqueueKernel = 292, 923 SpvOpGetKernelNDrangeSubGroupCount = 293, 924 SpvOpGetKernelNDrangeMaxSubGroupSize = 294, 925 SpvOpGetKernelWorkGroupSize = 295, 926 SpvOpGetKernelPreferredWorkGroupSizeMultiple = 296, 927 SpvOpRetainEvent = 297, 928 SpvOpReleaseEvent = 298, 929 SpvOpCreateUserEvent = 299, 930 SpvOpIsValidEvent = 300, 931 SpvOpSetUserEventStatus = 301, 932 SpvOpCaptureEventProfilingInfo = 302, 933 SpvOpGetDefaultQueue = 303, 934 SpvOpBuildNDRange = 304, 935 SpvOpImageSparseSampleImplicitLod = 305, 936 SpvOpImageSparseSampleExplicitLod = 306, 937 SpvOpImageSparseSampleDrefImplicitLod = 307, 938 SpvOpImageSparseSampleDrefExplicitLod = 308, 939 SpvOpImageSparseSampleProjImplicitLod = 309, 940 SpvOpImageSparseSampleProjExplicitLod = 310, 941 SpvOpImageSparseSampleProjDrefImplicitLod = 311, 942 SpvOpImageSparseSampleProjDrefExplicitLod = 312, 943 SpvOpImageSparseFetch = 313, 944 SpvOpImageSparseGather = 314, 945 SpvOpImageSparseDrefGather = 315, 946 SpvOpImageSparseTexelsResident = 316, 947 SpvOpNoLine = 317, 948 SpvOpAtomicFlagTestAndSet = 318, 949 SpvOpAtomicFlagClear = 319, 950 SpvOpImageSparseRead = 320, 951 SpvOpSubgroupBallotKHR = 4421, 952 SpvOpSubgroupFirstInvocationKHR = 4422, 953 SpvOpSubgroupAllKHR = 4428, 954 SpvOpSubgroupAnyKHR = 4429, 955 SpvOpSubgroupAllEqualKHR = 4430, 956 SpvOpSubgroupReadInvocationKHR = 4432, 957 SpvOpGroupIAddNonUniformAMD = 5000, 958 SpvOpGroupFAddNonUniformAMD = 5001, 959 SpvOpGroupFMinNonUniformAMD = 5002, 960 SpvOpGroupUMinNonUniformAMD = 5003, 961 SpvOpGroupSMinNonUniformAMD = 5004, 962 SpvOpGroupFMaxNonUniformAMD = 5005, 963 SpvOpGroupUMaxNonUniformAMD = 5006, 964 SpvOpGroupSMaxNonUniformAMD = 5007, 965 SpvOpMax = 0x7fffffff, 966 } SpvOp; 967 968 #endif // #ifndef spirv_H 969 970