• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2014-2016 The Khronos Group Inc.
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and/or associated documentation files (the "Materials"),
5 // to deal in the Materials without restriction, including without limitation
6 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 // and/or sell copies of the Materials, and to permit persons to whom the
8 // Materials are furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Materials.
12 //
13 // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
14 // STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
15 // HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
16 //
17 // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 // FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
23 // IN THE MATERIALS.
24 
25 // This header is automatically generated by the same tool that creates
26 // the Binary Section of the SPIR-V specification.
27 
28 // Enumeration tokens for SPIR-V, in various styles:
29 //   C, C++, C++11, JSON, Lua, Python
30 //
31 // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
32 // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
33 // - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
34 // - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
35 // - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
36 //
37 // Some tokens act like mask values, which can be OR'd together,
38 // while others are mutually exclusive.  The mask-like ones have
39 // "Mask" in their name, and a parallel enum that has the shift
40 // amount (1 << x) for each corresponding enumerant.
41 
42 #ifndef spirv_HPP
43 #define spirv_HPP
44 
45 namespace spv {
46 
47 typedef unsigned int Id;
48 
49 #define SPV_VERSION 0x10100
50 #define SPV_REVISION 4
51 
52 static const unsigned int MagicNumber = 0x07230203;
53 static const unsigned int Version = 0x00010100;
54 static const unsigned int Revision = 4;
55 static const unsigned int OpCodeMask = 0xffff;
56 static const unsigned int WordCountShift = 16;
57 
58 enum SourceLanguage {
59     SourceLanguageUnknown = 0,
60     SourceLanguageESSL = 1,
61     SourceLanguageGLSL = 2,
62     SourceLanguageOpenCL_C = 3,
63     SourceLanguageOpenCL_CPP = 4,
64     SourceLanguageMax = 0x7fffffff,
65 };
66 
67 enum ExecutionModel {
68     ExecutionModelVertex = 0,
69     ExecutionModelTessellationControl = 1,
70     ExecutionModelTessellationEvaluation = 2,
71     ExecutionModelGeometry = 3,
72     ExecutionModelFragment = 4,
73     ExecutionModelGLCompute = 5,
74     ExecutionModelKernel = 6,
75     ExecutionModelMax = 0x7fffffff,
76 };
77 
78 enum AddressingModel {
79     AddressingModelLogical = 0,
80     AddressingModelPhysical32 = 1,
81     AddressingModelPhysical64 = 2,
82     AddressingModelMax = 0x7fffffff,
83 };
84 
85 enum MemoryModel {
86     MemoryModelSimple = 0,
87     MemoryModelGLSL450 = 1,
88     MemoryModelOpenCL = 2,
89     MemoryModelMax = 0x7fffffff,
90 };
91 
92 enum ExecutionMode {
93     ExecutionModeInvocations = 0,
94     ExecutionModeSpacingEqual = 1,
95     ExecutionModeSpacingFractionalEven = 2,
96     ExecutionModeSpacingFractionalOdd = 3,
97     ExecutionModeVertexOrderCw = 4,
98     ExecutionModeVertexOrderCcw = 5,
99     ExecutionModePixelCenterInteger = 6,
100     ExecutionModeOriginUpperLeft = 7,
101     ExecutionModeOriginLowerLeft = 8,
102     ExecutionModeEarlyFragmentTests = 9,
103     ExecutionModePointMode = 10,
104     ExecutionModeXfb = 11,
105     ExecutionModeDepthReplacing = 12,
106     ExecutionModeDepthGreater = 14,
107     ExecutionModeDepthLess = 15,
108     ExecutionModeDepthUnchanged = 16,
109     ExecutionModeLocalSize = 17,
110     ExecutionModeLocalSizeHint = 18,
111     ExecutionModeInputPoints = 19,
112     ExecutionModeInputLines = 20,
113     ExecutionModeInputLinesAdjacency = 21,
114     ExecutionModeTriangles = 22,
115     ExecutionModeInputTrianglesAdjacency = 23,
116     ExecutionModeQuads = 24,
117     ExecutionModeIsolines = 25,
118     ExecutionModeOutputVertices = 26,
119     ExecutionModeOutputPoints = 27,
120     ExecutionModeOutputLineStrip = 28,
121     ExecutionModeOutputTriangleStrip = 29,
122     ExecutionModeVecTypeHint = 30,
123     ExecutionModeContractionOff = 31,
124     ExecutionModeInitializer = 33,
125     ExecutionModeFinalizer = 34,
126     ExecutionModeSubgroupSize = 35,
127     ExecutionModeSubgroupsPerWorkgroup = 36,
128     ExecutionModeMax = 0x7fffffff,
129 };
130 
131 enum StorageClass {
132     StorageClassUniformConstant = 0,
133     StorageClassInput = 1,
134     StorageClassUniform = 2,
135     StorageClassOutput = 3,
136     StorageClassWorkgroup = 4,
137     StorageClassCrossWorkgroup = 5,
138     StorageClassPrivate = 6,
139     StorageClassFunction = 7,
140     StorageClassGeneric = 8,
141     StorageClassPushConstant = 9,
142     StorageClassAtomicCounter = 10,
143     StorageClassImage = 11,
144     StorageClassMax = 0x7fffffff,
145 };
146 
147 enum Dim {
148     Dim1D = 0,
149     Dim2D = 1,
150     Dim3D = 2,
151     DimCube = 3,
152     DimRect = 4,
153     DimBuffer = 5,
154     DimSubpassData = 6,
155     DimMax = 0x7fffffff,
156 };
157 
158 enum SamplerAddressingMode {
159     SamplerAddressingModeNone = 0,
160     SamplerAddressingModeClampToEdge = 1,
161     SamplerAddressingModeClamp = 2,
162     SamplerAddressingModeRepeat = 3,
163     SamplerAddressingModeRepeatMirrored = 4,
164     SamplerAddressingModeMax = 0x7fffffff,
165 };
166 
167 enum SamplerFilterMode {
168     SamplerFilterModeNearest = 0,
169     SamplerFilterModeLinear = 1,
170     SamplerFilterModeMax = 0x7fffffff,
171 };
172 
173 enum ImageFormat {
174     ImageFormatUnknown = 0,
175     ImageFormatRgba32f = 1,
176     ImageFormatRgba16f = 2,
177     ImageFormatR32f = 3,
178     ImageFormatRgba8 = 4,
179     ImageFormatRgba8Snorm = 5,
180     ImageFormatRg32f = 6,
181     ImageFormatRg16f = 7,
182     ImageFormatR11fG11fB10f = 8,
183     ImageFormatR16f = 9,
184     ImageFormatRgba16 = 10,
185     ImageFormatRgb10A2 = 11,
186     ImageFormatRg16 = 12,
187     ImageFormatRg8 = 13,
188     ImageFormatR16 = 14,
189     ImageFormatR8 = 15,
190     ImageFormatRgba16Snorm = 16,
191     ImageFormatRg16Snorm = 17,
192     ImageFormatRg8Snorm = 18,
193     ImageFormatR16Snorm = 19,
194     ImageFormatR8Snorm = 20,
195     ImageFormatRgba32i = 21,
196     ImageFormatRgba16i = 22,
197     ImageFormatRgba8i = 23,
198     ImageFormatR32i = 24,
199     ImageFormatRg32i = 25,
200     ImageFormatRg16i = 26,
201     ImageFormatRg8i = 27,
202     ImageFormatR16i = 28,
203     ImageFormatR8i = 29,
204     ImageFormatRgba32ui = 30,
205     ImageFormatRgba16ui = 31,
206     ImageFormatRgba8ui = 32,
207     ImageFormatR32ui = 33,
208     ImageFormatRgb10a2ui = 34,
209     ImageFormatRg32ui = 35,
210     ImageFormatRg16ui = 36,
211     ImageFormatRg8ui = 37,
212     ImageFormatR16ui = 38,
213     ImageFormatR8ui = 39,
214     ImageFormatMax = 0x7fffffff,
215 };
216 
217 enum ImageChannelOrder {
218     ImageChannelOrderR = 0,
219     ImageChannelOrderA = 1,
220     ImageChannelOrderRG = 2,
221     ImageChannelOrderRA = 3,
222     ImageChannelOrderRGB = 4,
223     ImageChannelOrderRGBA = 5,
224     ImageChannelOrderBGRA = 6,
225     ImageChannelOrderARGB = 7,
226     ImageChannelOrderIntensity = 8,
227     ImageChannelOrderLuminance = 9,
228     ImageChannelOrderRx = 10,
229     ImageChannelOrderRGx = 11,
230     ImageChannelOrderRGBx = 12,
231     ImageChannelOrderDepth = 13,
232     ImageChannelOrderDepthStencil = 14,
233     ImageChannelOrdersRGB = 15,
234     ImageChannelOrdersRGBx = 16,
235     ImageChannelOrdersRGBA = 17,
236     ImageChannelOrdersBGRA = 18,
237     ImageChannelOrderABGR = 19,
238     ImageChannelOrderMax = 0x7fffffff,
239 };
240 
241 enum ImageChannelDataType {
242     ImageChannelDataTypeSnormInt8 = 0,
243     ImageChannelDataTypeSnormInt16 = 1,
244     ImageChannelDataTypeUnormInt8 = 2,
245     ImageChannelDataTypeUnormInt16 = 3,
246     ImageChannelDataTypeUnormShort565 = 4,
247     ImageChannelDataTypeUnormShort555 = 5,
248     ImageChannelDataTypeUnormInt101010 = 6,
249     ImageChannelDataTypeSignedInt8 = 7,
250     ImageChannelDataTypeSignedInt16 = 8,
251     ImageChannelDataTypeSignedInt32 = 9,
252     ImageChannelDataTypeUnsignedInt8 = 10,
253     ImageChannelDataTypeUnsignedInt16 = 11,
254     ImageChannelDataTypeUnsignedInt32 = 12,
255     ImageChannelDataTypeHalfFloat = 13,
256     ImageChannelDataTypeFloat = 14,
257     ImageChannelDataTypeUnormInt24 = 15,
258     ImageChannelDataTypeUnormInt101010_2 = 16,
259     ImageChannelDataTypeMax = 0x7fffffff,
260 };
261 
262 enum ImageOperandsShift {
263     ImageOperandsBiasShift = 0,
264     ImageOperandsLodShift = 1,
265     ImageOperandsGradShift = 2,
266     ImageOperandsConstOffsetShift = 3,
267     ImageOperandsOffsetShift = 4,
268     ImageOperandsConstOffsetsShift = 5,
269     ImageOperandsSampleShift = 6,
270     ImageOperandsMinLodShift = 7,
271     ImageOperandsMax = 0x7fffffff,
272 };
273 
274 enum ImageOperandsMask {
275     ImageOperandsMaskNone = 0,
276     ImageOperandsBiasMask = 0x00000001,
277     ImageOperandsLodMask = 0x00000002,
278     ImageOperandsGradMask = 0x00000004,
279     ImageOperandsConstOffsetMask = 0x00000008,
280     ImageOperandsOffsetMask = 0x00000010,
281     ImageOperandsConstOffsetsMask = 0x00000020,
282     ImageOperandsSampleMask = 0x00000040,
283     ImageOperandsMinLodMask = 0x00000080,
284 };
285 
286 enum FPFastMathModeShift {
287     FPFastMathModeNotNaNShift = 0,
288     FPFastMathModeNotInfShift = 1,
289     FPFastMathModeNSZShift = 2,
290     FPFastMathModeAllowRecipShift = 3,
291     FPFastMathModeFastShift = 4,
292     FPFastMathModeMax = 0x7fffffff,
293 };
294 
295 enum FPFastMathModeMask {
296     FPFastMathModeMaskNone = 0,
297     FPFastMathModeNotNaNMask = 0x00000001,
298     FPFastMathModeNotInfMask = 0x00000002,
299     FPFastMathModeNSZMask = 0x00000004,
300     FPFastMathModeAllowRecipMask = 0x00000008,
301     FPFastMathModeFastMask = 0x00000010,
302 };
303 
304 enum FPRoundingMode {
305     FPRoundingModeRTE = 0,
306     FPRoundingModeRTZ = 1,
307     FPRoundingModeRTP = 2,
308     FPRoundingModeRTN = 3,
309     FPRoundingModeMax = 0x7fffffff,
310 };
311 
312 enum LinkageType {
313     LinkageTypeExport = 0,
314     LinkageTypeImport = 1,
315     LinkageTypeMax = 0x7fffffff,
316 };
317 
318 enum AccessQualifier {
319     AccessQualifierReadOnly = 0,
320     AccessQualifierWriteOnly = 1,
321     AccessQualifierReadWrite = 2,
322     AccessQualifierMax = 0x7fffffff,
323 };
324 
325 enum FunctionParameterAttribute {
326     FunctionParameterAttributeZext = 0,
327     FunctionParameterAttributeSext = 1,
328     FunctionParameterAttributeByVal = 2,
329     FunctionParameterAttributeSret = 3,
330     FunctionParameterAttributeNoAlias = 4,
331     FunctionParameterAttributeNoCapture = 5,
332     FunctionParameterAttributeNoWrite = 6,
333     FunctionParameterAttributeNoReadWrite = 7,
334     FunctionParameterAttributeMax = 0x7fffffff,
335 };
336 
337 enum Decoration {
338     DecorationRelaxedPrecision = 0,
339     DecorationSpecId = 1,
340     DecorationBlock = 2,
341     DecorationBufferBlock = 3,
342     DecorationRowMajor = 4,
343     DecorationColMajor = 5,
344     DecorationArrayStride = 6,
345     DecorationMatrixStride = 7,
346     DecorationGLSLShared = 8,
347     DecorationGLSLPacked = 9,
348     DecorationCPacked = 10,
349     DecorationBuiltIn = 11,
350     DecorationNoPerspective = 13,
351     DecorationFlat = 14,
352     DecorationPatch = 15,
353     DecorationCentroid = 16,
354     DecorationSample = 17,
355     DecorationInvariant = 18,
356     DecorationRestrict = 19,
357     DecorationAliased = 20,
358     DecorationVolatile = 21,
359     DecorationConstant = 22,
360     DecorationCoherent = 23,
361     DecorationNonWritable = 24,
362     DecorationNonReadable = 25,
363     DecorationUniform = 26,
364     DecorationSaturatedConversion = 28,
365     DecorationStream = 29,
366     DecorationLocation = 30,
367     DecorationComponent = 31,
368     DecorationIndex = 32,
369     DecorationBinding = 33,
370     DecorationDescriptorSet = 34,
371     DecorationOffset = 35,
372     DecorationXfbBuffer = 36,
373     DecorationXfbStride = 37,
374     DecorationFuncParamAttr = 38,
375     DecorationFPRoundingMode = 39,
376     DecorationFPFastMathMode = 40,
377     DecorationLinkageAttributes = 41,
378     DecorationNoContraction = 42,
379     DecorationInputAttachmentIndex = 43,
380     DecorationAlignment = 44,
381     DecorationMaxByteOffset = 45,
382     DecorationMax = 0x7fffffff,
383 };
384 
385 enum BuiltIn {
386     BuiltInPosition = 0,
387     BuiltInPointSize = 1,
388     BuiltInClipDistance = 3,
389     BuiltInCullDistance = 4,
390     BuiltInVertexId = 5,
391     BuiltInInstanceId = 6,
392     BuiltInPrimitiveId = 7,
393     BuiltInInvocationId = 8,
394     BuiltInLayer = 9,
395     BuiltInViewportIndex = 10,
396     BuiltInTessLevelOuter = 11,
397     BuiltInTessLevelInner = 12,
398     BuiltInTessCoord = 13,
399     BuiltInPatchVertices = 14,
400     BuiltInFragCoord = 15,
401     BuiltInPointCoord = 16,
402     BuiltInFrontFacing = 17,
403     BuiltInSampleId = 18,
404     BuiltInSamplePosition = 19,
405     BuiltInSampleMask = 20,
406     BuiltInFragDepth = 22,
407     BuiltInHelperInvocation = 23,
408     BuiltInNumWorkgroups = 24,
409     BuiltInWorkgroupSize = 25,
410     BuiltInWorkgroupId = 26,
411     BuiltInLocalInvocationId = 27,
412     BuiltInGlobalInvocationId = 28,
413     BuiltInLocalInvocationIndex = 29,
414     BuiltInWorkDim = 30,
415     BuiltInGlobalSize = 31,
416     BuiltInEnqueuedWorkgroupSize = 32,
417     BuiltInGlobalOffset = 33,
418     BuiltInGlobalLinearId = 34,
419     BuiltInSubgroupSize = 36,
420     BuiltInSubgroupMaxSize = 37,
421     BuiltInNumSubgroups = 38,
422     BuiltInNumEnqueuedSubgroups = 39,
423     BuiltInSubgroupId = 40,
424     BuiltInSubgroupLocalInvocationId = 41,
425     BuiltInVertexIndex = 42,
426     BuiltInInstanceIndex = 43,
427     BuiltInSubgroupEqMaskKHR = 4416,
428     BuiltInSubgroupGeMaskKHR = 4417,
429     BuiltInSubgroupGtMaskKHR = 4418,
430     BuiltInSubgroupLeMaskKHR = 4419,
431     BuiltInSubgroupLtMaskKHR = 4420,
432     BuiltInBaseVertex = 4424,
433     BuiltInBaseInstance = 4425,
434     BuiltInDrawIndex = 4426,
435     BuiltInMax = 0x7fffffff,
436 };
437 
438 enum SelectionControlShift {
439     SelectionControlFlattenShift = 0,
440     SelectionControlDontFlattenShift = 1,
441     SelectionControlMax = 0x7fffffff,
442 };
443 
444 enum SelectionControlMask {
445     SelectionControlMaskNone = 0,
446     SelectionControlFlattenMask = 0x00000001,
447     SelectionControlDontFlattenMask = 0x00000002,
448 };
449 
450 enum LoopControlShift {
451     LoopControlUnrollShift = 0,
452     LoopControlDontUnrollShift = 1,
453     LoopControlDependencyInfiniteShift = 2,
454     LoopControlDependencyLengthShift = 3,
455     LoopControlMax = 0x7fffffff,
456 };
457 
458 enum LoopControlMask {
459     LoopControlMaskNone = 0,
460     LoopControlUnrollMask = 0x00000001,
461     LoopControlDontUnrollMask = 0x00000002,
462     LoopControlDependencyInfiniteMask = 0x00000004,
463     LoopControlDependencyLengthMask = 0x00000008,
464 };
465 
466 enum FunctionControlShift {
467     FunctionControlInlineShift = 0,
468     FunctionControlDontInlineShift = 1,
469     FunctionControlPureShift = 2,
470     FunctionControlConstShift = 3,
471     FunctionControlMax = 0x7fffffff,
472 };
473 
474 enum FunctionControlMask {
475     FunctionControlMaskNone = 0,
476     FunctionControlInlineMask = 0x00000001,
477     FunctionControlDontInlineMask = 0x00000002,
478     FunctionControlPureMask = 0x00000004,
479     FunctionControlConstMask = 0x00000008,
480 };
481 
482 enum MemorySemanticsShift {
483     MemorySemanticsAcquireShift = 1,
484     MemorySemanticsReleaseShift = 2,
485     MemorySemanticsAcquireReleaseShift = 3,
486     MemorySemanticsSequentiallyConsistentShift = 4,
487     MemorySemanticsUniformMemoryShift = 6,
488     MemorySemanticsSubgroupMemoryShift = 7,
489     MemorySemanticsWorkgroupMemoryShift = 8,
490     MemorySemanticsCrossWorkgroupMemoryShift = 9,
491     MemorySemanticsAtomicCounterMemoryShift = 10,
492     MemorySemanticsImageMemoryShift = 11,
493     MemorySemanticsMax = 0x7fffffff,
494 };
495 
496 enum MemorySemanticsMask {
497     MemorySemanticsMaskNone = 0,
498     MemorySemanticsAcquireMask = 0x00000002,
499     MemorySemanticsReleaseMask = 0x00000004,
500     MemorySemanticsAcquireReleaseMask = 0x00000008,
501     MemorySemanticsSequentiallyConsistentMask = 0x00000010,
502     MemorySemanticsUniformMemoryMask = 0x00000040,
503     MemorySemanticsSubgroupMemoryMask = 0x00000080,
504     MemorySemanticsWorkgroupMemoryMask = 0x00000100,
505     MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
506     MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
507     MemorySemanticsImageMemoryMask = 0x00000800,
508 };
509 
510 enum MemoryAccessShift {
511     MemoryAccessVolatileShift = 0,
512     MemoryAccessAlignedShift = 1,
513     MemoryAccessNontemporalShift = 2,
514     MemoryAccessMax = 0x7fffffff,
515 };
516 
517 enum MemoryAccessMask {
518     MemoryAccessMaskNone = 0,
519     MemoryAccessVolatileMask = 0x00000001,
520     MemoryAccessAlignedMask = 0x00000002,
521     MemoryAccessNontemporalMask = 0x00000004,
522 };
523 
524 enum Scope {
525     ScopeCrossDevice = 0,
526     ScopeDevice = 1,
527     ScopeWorkgroup = 2,
528     ScopeSubgroup = 3,
529     ScopeInvocation = 4,
530     ScopeMax = 0x7fffffff,
531 };
532 
533 enum GroupOperation {
534     GroupOperationReduce = 0,
535     GroupOperationInclusiveScan = 1,
536     GroupOperationExclusiveScan = 2,
537     GroupOperationMax = 0x7fffffff,
538 };
539 
540 enum KernelEnqueueFlags {
541     KernelEnqueueFlagsNoWait = 0,
542     KernelEnqueueFlagsWaitKernel = 1,
543     KernelEnqueueFlagsWaitWorkGroup = 2,
544     KernelEnqueueFlagsMax = 0x7fffffff,
545 };
546 
547 enum KernelProfilingInfoShift {
548     KernelProfilingInfoCmdExecTimeShift = 0,
549     KernelProfilingInfoMax = 0x7fffffff,
550 };
551 
552 enum KernelProfilingInfoMask {
553     KernelProfilingInfoMaskNone = 0,
554     KernelProfilingInfoCmdExecTimeMask = 0x00000001,
555 };
556 
557 enum Capability {
558     CapabilityMatrix = 0,
559     CapabilityShader = 1,
560     CapabilityGeometry = 2,
561     CapabilityTessellation = 3,
562     CapabilityAddresses = 4,
563     CapabilityLinkage = 5,
564     CapabilityKernel = 6,
565     CapabilityVector16 = 7,
566     CapabilityFloat16Buffer = 8,
567     CapabilityFloat16 = 9,
568     CapabilityFloat64 = 10,
569     CapabilityInt64 = 11,
570     CapabilityInt64Atomics = 12,
571     CapabilityImageBasic = 13,
572     CapabilityImageReadWrite = 14,
573     CapabilityImageMipmap = 15,
574     CapabilityPipes = 17,
575     CapabilityGroups = 18,
576     CapabilityDeviceEnqueue = 19,
577     CapabilityLiteralSampler = 20,
578     CapabilityAtomicStorage = 21,
579     CapabilityInt16 = 22,
580     CapabilityTessellationPointSize = 23,
581     CapabilityGeometryPointSize = 24,
582     CapabilityImageGatherExtended = 25,
583     CapabilityStorageImageMultisample = 27,
584     CapabilityUniformBufferArrayDynamicIndexing = 28,
585     CapabilitySampledImageArrayDynamicIndexing = 29,
586     CapabilityStorageBufferArrayDynamicIndexing = 30,
587     CapabilityStorageImageArrayDynamicIndexing = 31,
588     CapabilityClipDistance = 32,
589     CapabilityCullDistance = 33,
590     CapabilityImageCubeArray = 34,
591     CapabilitySampleRateShading = 35,
592     CapabilityImageRect = 36,
593     CapabilitySampledRect = 37,
594     CapabilityGenericPointer = 38,
595     CapabilityInt8 = 39,
596     CapabilityInputAttachment = 40,
597     CapabilitySparseResidency = 41,
598     CapabilityMinLod = 42,
599     CapabilitySampled1D = 43,
600     CapabilityImage1D = 44,
601     CapabilitySampledCubeArray = 45,
602     CapabilitySampledBuffer = 46,
603     CapabilityImageBuffer = 47,
604     CapabilityImageMSArray = 48,
605     CapabilityStorageImageExtendedFormats = 49,
606     CapabilityImageQuery = 50,
607     CapabilityDerivativeControl = 51,
608     CapabilityInterpolationFunction = 52,
609     CapabilityTransformFeedback = 53,
610     CapabilityGeometryStreams = 54,
611     CapabilityStorageImageReadWithoutFormat = 55,
612     CapabilityStorageImageWriteWithoutFormat = 56,
613     CapabilityMultiViewport = 57,
614     CapabilitySubgroupDispatch = 58,
615     CapabilityNamedBarrier = 59,
616     CapabilityPipeStorage = 60,
617     CapabilitySubgroupBallotKHR = 4423,
618     CapabilityDrawParameters = 4427,
619     CapabilityMax = 0x7fffffff,
620 };
621 
622 enum Op {
623     OpNop = 0,
624     OpUndef = 1,
625     OpSourceContinued = 2,
626     OpSource = 3,
627     OpSourceExtension = 4,
628     OpName = 5,
629     OpMemberName = 6,
630     OpString = 7,
631     OpLine = 8,
632     OpExtension = 10,
633     OpExtInstImport = 11,
634     OpExtInst = 12,
635     OpMemoryModel = 14,
636     OpEntryPoint = 15,
637     OpExecutionMode = 16,
638     OpCapability = 17,
639     OpTypeVoid = 19,
640     OpTypeBool = 20,
641     OpTypeInt = 21,
642     OpTypeFloat = 22,
643     OpTypeVector = 23,
644     OpTypeMatrix = 24,
645     OpTypeImage = 25,
646     OpTypeSampler = 26,
647     OpTypeSampledImage = 27,
648     OpTypeArray = 28,
649     OpTypeRuntimeArray = 29,
650     OpTypeStruct = 30,
651     OpTypeOpaque = 31,
652     OpTypePointer = 32,
653     OpTypeFunction = 33,
654     OpTypeEvent = 34,
655     OpTypeDeviceEvent = 35,
656     OpTypeReserveId = 36,
657     OpTypeQueue = 37,
658     OpTypePipe = 38,
659     OpTypeForwardPointer = 39,
660     OpConstantTrue = 41,
661     OpConstantFalse = 42,
662     OpConstant = 43,
663     OpConstantComposite = 44,
664     OpConstantSampler = 45,
665     OpConstantNull = 46,
666     OpSpecConstantTrue = 48,
667     OpSpecConstantFalse = 49,
668     OpSpecConstant = 50,
669     OpSpecConstantComposite = 51,
670     OpSpecConstantOp = 52,
671     OpFunction = 54,
672     OpFunctionParameter = 55,
673     OpFunctionEnd = 56,
674     OpFunctionCall = 57,
675     OpVariable = 59,
676     OpImageTexelPointer = 60,
677     OpLoad = 61,
678     OpStore = 62,
679     OpCopyMemory = 63,
680     OpCopyMemorySized = 64,
681     OpAccessChain = 65,
682     OpInBoundsAccessChain = 66,
683     OpPtrAccessChain = 67,
684     OpArrayLength = 68,
685     OpGenericPtrMemSemantics = 69,
686     OpInBoundsPtrAccessChain = 70,
687     OpDecorate = 71,
688     OpMemberDecorate = 72,
689     OpDecorationGroup = 73,
690     OpGroupDecorate = 74,
691     OpGroupMemberDecorate = 75,
692     OpVectorExtractDynamic = 77,
693     OpVectorInsertDynamic = 78,
694     OpVectorShuffle = 79,
695     OpCompositeConstruct = 80,
696     OpCompositeExtract = 81,
697     OpCompositeInsert = 82,
698     OpCopyObject = 83,
699     OpTranspose = 84,
700     OpSampledImage = 86,
701     OpImageSampleImplicitLod = 87,
702     OpImageSampleExplicitLod = 88,
703     OpImageSampleDrefImplicitLod = 89,
704     OpImageSampleDrefExplicitLod = 90,
705     OpImageSampleProjImplicitLod = 91,
706     OpImageSampleProjExplicitLod = 92,
707     OpImageSampleProjDrefImplicitLod = 93,
708     OpImageSampleProjDrefExplicitLod = 94,
709     OpImageFetch = 95,
710     OpImageGather = 96,
711     OpImageDrefGather = 97,
712     OpImageRead = 98,
713     OpImageWrite = 99,
714     OpImage = 100,
715     OpImageQueryFormat = 101,
716     OpImageQueryOrder = 102,
717     OpImageQuerySizeLod = 103,
718     OpImageQuerySize = 104,
719     OpImageQueryLod = 105,
720     OpImageQueryLevels = 106,
721     OpImageQuerySamples = 107,
722     OpConvertFToU = 109,
723     OpConvertFToS = 110,
724     OpConvertSToF = 111,
725     OpConvertUToF = 112,
726     OpUConvert = 113,
727     OpSConvert = 114,
728     OpFConvert = 115,
729     OpQuantizeToF16 = 116,
730     OpConvertPtrToU = 117,
731     OpSatConvertSToU = 118,
732     OpSatConvertUToS = 119,
733     OpConvertUToPtr = 120,
734     OpPtrCastToGeneric = 121,
735     OpGenericCastToPtr = 122,
736     OpGenericCastToPtrExplicit = 123,
737     OpBitcast = 124,
738     OpSNegate = 126,
739     OpFNegate = 127,
740     OpIAdd = 128,
741     OpFAdd = 129,
742     OpISub = 130,
743     OpFSub = 131,
744     OpIMul = 132,
745     OpFMul = 133,
746     OpUDiv = 134,
747     OpSDiv = 135,
748     OpFDiv = 136,
749     OpUMod = 137,
750     OpSRem = 138,
751     OpSMod = 139,
752     OpFRem = 140,
753     OpFMod = 141,
754     OpVectorTimesScalar = 142,
755     OpMatrixTimesScalar = 143,
756     OpVectorTimesMatrix = 144,
757     OpMatrixTimesVector = 145,
758     OpMatrixTimesMatrix = 146,
759     OpOuterProduct = 147,
760     OpDot = 148,
761     OpIAddCarry = 149,
762     OpISubBorrow = 150,
763     OpUMulExtended = 151,
764     OpSMulExtended = 152,
765     OpAny = 154,
766     OpAll = 155,
767     OpIsNan = 156,
768     OpIsInf = 157,
769     OpIsFinite = 158,
770     OpIsNormal = 159,
771     OpSignBitSet = 160,
772     OpLessOrGreater = 161,
773     OpOrdered = 162,
774     OpUnordered = 163,
775     OpLogicalEqual = 164,
776     OpLogicalNotEqual = 165,
777     OpLogicalOr = 166,
778     OpLogicalAnd = 167,
779     OpLogicalNot = 168,
780     OpSelect = 169,
781     OpIEqual = 170,
782     OpINotEqual = 171,
783     OpUGreaterThan = 172,
784     OpSGreaterThan = 173,
785     OpUGreaterThanEqual = 174,
786     OpSGreaterThanEqual = 175,
787     OpULessThan = 176,
788     OpSLessThan = 177,
789     OpULessThanEqual = 178,
790     OpSLessThanEqual = 179,
791     OpFOrdEqual = 180,
792     OpFUnordEqual = 181,
793     OpFOrdNotEqual = 182,
794     OpFUnordNotEqual = 183,
795     OpFOrdLessThan = 184,
796     OpFUnordLessThan = 185,
797     OpFOrdGreaterThan = 186,
798     OpFUnordGreaterThan = 187,
799     OpFOrdLessThanEqual = 188,
800     OpFUnordLessThanEqual = 189,
801     OpFOrdGreaterThanEqual = 190,
802     OpFUnordGreaterThanEqual = 191,
803     OpShiftRightLogical = 194,
804     OpShiftRightArithmetic = 195,
805     OpShiftLeftLogical = 196,
806     OpBitwiseOr = 197,
807     OpBitwiseXor = 198,
808     OpBitwiseAnd = 199,
809     OpNot = 200,
810     OpBitFieldInsert = 201,
811     OpBitFieldSExtract = 202,
812     OpBitFieldUExtract = 203,
813     OpBitReverse = 204,
814     OpBitCount = 205,
815     OpDPdx = 207,
816     OpDPdy = 208,
817     OpFwidth = 209,
818     OpDPdxFine = 210,
819     OpDPdyFine = 211,
820     OpFwidthFine = 212,
821     OpDPdxCoarse = 213,
822     OpDPdyCoarse = 214,
823     OpFwidthCoarse = 215,
824     OpEmitVertex = 218,
825     OpEndPrimitive = 219,
826     OpEmitStreamVertex = 220,
827     OpEndStreamPrimitive = 221,
828     OpControlBarrier = 224,
829     OpMemoryBarrier = 225,
830     OpAtomicLoad = 227,
831     OpAtomicStore = 228,
832     OpAtomicExchange = 229,
833     OpAtomicCompareExchange = 230,
834     OpAtomicCompareExchangeWeak = 231,
835     OpAtomicIIncrement = 232,
836     OpAtomicIDecrement = 233,
837     OpAtomicIAdd = 234,
838     OpAtomicISub = 235,
839     OpAtomicSMin = 236,
840     OpAtomicUMin = 237,
841     OpAtomicSMax = 238,
842     OpAtomicUMax = 239,
843     OpAtomicAnd = 240,
844     OpAtomicOr = 241,
845     OpAtomicXor = 242,
846     OpPhi = 245,
847     OpLoopMerge = 246,
848     OpSelectionMerge = 247,
849     OpLabel = 248,
850     OpBranch = 249,
851     OpBranchConditional = 250,
852     OpSwitch = 251,
853     OpKill = 252,
854     OpReturn = 253,
855     OpReturnValue = 254,
856     OpUnreachable = 255,
857     OpLifetimeStart = 256,
858     OpLifetimeStop = 257,
859     OpGroupAsyncCopy = 259,
860     OpGroupWaitEvents = 260,
861     OpGroupAll = 261,
862     OpGroupAny = 262,
863     OpGroupBroadcast = 263,
864     OpGroupIAdd = 264,
865     OpGroupFAdd = 265,
866     OpGroupFMin = 266,
867     OpGroupUMin = 267,
868     OpGroupSMin = 268,
869     OpGroupFMax = 269,
870     OpGroupUMax = 270,
871     OpGroupSMax = 271,
872     OpReadPipe = 274,
873     OpWritePipe = 275,
874     OpReservedReadPipe = 276,
875     OpReservedWritePipe = 277,
876     OpReserveReadPipePackets = 278,
877     OpReserveWritePipePackets = 279,
878     OpCommitReadPipe = 280,
879     OpCommitWritePipe = 281,
880     OpIsValidReserveId = 282,
881     OpGetNumPipePackets = 283,
882     OpGetMaxPipePackets = 284,
883     OpGroupReserveReadPipePackets = 285,
884     OpGroupReserveWritePipePackets = 286,
885     OpGroupCommitReadPipe = 287,
886     OpGroupCommitWritePipe = 288,
887     OpEnqueueMarker = 291,
888     OpEnqueueKernel = 292,
889     OpGetKernelNDrangeSubGroupCount = 293,
890     OpGetKernelNDrangeMaxSubGroupSize = 294,
891     OpGetKernelWorkGroupSize = 295,
892     OpGetKernelPreferredWorkGroupSizeMultiple = 296,
893     OpRetainEvent = 297,
894     OpReleaseEvent = 298,
895     OpCreateUserEvent = 299,
896     OpIsValidEvent = 300,
897     OpSetUserEventStatus = 301,
898     OpCaptureEventProfilingInfo = 302,
899     OpGetDefaultQueue = 303,
900     OpBuildNDRange = 304,
901     OpImageSparseSampleImplicitLod = 305,
902     OpImageSparseSampleExplicitLod = 306,
903     OpImageSparseSampleDrefImplicitLod = 307,
904     OpImageSparseSampleDrefExplicitLod = 308,
905     OpImageSparseSampleProjImplicitLod = 309,
906     OpImageSparseSampleProjExplicitLod = 310,
907     OpImageSparseSampleProjDrefImplicitLod = 311,
908     OpImageSparseSampleProjDrefExplicitLod = 312,
909     OpImageSparseFetch = 313,
910     OpImageSparseGather = 314,
911     OpImageSparseDrefGather = 315,
912     OpImageSparseTexelsResident = 316,
913     OpNoLine = 317,
914     OpAtomicFlagTestAndSet = 318,
915     OpAtomicFlagClear = 319,
916     OpImageSparseRead = 320,
917     OpSizeOf = 321,
918     OpTypePipeStorage = 322,
919     OpConstantPipeStorage = 323,
920     OpCreatePipeFromPipeStorage = 324,
921     OpGetKernelLocalSizeForSubgroupCount = 325,
922     OpGetKernelMaxNumSubgroups = 326,
923     OpTypeNamedBarrier = 327,
924     OpNamedBarrierInitialize = 328,
925     OpMemoryNamedBarrier = 329,
926     OpModuleProcessed = 330,
927     OpSubgroupBallotKHR = 4421,
928     OpSubgroupFirstInvocationKHR = 4422,
929     OpMax = 0x7fffffff,
930 };
931 
932 // Overload operator| for mask bit combining
933 
operator |(ImageOperandsMask a,ImageOperandsMask b)934 inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
operator |(FPFastMathModeMask a,FPFastMathModeMask b)935 inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
operator |(SelectionControlMask a,SelectionControlMask b)936 inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
operator |(LoopControlMask a,LoopControlMask b)937 inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
operator |(FunctionControlMask a,FunctionControlMask b)938 inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
operator |(MemorySemanticsMask a,MemorySemanticsMask b)939 inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
operator |(MemoryAccessMask a,MemoryAccessMask b)940 inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
operator |(KernelProfilingInfoMask a,KernelProfilingInfoMask b)941 inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
942 
943 }  // end namespace spv
944 
945 #endif  // #ifndef spirv_HPP
946 
947