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