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 SpvExecutionModeMax = 0x7fffffff,
136 typedef enum SpvStorageClass_ {
137 SpvStorageClassUniformConstant = 0,
138 SpvStorageClassInput = 1,
139 SpvStorageClassUniform = 2,
140 SpvStorageClassOutput = 3,
141 SpvStorageClassWorkgroup = 4,
142 SpvStorageClassCrossWorkgroup = 5,
143 SpvStorageClassPrivate = 6,
144 SpvStorageClassFunction = 7,
145 SpvStorageClassGeneric = 8,
146 SpvStorageClassPushConstant = 9,
147 SpvStorageClassAtomicCounter = 10,
148 SpvStorageClassImage = 11,
149 SpvStorageClassStorageBuffer = 12,
150 SpvStorageClassMax = 0x7fffffff,
153 typedef enum SpvDim_ {
160 SpvDimSubpassData = 6,
161 SpvDimMax = 0x7fffffff,
164 typedef enum SpvSamplerAddressingMode_ {
165 SpvSamplerAddressingModeNone = 0,
166 SpvSamplerAddressingModeClampToEdge = 1,
167 SpvSamplerAddressingModeClamp = 2,
168 SpvSamplerAddressingModeRepeat = 3,
169 SpvSamplerAddressingModeRepeatMirrored = 4,
170 SpvSamplerAddressingModeMax = 0x7fffffff,
171 } SpvSamplerAddressingMode;
173 typedef enum SpvSamplerFilterMode_ {
174 SpvSamplerFilterModeNearest = 0,
175 SpvSamplerFilterModeLinear = 1,
176 SpvSamplerFilterModeMax = 0x7fffffff,
177 } SpvSamplerFilterMode;
179 typedef enum SpvImageFormat_ {
180 SpvImageFormatUnknown = 0,
181 SpvImageFormatRgba32f = 1,
182 SpvImageFormatRgba16f = 2,
183 SpvImageFormatR32f = 3,
184 SpvImageFormatRgba8 = 4,
185 SpvImageFormatRgba8Snorm = 5,
186 SpvImageFormatRg32f = 6,
187 SpvImageFormatRg16f = 7,
188 SpvImageFormatR11fG11fB10f = 8,
189 SpvImageFormatR16f = 9,
190 SpvImageFormatRgba16 = 10,
191 SpvImageFormatRgb10A2 = 11,
192 SpvImageFormatRg16 = 12,
193 SpvImageFormatRg8 = 13,
194 SpvImageFormatR16 = 14,
195 SpvImageFormatR8 = 15,
196 SpvImageFormatRgba16Snorm = 16,
197 SpvImageFormatRg16Snorm = 17,
198 SpvImageFormatRg8Snorm = 18,
199 SpvImageFormatR16Snorm = 19,
200 SpvImageFormatR8Snorm = 20,
201 SpvImageFormatRgba32i = 21,
202 SpvImageFormatRgba16i = 22,
203 SpvImageFormatRgba8i = 23,
204 SpvImageFormatR32i = 24,
205 SpvImageFormatRg32i = 25,
206 SpvImageFormatRg16i = 26,
207 SpvImageFormatRg8i = 27,
208 SpvImageFormatR16i = 28,
209 SpvImageFormatR8i = 29,
210 SpvImageFormatRgba32ui = 30,
211 SpvImageFormatRgba16ui = 31,
212 SpvImageFormatRgba8ui = 32,
213 SpvImageFormatR32ui = 33,
214 SpvImageFormatRgb10a2ui = 34,
215 SpvImageFormatRg32ui = 35,
216 SpvImageFormatRg16ui = 36,
217 SpvImageFormatRg8ui = 37,
218 SpvImageFormatR16ui = 38,
219 SpvImageFormatR8ui = 39,
220 SpvImageFormatMax = 0x7fffffff,
223 typedef enum SpvImageChannelOrder_ {
224 SpvImageChannelOrderR = 0,
225 SpvImageChannelOrderA = 1,
226 SpvImageChannelOrderRG = 2,
227 SpvImageChannelOrderRA = 3,
228 SpvImageChannelOrderRGB = 4,
229 SpvImageChannelOrderRGBA = 5,
230 SpvImageChannelOrderBGRA = 6,
231 SpvImageChannelOrderARGB = 7,
232 SpvImageChannelOrderIntensity = 8,
233 SpvImageChannelOrderLuminance = 9,
234 SpvImageChannelOrderRx = 10,
235 SpvImageChannelOrderRGx = 11,
236 SpvImageChannelOrderRGBx = 12,
237 SpvImageChannelOrderDepth = 13,
238 SpvImageChannelOrderDepthStencil = 14,
239 SpvImageChannelOrdersRGB = 15,
240 SpvImageChannelOrdersRGBx = 16,
241 SpvImageChannelOrdersRGBA = 17,
242 SpvImageChannelOrdersBGRA = 18,
243 SpvImageChannelOrderABGR = 19,
244 SpvImageChannelOrderMax = 0x7fffffff,
245 } SpvImageChannelOrder;
247 typedef enum SpvImageChannelDataType_ {
248 SpvImageChannelDataTypeSnormInt8 = 0,
249 SpvImageChannelDataTypeSnormInt16 = 1,
250 SpvImageChannelDataTypeUnormInt8 = 2,
251 SpvImageChannelDataTypeUnormInt16 = 3,
252 SpvImageChannelDataTypeUnormShort565 = 4,
253 SpvImageChannelDataTypeUnormShort555 = 5,
254 SpvImageChannelDataTypeUnormInt101010 = 6,
255 SpvImageChannelDataTypeSignedInt8 = 7,
256 SpvImageChannelDataTypeSignedInt16 = 8,
257 SpvImageChannelDataTypeSignedInt32 = 9,
258 SpvImageChannelDataTypeUnsignedInt8 = 10,
259 SpvImageChannelDataTypeUnsignedInt16 = 11,
260 SpvImageChannelDataTypeUnsignedInt32 = 12,
261 SpvImageChannelDataTypeHalfFloat = 13,
262 SpvImageChannelDataTypeFloat = 14,
263 SpvImageChannelDataTypeUnormInt24 = 15,
264 SpvImageChannelDataTypeUnormInt101010_2 = 16,
265 SpvImageChannelDataTypeMax = 0x7fffffff,
266 } SpvImageChannelDataType;
268 typedef enum SpvImageOperandsShift_ {
269 SpvImageOperandsBiasShift = 0,
270 SpvImageOperandsLodShift = 1,
271 SpvImageOperandsGradShift = 2,
272 SpvImageOperandsConstOffsetShift = 3,
273 SpvImageOperandsOffsetShift = 4,
274 SpvImageOperandsConstOffsetsShift = 5,
275 SpvImageOperandsSampleShift = 6,
276 SpvImageOperandsMinLodShift = 7,
277 SpvImageOperandsMax = 0x7fffffff,
278 } SpvImageOperandsShift;
280 typedef enum SpvImageOperandsMask_ {
281 SpvImageOperandsMaskNone = 0,
282 SpvImageOperandsBiasMask = 0x00000001,
283 SpvImageOperandsLodMask = 0x00000002,
284 SpvImageOperandsGradMask = 0x00000004,
285 SpvImageOperandsConstOffsetMask = 0x00000008,
286 SpvImageOperandsOffsetMask = 0x00000010,
287 SpvImageOperandsConstOffsetsMask = 0x00000020,
288 SpvImageOperandsSampleMask = 0x00000040,
289 SpvImageOperandsMinLodMask = 0x00000080,
290 } SpvImageOperandsMask;
292 typedef enum SpvFPFastMathModeShift_ {
293 SpvFPFastMathModeNotNaNShift = 0,
294 SpvFPFastMathModeNotInfShift = 1,
295 SpvFPFastMathModeNSZShift = 2,
296 SpvFPFastMathModeAllowRecipShift = 3,
297 SpvFPFastMathModeFastShift = 4,
298 SpvFPFastMathModeMax = 0x7fffffff,
299 } SpvFPFastMathModeShift;
301 typedef enum SpvFPFastMathModeMask_ {
302 SpvFPFastMathModeMaskNone = 0,
303 SpvFPFastMathModeNotNaNMask = 0x00000001,
304 SpvFPFastMathModeNotInfMask = 0x00000002,
305 SpvFPFastMathModeNSZMask = 0x00000004,
306 SpvFPFastMathModeAllowRecipMask = 0x00000008,
307 SpvFPFastMathModeFastMask = 0x00000010,
308 } SpvFPFastMathModeMask;
310 typedef enum SpvFPRoundingMode_ {
311 SpvFPRoundingModeRTE = 0,
312 SpvFPRoundingModeRTZ = 1,
313 SpvFPRoundingModeRTP = 2,
314 SpvFPRoundingModeRTN = 3,
315 SpvFPRoundingModeMax = 0x7fffffff,
318 typedef enum SpvLinkageType_ {
319 SpvLinkageTypeExport = 0,
320 SpvLinkageTypeImport = 1,
321 SpvLinkageTypeMax = 0x7fffffff,
324 typedef enum SpvAccessQualifier_ {
325 SpvAccessQualifierReadOnly = 0,
326 SpvAccessQualifierWriteOnly = 1,
327 SpvAccessQualifierReadWrite = 2,
328 SpvAccessQualifierMax = 0x7fffffff,
329 } SpvAccessQualifier;
331 typedef enum SpvFunctionParameterAttribute_ {
332 SpvFunctionParameterAttributeZext = 0,
333 SpvFunctionParameterAttributeSext = 1,
334 SpvFunctionParameterAttributeByVal = 2,
335 SpvFunctionParameterAttributeSret = 3,
336 SpvFunctionParameterAttributeNoAlias = 4,
337 SpvFunctionParameterAttributeNoCapture = 5,
338 SpvFunctionParameterAttributeNoWrite = 6,
339 SpvFunctionParameterAttributeNoReadWrite = 7,
340 SpvFunctionParameterAttributeMax = 0x7fffffff,
341 } SpvFunctionParameterAttribute;
343 typedef enum SpvDecoration_ {
344 SpvDecorationRelaxedPrecision = 0,
345 SpvDecorationSpecId = 1,
346 SpvDecorationBlock = 2,
347 SpvDecorationBufferBlock = 3,
348 SpvDecorationRowMajor = 4,
349 SpvDecorationColMajor = 5,
350 SpvDecorationArrayStride = 6,
351 SpvDecorationMatrixStride = 7,
352 SpvDecorationGLSLShared = 8,
353 SpvDecorationGLSLPacked = 9,
354 SpvDecorationCPacked = 10,
355 SpvDecorationBuiltIn = 11,
356 SpvDecorationNoPerspective = 13,
357 SpvDecorationFlat = 14,
358 SpvDecorationPatch = 15,
359 SpvDecorationCentroid = 16,
360 SpvDecorationSample = 17,
361 SpvDecorationInvariant = 18,
362 SpvDecorationRestrict = 19,
363 SpvDecorationAliased = 20,
364 SpvDecorationVolatile = 21,
365 SpvDecorationConstant = 22,
366 SpvDecorationCoherent = 23,
367 SpvDecorationNonWritable = 24,
368 SpvDecorationNonReadable = 25,
369 SpvDecorationUniform = 26,
370 SpvDecorationSaturatedConversion = 28,
371 SpvDecorationStream = 29,
372 SpvDecorationLocation = 30,
373 SpvDecorationComponent = 31,
374 SpvDecorationIndex = 32,
375 SpvDecorationBinding = 33,
376 SpvDecorationDescriptorSet = 34,
377 SpvDecorationOffset = 35,
378 SpvDecorationXfbBuffer = 36,
379 SpvDecorationXfbStride = 37,
380 SpvDecorationFuncParamAttr = 38,
381 SpvDecorationFPRoundingMode = 39,
382 SpvDecorationFPFastMathMode = 40,
383 SpvDecorationLinkageAttributes = 41,
384 SpvDecorationNoContraction = 42,
385 SpvDecorationInputAttachmentIndex = 43,
386 SpvDecorationAlignment = 44,
387 SpvDecorationMaxByteOffset = 45,
388 SpvDecorationOverrideCoverageNV = 5248,
389 SpvDecorationPassthroughNV = 5250,
390 SpvDecorationViewportRelativeNV = 5252,
391 SpvDecorationSecondaryViewportRelativeNV = 5256,
392 SpvDecorationMax = 0x7fffffff,
395 typedef enum SpvBuiltIn_ {
396 SpvBuiltInPosition = 0,
397 SpvBuiltInPointSize = 1,
398 SpvBuiltInClipDistance = 3,
399 SpvBuiltInCullDistance = 4,
400 SpvBuiltInVertexId = 5,
401 SpvBuiltInInstanceId = 6,
402 SpvBuiltInPrimitiveId = 7,
403 SpvBuiltInInvocationId = 8,
405 SpvBuiltInViewportIndex = 10,
406 SpvBuiltInTessLevelOuter = 11,
407 SpvBuiltInTessLevelInner = 12,
408 SpvBuiltInTessCoord = 13,
409 SpvBuiltInPatchVertices = 14,
410 SpvBuiltInFragCoord = 15,
411 SpvBuiltInPointCoord = 16,
412 SpvBuiltInFrontFacing = 17,
413 SpvBuiltInSampleId = 18,
414 SpvBuiltInSamplePosition = 19,
415 SpvBuiltInSampleMask = 20,
416 SpvBuiltInFragDepth = 22,
417 SpvBuiltInHelperInvocation = 23,
418 SpvBuiltInNumWorkgroups = 24,
419 SpvBuiltInWorkgroupSize = 25,
420 SpvBuiltInWorkgroupId = 26,
421 SpvBuiltInLocalInvocationId = 27,
422 SpvBuiltInGlobalInvocationId = 28,
423 SpvBuiltInLocalInvocationIndex = 29,
424 SpvBuiltInWorkDim = 30,
425 SpvBuiltInGlobalSize = 31,
426 SpvBuiltInEnqueuedWorkgroupSize = 32,
427 SpvBuiltInGlobalOffset = 33,
428 SpvBuiltInGlobalLinearId = 34,
429 SpvBuiltInSubgroupSize = 36,
430 SpvBuiltInSubgroupMaxSize = 37,
431 SpvBuiltInNumSubgroups = 38,
432 SpvBuiltInNumEnqueuedSubgroups = 39,
433 SpvBuiltInSubgroupId = 40,
434 SpvBuiltInSubgroupLocalInvocationId = 41,
435 SpvBuiltInVertexIndex = 42,
436 SpvBuiltInInstanceIndex = 43,
437 SpvBuiltInSubgroupEqMaskKHR = 4416,
438 SpvBuiltInSubgroupGeMaskKHR = 4417,
439 SpvBuiltInSubgroupGtMaskKHR = 4418,
440 SpvBuiltInSubgroupLeMaskKHR = 4419,
441 SpvBuiltInSubgroupLtMaskKHR = 4420,
442 SpvBuiltInBaseVertex = 4424,
443 SpvBuiltInBaseInstance = 4425,
444 SpvBuiltInDrawIndex = 4426,
445 SpvBuiltInDeviceIndex = 4438,
446 SpvBuiltInViewIndex = 4440,
447 SpvBuiltInViewportMaskNV = 5253,
448 SpvBuiltInSecondaryPositionNV = 5257,
449 SpvBuiltInSecondaryViewportMaskNV = 5258,
450 SpvBuiltInPositionPerViewNV = 5261,
451 SpvBuiltInViewportMaskPerViewNV = 5262,
452 SpvBuiltInMax = 0x7fffffff,
455 typedef enum SpvSelectionControlShift_ {
456 SpvSelectionControlFlattenShift = 0,
457 SpvSelectionControlDontFlattenShift = 1,
458 SpvSelectionControlMax = 0x7fffffff,
459 } SpvSelectionControlShift;
461 typedef enum SpvSelectionControlMask_ {
462 SpvSelectionControlMaskNone = 0,
463 SpvSelectionControlFlattenMask = 0x00000001,
464 SpvSelectionControlDontFlattenMask = 0x00000002,
465 } SpvSelectionControlMask;
467 typedef enum SpvLoopControlShift_ {
468 SpvLoopControlUnrollShift = 0,
469 SpvLoopControlDontUnrollShift = 1,
470 SpvLoopControlDependencyInfiniteShift = 2,
471 SpvLoopControlDependencyLengthShift = 3,
472 SpvLoopControlMax = 0x7fffffff,
473 } SpvLoopControlShift;
475 typedef enum SpvLoopControlMask_ {
476 SpvLoopControlMaskNone = 0,
477 SpvLoopControlUnrollMask = 0x00000001,
478 SpvLoopControlDontUnrollMask = 0x00000002,
479 SpvLoopControlDependencyInfiniteMask = 0x00000004,
480 SpvLoopControlDependencyLengthMask = 0x00000008,
481 } SpvLoopControlMask;
483 typedef enum SpvFunctionControlShift_ {
484 SpvFunctionControlInlineShift = 0,
485 SpvFunctionControlDontInlineShift = 1,
486 SpvFunctionControlPureShift = 2,
487 SpvFunctionControlConstShift = 3,
488 SpvFunctionControlMax = 0x7fffffff,
489 } SpvFunctionControlShift;
491 typedef enum SpvFunctionControlMask_ {
492 SpvFunctionControlMaskNone = 0,
493 SpvFunctionControlInlineMask = 0x00000001,
494 SpvFunctionControlDontInlineMask = 0x00000002,
495 SpvFunctionControlPureMask = 0x00000004,
496 SpvFunctionControlConstMask = 0x00000008,
497 } SpvFunctionControlMask;
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;
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;
527 typedef enum SpvMemoryAccessShift_ {
528 SpvMemoryAccessVolatileShift = 0,
529 SpvMemoryAccessAlignedShift = 1,
530 SpvMemoryAccessNontemporalShift = 2,
531 SpvMemoryAccessMax = 0x7fffffff,
532 } SpvMemoryAccessShift;
534 typedef enum SpvMemoryAccessMask_ {
535 SpvMemoryAccessMaskNone = 0,
536 SpvMemoryAccessVolatileMask = 0x00000001,
537 SpvMemoryAccessAlignedMask = 0x00000002,
538 SpvMemoryAccessNontemporalMask = 0x00000004,
539 } SpvMemoryAccessMask;
541 typedef enum SpvScope_ {
542 SpvScopeCrossDevice = 0,
544 SpvScopeWorkgroup = 2,
545 SpvScopeSubgroup = 3,
546 SpvScopeInvocation = 4,
547 SpvScopeMax = 0x7fffffff,
550 typedef enum SpvGroupOperation_ {
551 SpvGroupOperationReduce = 0,
552 SpvGroupOperationInclusiveScan = 1,
553 SpvGroupOperationExclusiveScan = 2,
554 SpvGroupOperationMax = 0x7fffffff,
557 typedef enum SpvKernelEnqueueFlags_ {
558 SpvKernelEnqueueFlagsNoWait = 0,
559 SpvKernelEnqueueFlagsWaitKernel = 1,
560 SpvKernelEnqueueFlagsWaitWorkGroup = 2,
561 SpvKernelEnqueueFlagsMax = 0x7fffffff,
562 } SpvKernelEnqueueFlags;
564 typedef enum SpvKernelProfilingInfoShift_ {
565 SpvKernelProfilingInfoCmdExecTimeShift = 0,
566 SpvKernelProfilingInfoMax = 0x7fffffff,
567 } SpvKernelProfilingInfoShift;
569 typedef enum SpvKernelProfilingInfoMask_ {
570 SpvKernelProfilingInfoMaskNone = 0,
571 SpvKernelProfilingInfoCmdExecTimeMask = 0x00000001,
572 } SpvKernelProfilingInfoMask;
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 SpvCapabilitySubgroupDispatch = 58,
632 SpvCapabilityNamedBarrier = 59,
633 SpvCapabilityPipeStorage = 60,
634 SpvCapabilitySubgroupBallotKHR = 4423,
635 SpvCapabilityDrawParameters = 4427,
636 SpvCapabilitySubgroupVoteKHR = 4431,
637 SpvCapabilityStorageBuffer16BitAccess = 4433,
638 SpvCapabilityStorageUniformBufferBlock16 = 4433,
639 SpvCapabilityStorageUniform16 = 4434,
640 SpvCapabilityUniformAndStorageBuffer16BitAccess = 4434,
641 SpvCapabilityStoragePushConstant16 = 4435,
642 SpvCapabilityStorageInputOutput16 = 4436,
643 SpvCapabilityDeviceGroup = 4437,
644 SpvCapabilityMultiView = 4439,
645 SpvCapabilityVariablePointersStorageBuffer = 4441,
646 SpvCapabilityVariablePointers = 4442,
647 SpvCapabilitySampleMaskOverrideCoverageNV = 5249,
648 SpvCapabilityGeometryShaderPassthroughNV = 5251,
649 SpvCapabilityShaderViewportIndexLayerNV = 5254,
650 SpvCapabilityShaderViewportMaskNV = 5255,
651 SpvCapabilityShaderStereoViewNV = 5259,
652 SpvCapabilityPerViewAttributesNV = 5260,
653 SpvCapabilityMax = 0x7fffffff,
656 typedef enum SpvOp_ {
659 SpvOpSourceContinued = 2,
661 SpvOpSourceExtension = 4,
667 SpvOpExtInstImport = 11,
669 SpvOpMemoryModel = 14,
670 SpvOpEntryPoint = 15,
671 SpvOpExecutionMode = 16,
672 SpvOpCapability = 17,
677 SpvOpTypeVector = 23,
678 SpvOpTypeMatrix = 24,
680 SpvOpTypeSampler = 26,
681 SpvOpTypeSampledImage = 27,
683 SpvOpTypeRuntimeArray = 29,
684 SpvOpTypeStruct = 30,
685 SpvOpTypeOpaque = 31,
686 SpvOpTypePointer = 32,
687 SpvOpTypeFunction = 33,
689 SpvOpTypeDeviceEvent = 35,
690 SpvOpTypeReserveId = 36,
693 SpvOpTypeForwardPointer = 39,
694 SpvOpConstantTrue = 41,
695 SpvOpConstantFalse = 42,
697 SpvOpConstantComposite = 44,
698 SpvOpConstantSampler = 45,
699 SpvOpConstantNull = 46,
700 SpvOpSpecConstantTrue = 48,
701 SpvOpSpecConstantFalse = 49,
702 SpvOpSpecConstant = 50,
703 SpvOpSpecConstantComposite = 51,
704 SpvOpSpecConstantOp = 52,
706 SpvOpFunctionParameter = 55,
707 SpvOpFunctionEnd = 56,
708 SpvOpFunctionCall = 57,
710 SpvOpImageTexelPointer = 60,
713 SpvOpCopyMemory = 63,
714 SpvOpCopyMemorySized = 64,
715 SpvOpAccessChain = 65,
716 SpvOpInBoundsAccessChain = 66,
717 SpvOpPtrAccessChain = 67,
718 SpvOpArrayLength = 68,
719 SpvOpGenericPtrMemSemantics = 69,
720 SpvOpInBoundsPtrAccessChain = 70,
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,
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,
747 SpvOpImageWrite = 99,
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,
763 SpvOpQuantizeToF16 = 116,
764 SpvOpConvertPtrToU = 117,
765 SpvOpSatConvertSToU = 118,
766 SpvOpSatConvertUToS = 119,
767 SpvOpConvertUToPtr = 120,
768 SpvOpPtrCastToGeneric = 121,
769 SpvOpGenericCastToPtr = 122,
770 SpvOpGenericCastToPtrExplicit = 123,
788 SpvOpVectorTimesScalar = 142,
789 SpvOpMatrixTimesScalar = 143,
790 SpvOpVectorTimesMatrix = 144,
791 SpvOpMatrixTimesVector = 145,
792 SpvOpMatrixTimesMatrix = 146,
793 SpvOpOuterProduct = 147,
795 SpvOpIAddCarry = 149,
796 SpvOpISubBorrow = 150,
797 SpvOpUMulExtended = 151,
798 SpvOpSMulExtended = 152,
805 SpvOpSignBitSet = 160,
806 SpvOpLessOrGreater = 161,
808 SpvOpUnordered = 163,
809 SpvOpLogicalEqual = 164,
810 SpvOpLogicalNotEqual = 165,
811 SpvOpLogicalOr = 166,
812 SpvOpLogicalAnd = 167,
813 SpvOpLogicalNot = 168,
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,
844 SpvOpBitFieldInsert = 201,
845 SpvOpBitFieldSExtract = 202,
846 SpvOpBitFieldUExtract = 203,
847 SpvOpBitReverse = 204,
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,
879 SpvOpAtomicXor = 242,
881 SpvOpLoopMerge = 246,
882 SpvOpSelectionMerge = 247,
885 SpvOpBranchConditional = 250,
889 SpvOpReturnValue = 254,
890 SpvOpUnreachable = 255,
891 SpvOpLifetimeStart = 256,
892 SpvOpLifetimeStop = 257,
893 SpvOpGroupAsyncCopy = 259,
894 SpvOpGroupWaitEvents = 260,
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,
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,
948 SpvOpAtomicFlagTestAndSet = 318,
949 SpvOpAtomicFlagClear = 319,
950 SpvOpImageSparseRead = 320,
952 SpvOpTypePipeStorage = 322,
953 SpvOpConstantPipeStorage = 323,
954 SpvOpCreatePipeFromPipeStorage = 324,
955 SpvOpGetKernelLocalSizeForSubgroupCount = 325,
956 SpvOpGetKernelMaxNumSubgroups = 326,
957 SpvOpTypeNamedBarrier = 327,
958 SpvOpNamedBarrierInitialize = 328,
959 SpvOpMemoryNamedBarrier = 329,
960 SpvOpModuleProcessed = 330,
961 SpvOpSubgroupBallotKHR = 4421,
962 SpvOpSubgroupFirstInvocationKHR = 4422,
963 SpvOpSubgroupAllKHR = 4428,
964 SpvOpSubgroupAnyKHR = 4429,
965 SpvOpSubgroupAllEqualKHR = 4430,
966 SpvOpSubgroupReadInvocationKHR = 4432,
967 SpvOpMax = 0x7fffffff,
970 #endif // #ifndef spirv_H