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