1 # Copyright (c) 2014-2017 The Khronos Group Inc.
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:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Materials.
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/
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
25 # This header is automatically generated by the same tool that creates
26 # the Binary Section of the SPIR-V specification.
28 # Enumeration tokens for SPIR-V, in various styles:
29 # C, C++, C++11, JSON, Lua, Python
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']
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.
43 'MagicNumber' : 0x07230203,
44 'Version' : 0x00010000,
46 'OpCodeMask' : 0xffff,
47 'WordCountShift' : 16,
59 'TessellationControl' : 1,
60 'TessellationEvaluation' : 2,
82 'SpacingFractionalEven' : 2,
83 'SpacingFractionalOdd' : 3,
86 'PixelCenterInteger' : 6,
87 'OriginUpperLeft' : 7,
88 'OriginLowerLeft' : 8,
89 'EarlyFragmentTests' : 9,
92 'DepthReplacing' : 12,
95 'DepthUnchanged' : 16,
100 'InputLinesAdjacency' : 21,
102 'InputTrianglesAdjacency' : 23,
105 'OutputVertices' : 26,
107 'OutputLineStrip' : 28,
108 'OutputTriangleStrip' : 29,
110 'ContractionOff' : 31,
114 'UniformConstant' : 0,
119 'CrossWorkgroup' : 5,
124 'AtomicCounter' : 10,
138 'SamplerAddressingMode' : {
143 'RepeatMirrored' : 4,
146 'SamplerFilterMode' : {
194 'ImageChannelOrder' : {
217 'ImageChannelDataType' : {
224 'UnormInt101010' : 6,
229 'UnsignedInt16' : 11,
230 'UnsignedInt32' : 12,
234 'UnormInt101010_2' : 16,
237 'ImageOperandsShift' : {
248 'ImageOperandsMask' : {
253 'ConstOffset' : 0x00000008,
254 'Offset' : 0x00000010,
255 'ConstOffsets' : 0x00000020,
256 'Sample' : 0x00000040,
257 'MinLod' : 0x00000080,
260 'FPFastMathModeShift' : {
268 'FPFastMathModeMask' : {
270 'NotNaN' : 0x00000001,
271 'NotInf' : 0x00000002,
273 'AllowRecip' : 0x00000008,
289 'AccessQualifier' : {
295 'FunctionParameterAttribute' : {
307 'RelaxedPrecision' : 0,
319 'NoPerspective' : 13,
333 'SaturatedConversion' : 28,
339 'DescriptorSet' : 34,
343 'FuncParamAttr' : 38,
344 'FPRoundingMode' : 39,
345 'FPFastMathMode' : 40,
346 'LinkageAttributes' : 41,
347 'NoContraction' : 42,
348 'InputAttachmentIndex' : 43,
362 'ViewportIndex' : 10,
363 'TessLevelOuter' : 11,
364 'TessLevelInner' : 12,
366 'PatchVertices' : 14,
371 'SamplePosition' : 19,
374 'HelperInvocation' : 23,
375 'NumWorkgroups' : 24,
376 'WorkgroupSize' : 25,
378 'LocalInvocationId' : 27,
379 'GlobalInvocationId' : 28,
380 'LocalInvocationIndex' : 29,
383 'EnqueuedWorkgroupSize' : 32,
385 'GlobalLinearId' : 34,
387 'SubgroupMaxSize' : 37,
389 'NumEnqueuedSubgroups' : 39,
391 'SubgroupLocalInvocationId' : 41,
393 'InstanceIndex' : 43,
394 'SubgroupEqMaskKHR' : 4416,
395 'SubgroupGeMaskKHR' : 4417,
396 'SubgroupGtMaskKHR' : 4418,
397 'SubgroupLeMaskKHR' : 4419,
398 'SubgroupLtMaskKHR' : 4420,
400 'BaseInstance' : 4425,
404 'SelectionControlShift' : {
409 'SelectionControlMask' : {
411 'Flatten' : 0x00000001,
412 'DontFlatten' : 0x00000002,
415 'LoopControlShift' : {
420 'LoopControlMask' : {
422 'Unroll' : 0x00000001,
423 'DontUnroll' : 0x00000002,
426 'FunctionControlShift' : {
433 'FunctionControlMask' : {
435 'Inline' : 0x00000001,
436 'DontInline' : 0x00000002,
438 'Const' : 0x00000008,
441 'MemorySemanticsShift' : {
444 'AcquireRelease' : 3,
445 'SequentiallyConsistent' : 4,
447 'SubgroupMemory' : 7,
448 'WorkgroupMemory' : 8,
449 'CrossWorkgroupMemory' : 9,
450 'AtomicCounterMemory' : 10,
454 'MemorySemanticsMask' : {
456 'Acquire' : 0x00000002,
457 'Release' : 0x00000004,
458 'AcquireRelease' : 0x00000008,
459 'SequentiallyConsistent' : 0x00000010,
460 'UniformMemory' : 0x00000040,
461 'SubgroupMemory' : 0x00000080,
462 'WorkgroupMemory' : 0x00000100,
463 'CrossWorkgroupMemory' : 0x00000200,
464 'AtomicCounterMemory' : 0x00000400,
465 'ImageMemory' : 0x00000800,
468 'MemoryAccessShift' : {
474 'MemoryAccessMask' : {
476 'Volatile' : 0x00000001,
477 'Aligned' : 0x00000002,
478 'Nontemporal' : 0x00000004,
495 'KernelEnqueueFlags' : {
501 'KernelProfilingInfoShift' : {
505 'KernelProfilingInfoMask' : {
507 'CmdExecTime' : 0x00000001,
525 'ImageReadWrite' : 14,
529 'DeviceEnqueue' : 19,
530 'LiteralSampler' : 20,
531 'AtomicStorage' : 21,
533 'TessellationPointSize' : 23,
534 'GeometryPointSize' : 24,
535 'ImageGatherExtended' : 25,
536 'StorageImageMultisample' : 27,
537 'UniformBufferArrayDynamicIndexing' : 28,
538 'SampledImageArrayDynamicIndexing' : 29,
539 'StorageBufferArrayDynamicIndexing' : 30,
540 'StorageImageArrayDynamicIndexing' : 31,
543 'ImageCubeArray' : 34,
544 'SampleRateShading' : 35,
547 'GenericPointer' : 38,
549 'InputAttachment' : 40,
550 'SparseResidency' : 41,
554 'SampledCubeArray' : 45,
555 'SampledBuffer' : 46,
558 'StorageImageExtendedFormats' : 49,
560 'DerivativeControl' : 51,
561 'InterpolationFunction' : 52,
562 'TransformFeedback' : 53,
563 'GeometryStreams' : 54,
564 'StorageImageReadWithoutFormat' : 55,
565 'StorageImageWriteWithoutFormat' : 56,
566 'MultiViewport' : 57,
567 'SubgroupBallotKHR' : 4423,
568 'DrawParameters' : 4427,
569 'SubgroupVoteKHR' : 4431,
575 'OpSourceContinued' : 2,
577 'OpSourceExtension' : 4,
583 'OpExtInstImport' : 11,
585 'OpMemoryModel' : 14,
587 'OpExecutionMode' : 16,
596 'OpTypeSampler' : 26,
597 'OpTypeSampledImage' : 27,
599 'OpTypeRuntimeArray' : 29,
602 'OpTypePointer' : 32,
603 'OpTypeFunction' : 33,
605 'OpTypeDeviceEvent' : 35,
606 'OpTypeReserveId' : 36,
609 'OpTypeForwardPointer' : 39,
610 'OpConstantTrue' : 41,
611 'OpConstantFalse' : 42,
613 'OpConstantComposite' : 44,
614 'OpConstantSampler' : 45,
615 'OpConstantNull' : 46,
616 'OpSpecConstantTrue' : 48,
617 'OpSpecConstantFalse' : 49,
618 'OpSpecConstant' : 50,
619 'OpSpecConstantComposite' : 51,
620 'OpSpecConstantOp' : 52,
622 'OpFunctionParameter' : 55,
623 'OpFunctionEnd' : 56,
624 'OpFunctionCall' : 57,
626 'OpImageTexelPointer' : 60,
630 'OpCopyMemorySized' : 64,
631 'OpAccessChain' : 65,
632 'OpInBoundsAccessChain' : 66,
633 'OpPtrAccessChain' : 67,
634 'OpArrayLength' : 68,
635 'OpGenericPtrMemSemantics' : 69,
636 'OpInBoundsPtrAccessChain' : 70,
638 'OpMemberDecorate' : 72,
639 'OpDecorationGroup' : 73,
640 'OpGroupDecorate' : 74,
641 'OpGroupMemberDecorate' : 75,
642 'OpVectorExtractDynamic' : 77,
643 'OpVectorInsertDynamic' : 78,
644 'OpVectorShuffle' : 79,
645 'OpCompositeConstruct' : 80,
646 'OpCompositeExtract' : 81,
647 'OpCompositeInsert' : 82,
650 'OpSampledImage' : 86,
651 'OpImageSampleImplicitLod' : 87,
652 'OpImageSampleExplicitLod' : 88,
653 'OpImageSampleDrefImplicitLod' : 89,
654 'OpImageSampleDrefExplicitLod' : 90,
655 'OpImageSampleProjImplicitLod' : 91,
656 'OpImageSampleProjExplicitLod' : 92,
657 'OpImageSampleProjDrefImplicitLod' : 93,
658 'OpImageSampleProjDrefExplicitLod' : 94,
660 'OpImageGather' : 96,
661 'OpImageDrefGather' : 97,
665 'OpImageQueryFormat' : 101,
666 'OpImageQueryOrder' : 102,
667 'OpImageQuerySizeLod' : 103,
668 'OpImageQuerySize' : 104,
669 'OpImageQueryLod' : 105,
670 'OpImageQueryLevels' : 106,
671 'OpImageQuerySamples' : 107,
672 'OpConvertFToU' : 109,
673 'OpConvertFToS' : 110,
674 'OpConvertSToF' : 111,
675 'OpConvertUToF' : 112,
679 'OpQuantizeToF16' : 116,
680 'OpConvertPtrToU' : 117,
681 'OpSatConvertSToU' : 118,
682 'OpSatConvertUToS' : 119,
683 'OpConvertUToPtr' : 120,
684 'OpPtrCastToGeneric' : 121,
685 'OpGenericCastToPtr' : 122,
686 'OpGenericCastToPtrExplicit' : 123,
704 'OpVectorTimesScalar' : 142,
705 'OpMatrixTimesScalar' : 143,
706 'OpVectorTimesMatrix' : 144,
707 'OpMatrixTimesVector' : 145,
708 'OpMatrixTimesMatrix' : 146,
709 'OpOuterProduct' : 147,
712 'OpISubBorrow' : 150,
713 'OpUMulExtended' : 151,
714 'OpSMulExtended' : 152,
721 'OpSignBitSet' : 160,
722 'OpLessOrGreater' : 161,
725 'OpLogicalEqual' : 164,
726 'OpLogicalNotEqual' : 165,
728 'OpLogicalAnd' : 167,
729 'OpLogicalNot' : 168,
733 'OpUGreaterThan' : 172,
734 'OpSGreaterThan' : 173,
735 'OpUGreaterThanEqual' : 174,
736 'OpSGreaterThanEqual' : 175,
739 'OpULessThanEqual' : 178,
740 'OpSLessThanEqual' : 179,
742 'OpFUnordEqual' : 181,
743 'OpFOrdNotEqual' : 182,
744 'OpFUnordNotEqual' : 183,
745 'OpFOrdLessThan' : 184,
746 'OpFUnordLessThan' : 185,
747 'OpFOrdGreaterThan' : 186,
748 'OpFUnordGreaterThan' : 187,
749 'OpFOrdLessThanEqual' : 188,
750 'OpFUnordLessThanEqual' : 189,
751 'OpFOrdGreaterThanEqual' : 190,
752 'OpFUnordGreaterThanEqual' : 191,
753 'OpShiftRightLogical' : 194,
754 'OpShiftRightArithmetic' : 195,
755 'OpShiftLeftLogical' : 196,
757 'OpBitwiseXor' : 198,
758 'OpBitwiseAnd' : 199,
760 'OpBitFieldInsert' : 201,
761 'OpBitFieldSExtract' : 202,
762 'OpBitFieldUExtract' : 203,
763 'OpBitReverse' : 204,
770 'OpFwidthFine' : 212,
771 'OpDPdxCoarse' : 213,
772 'OpDPdyCoarse' : 214,
773 'OpFwidthCoarse' : 215,
774 'OpEmitVertex' : 218,
775 'OpEndPrimitive' : 219,
776 'OpEmitStreamVertex' : 220,
777 'OpEndStreamPrimitive' : 221,
778 'OpControlBarrier' : 224,
779 'OpMemoryBarrier' : 225,
780 'OpAtomicLoad' : 227,
781 'OpAtomicStore' : 228,
782 'OpAtomicExchange' : 229,
783 'OpAtomicCompareExchange' : 230,
784 'OpAtomicCompareExchangeWeak' : 231,
785 'OpAtomicIIncrement' : 232,
786 'OpAtomicIDecrement' : 233,
787 'OpAtomicIAdd' : 234,
788 'OpAtomicISub' : 235,
789 'OpAtomicSMin' : 236,
790 'OpAtomicUMin' : 237,
791 'OpAtomicSMax' : 238,
792 'OpAtomicUMax' : 239,
798 'OpSelectionMerge' : 247,
801 'OpBranchConditional' : 250,
805 'OpReturnValue' : 254,
806 'OpUnreachable' : 255,
807 'OpLifetimeStart' : 256,
808 'OpLifetimeStop' : 257,
809 'OpGroupAsyncCopy' : 259,
810 'OpGroupWaitEvents' : 260,
813 'OpGroupBroadcast' : 263,
824 'OpReservedReadPipe' : 276,
825 'OpReservedWritePipe' : 277,
826 'OpReserveReadPipePackets' : 278,
827 'OpReserveWritePipePackets' : 279,
828 'OpCommitReadPipe' : 280,
829 'OpCommitWritePipe' : 281,
830 'OpIsValidReserveId' : 282,
831 'OpGetNumPipePackets' : 283,
832 'OpGetMaxPipePackets' : 284,
833 'OpGroupReserveReadPipePackets' : 285,
834 'OpGroupReserveWritePipePackets' : 286,
835 'OpGroupCommitReadPipe' : 287,
836 'OpGroupCommitWritePipe' : 288,
837 'OpEnqueueMarker' : 291,
838 'OpEnqueueKernel' : 292,
839 'OpGetKernelNDrangeSubGroupCount' : 293,
840 'OpGetKernelNDrangeMaxSubGroupSize' : 294,
841 'OpGetKernelWorkGroupSize' : 295,
842 'OpGetKernelPreferredWorkGroupSizeMultiple' : 296,
843 'OpRetainEvent' : 297,
844 'OpReleaseEvent' : 298,
845 'OpCreateUserEvent' : 299,
846 'OpIsValidEvent' : 300,
847 'OpSetUserEventStatus' : 301,
848 'OpCaptureEventProfilingInfo' : 302,
849 'OpGetDefaultQueue' : 303,
850 'OpBuildNDRange' : 304,
851 'OpImageSparseSampleImplicitLod' : 305,
852 'OpImageSparseSampleExplicitLod' : 306,
853 'OpImageSparseSampleDrefImplicitLod' : 307,
854 'OpImageSparseSampleDrefExplicitLod' : 308,
855 'OpImageSparseSampleProjImplicitLod' : 309,
856 'OpImageSparseSampleProjExplicitLod' : 310,
857 'OpImageSparseSampleProjDrefImplicitLod' : 311,
858 'OpImageSparseSampleProjDrefExplicitLod' : 312,
859 'OpImageSparseFetch' : 313,
860 'OpImageSparseGather' : 314,
861 'OpImageSparseDrefGather' : 315,
862 'OpImageSparseTexelsResident' : 316,
864 'OpAtomicFlagTestAndSet' : 318,
865 'OpAtomicFlagClear' : 319,
866 'OpImageSparseRead' : 320,
867 'OpSubgroupBallotKHR' : 4421,
868 'OpSubgroupFirstInvocationKHR' : 4422,
869 'OpSubgroupAllKHR' : 4428,
870 'OpSubgroupAnyKHR' : 4429,
871 'OpSubgroupAllEqualKHR' : 4430,
872 'OpSubgroupReadInvocationKHR' : 4432,