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' : 0x00010100,
46 'OpCodeMask' : 0xffff,
47 'WordCountShift' : 16,
60 'TessellationControl' : 1,
61 'TessellationEvaluation' : 2,
83 'SpacingFractionalEven' : 2,
84 'SpacingFractionalOdd' : 3,
87 'PixelCenterInteger' : 6,
88 'OriginUpperLeft' : 7,
89 'OriginLowerLeft' : 8,
90 'EarlyFragmentTests' : 9,
93 'DepthReplacing' : 12,
96 'DepthUnchanged' : 16,
101 'InputLinesAdjacency' : 21,
103 'InputTrianglesAdjacency' : 23,
106 'OutputVertices' : 26,
108 'OutputLineStrip' : 28,
109 'OutputTriangleStrip' : 29,
111 'ContractionOff' : 31,
115 'SubgroupsPerWorkgroup' : 36,
116 'PostDepthCoverage' : 4446,
120 'UniformConstant' : 0,
125 'CrossWorkgroup' : 5,
130 'AtomicCounter' : 10,
132 'StorageBuffer' : 12,
145 'SamplerAddressingMode' : {
150 'RepeatMirrored' : 4,
153 'SamplerFilterMode' : {
201 'ImageChannelOrder' : {
224 'ImageChannelDataType' : {
231 'UnormInt101010' : 6,
236 'UnsignedInt16' : 11,
237 'UnsignedInt32' : 12,
241 'UnormInt101010_2' : 16,
244 'ImageOperandsShift' : {
255 'ImageOperandsMask' : {
260 'ConstOffset' : 0x00000008,
261 'Offset' : 0x00000010,
262 'ConstOffsets' : 0x00000020,
263 'Sample' : 0x00000040,
264 'MinLod' : 0x00000080,
267 'FPFastMathModeShift' : {
275 'FPFastMathModeMask' : {
277 'NotNaN' : 0x00000001,
278 'NotInf' : 0x00000002,
280 'AllowRecip' : 0x00000008,
296 'AccessQualifier' : {
302 'FunctionParameterAttribute' : {
314 'RelaxedPrecision' : 0,
326 'NoPerspective' : 13,
340 'SaturatedConversion' : 28,
346 'DescriptorSet' : 34,
350 'FuncParamAttr' : 38,
351 'FPRoundingMode' : 39,
352 'FPFastMathMode' : 40,
353 'LinkageAttributes' : 41,
354 'NoContraction' : 42,
355 'InputAttachmentIndex' : 43,
357 'MaxByteOffset' : 45,
358 'ExplicitInterpAMD' : 4999,
359 'OverrideCoverageNV' : 5248,
360 'PassthroughNV' : 5250,
361 'ViewportRelativeNV' : 5252,
362 'SecondaryViewportRelativeNV' : 5256,
375 'ViewportIndex' : 10,
376 'TessLevelOuter' : 11,
377 'TessLevelInner' : 12,
379 'PatchVertices' : 14,
384 'SamplePosition' : 19,
387 'HelperInvocation' : 23,
388 'NumWorkgroups' : 24,
389 'WorkgroupSize' : 25,
391 'LocalInvocationId' : 27,
392 'GlobalInvocationId' : 28,
393 'LocalInvocationIndex' : 29,
396 'EnqueuedWorkgroupSize' : 32,
398 'GlobalLinearId' : 34,
400 'SubgroupMaxSize' : 37,
402 'NumEnqueuedSubgroups' : 39,
404 'SubgroupLocalInvocationId' : 41,
406 'InstanceIndex' : 43,
407 'SubgroupEqMaskKHR' : 4416,
408 'SubgroupGeMaskKHR' : 4417,
409 'SubgroupGtMaskKHR' : 4418,
410 'SubgroupLeMaskKHR' : 4419,
411 'SubgroupLtMaskKHR' : 4420,
413 'BaseInstance' : 4425,
415 'DeviceIndex' : 4438,
417 'BaryCoordNoPerspAMD' : 4992,
418 'BaryCoordNoPerspCentroidAMD' : 4993,
419 'BaryCoordNoPerspSampleAMD' : 4994,
420 'BaryCoordSmoothAMD' : 4995,
421 'BaryCoordSmoothCentroidAMD' : 4996,
422 'BaryCoordSmoothSampleAMD' : 4997,
423 'BaryCoordPullModelAMD' : 4998,
424 'ViewportMaskNV' : 5253,
425 'SecondaryPositionNV' : 5257,
426 'SecondaryViewportMaskNV' : 5258,
427 'PositionPerViewNV' : 5261,
428 'ViewportMaskPerViewNV' : 5262,
431 'SelectionControlShift' : {
436 'SelectionControlMask' : {
438 'Flatten' : 0x00000001,
439 'DontFlatten' : 0x00000002,
442 'LoopControlShift' : {
445 'DependencyInfinite' : 2,
446 'DependencyLength' : 3,
449 'LoopControlMask' : {
451 'Unroll' : 0x00000001,
452 'DontUnroll' : 0x00000002,
453 'DependencyInfinite' : 0x00000004,
454 'DependencyLength' : 0x00000008,
457 'FunctionControlShift' : {
464 'FunctionControlMask' : {
466 'Inline' : 0x00000001,
467 'DontInline' : 0x00000002,
469 'Const' : 0x00000008,
472 'MemorySemanticsShift' : {
475 'AcquireRelease' : 3,
476 'SequentiallyConsistent' : 4,
478 'SubgroupMemory' : 7,
479 'WorkgroupMemory' : 8,
480 'CrossWorkgroupMemory' : 9,
481 'AtomicCounterMemory' : 10,
485 'MemorySemanticsMask' : {
487 'Acquire' : 0x00000002,
488 'Release' : 0x00000004,
489 'AcquireRelease' : 0x00000008,
490 'SequentiallyConsistent' : 0x00000010,
491 'UniformMemory' : 0x00000040,
492 'SubgroupMemory' : 0x00000080,
493 'WorkgroupMemory' : 0x00000100,
494 'CrossWorkgroupMemory' : 0x00000200,
495 'AtomicCounterMemory' : 0x00000400,
496 'ImageMemory' : 0x00000800,
499 'MemoryAccessShift' : {
505 'MemoryAccessMask' : {
507 'Volatile' : 0x00000001,
508 'Aligned' : 0x00000002,
509 'Nontemporal' : 0x00000004,
526 'KernelEnqueueFlags' : {
532 'KernelProfilingInfoShift' : {
536 'KernelProfilingInfoMask' : {
538 'CmdExecTime' : 0x00000001,
556 'ImageReadWrite' : 14,
560 'DeviceEnqueue' : 19,
561 'LiteralSampler' : 20,
562 'AtomicStorage' : 21,
564 'TessellationPointSize' : 23,
565 'GeometryPointSize' : 24,
566 'ImageGatherExtended' : 25,
567 'StorageImageMultisample' : 27,
568 'UniformBufferArrayDynamicIndexing' : 28,
569 'SampledImageArrayDynamicIndexing' : 29,
570 'StorageBufferArrayDynamicIndexing' : 30,
571 'StorageImageArrayDynamicIndexing' : 31,
574 'ImageCubeArray' : 34,
575 'SampleRateShading' : 35,
578 'GenericPointer' : 38,
580 'InputAttachment' : 40,
581 'SparseResidency' : 41,
585 'SampledCubeArray' : 45,
586 'SampledBuffer' : 46,
589 'StorageImageExtendedFormats' : 49,
591 'DerivativeControl' : 51,
592 'InterpolationFunction' : 52,
593 'TransformFeedback' : 53,
594 'GeometryStreams' : 54,
595 'StorageImageReadWithoutFormat' : 55,
596 'StorageImageWriteWithoutFormat' : 56,
597 'MultiViewport' : 57,
598 'SubgroupDispatch' : 58,
601 'SubgroupBallotKHR' : 4423,
602 'DrawParameters' : 4427,
603 'SubgroupVoteKHR' : 4431,
604 'StorageBuffer16BitAccess' : 4433,
605 'StorageUniformBufferBlock16' : 4433,
606 'StorageUniform16' : 4434,
607 'UniformAndStorageBuffer16BitAccess' : 4434,
608 'StoragePushConstant16' : 4435,
609 'StorageInputOutput16' : 4436,
610 'DeviceGroup' : 4437,
612 'VariablePointersStorageBuffer' : 4441,
613 'VariablePointers' : 4442,
614 'AtomicStorageOps' : 4445,
615 'SampleMaskPostDepthCoverage' : 4447,
616 'ImageGatherBiasLodAMD' : 5009,
617 'SampleMaskOverrideCoverageNV' : 5249,
618 'GeometryShaderPassthroughNV' : 5251,
619 'ShaderViewportIndexLayerNV' : 5254,
620 'ShaderViewportMaskNV' : 5255,
621 'ShaderStereoViewNV' : 5259,
622 'PerViewAttributesNV' : 5260,
628 'OpSourceContinued' : 2,
630 'OpSourceExtension' : 4,
636 'OpExtInstImport' : 11,
638 'OpMemoryModel' : 14,
640 'OpExecutionMode' : 16,
649 'OpTypeSampler' : 26,
650 'OpTypeSampledImage' : 27,
652 'OpTypeRuntimeArray' : 29,
655 'OpTypePointer' : 32,
656 'OpTypeFunction' : 33,
658 'OpTypeDeviceEvent' : 35,
659 'OpTypeReserveId' : 36,
662 'OpTypeForwardPointer' : 39,
663 'OpConstantTrue' : 41,
664 'OpConstantFalse' : 42,
666 'OpConstantComposite' : 44,
667 'OpConstantSampler' : 45,
668 'OpConstantNull' : 46,
669 'OpSpecConstantTrue' : 48,
670 'OpSpecConstantFalse' : 49,
671 'OpSpecConstant' : 50,
672 'OpSpecConstantComposite' : 51,
673 'OpSpecConstantOp' : 52,
675 'OpFunctionParameter' : 55,
676 'OpFunctionEnd' : 56,
677 'OpFunctionCall' : 57,
679 'OpImageTexelPointer' : 60,
683 'OpCopyMemorySized' : 64,
684 'OpAccessChain' : 65,
685 'OpInBoundsAccessChain' : 66,
686 'OpPtrAccessChain' : 67,
687 'OpArrayLength' : 68,
688 'OpGenericPtrMemSemantics' : 69,
689 'OpInBoundsPtrAccessChain' : 70,
691 'OpMemberDecorate' : 72,
692 'OpDecorationGroup' : 73,
693 'OpGroupDecorate' : 74,
694 'OpGroupMemberDecorate' : 75,
695 'OpVectorExtractDynamic' : 77,
696 'OpVectorInsertDynamic' : 78,
697 'OpVectorShuffle' : 79,
698 'OpCompositeConstruct' : 80,
699 'OpCompositeExtract' : 81,
700 'OpCompositeInsert' : 82,
703 'OpSampledImage' : 86,
704 'OpImageSampleImplicitLod' : 87,
705 'OpImageSampleExplicitLod' : 88,
706 'OpImageSampleDrefImplicitLod' : 89,
707 'OpImageSampleDrefExplicitLod' : 90,
708 'OpImageSampleProjImplicitLod' : 91,
709 'OpImageSampleProjExplicitLod' : 92,
710 'OpImageSampleProjDrefImplicitLod' : 93,
711 'OpImageSampleProjDrefExplicitLod' : 94,
713 'OpImageGather' : 96,
714 'OpImageDrefGather' : 97,
718 'OpImageQueryFormat' : 101,
719 'OpImageQueryOrder' : 102,
720 'OpImageQuerySizeLod' : 103,
721 'OpImageQuerySize' : 104,
722 'OpImageQueryLod' : 105,
723 'OpImageQueryLevels' : 106,
724 'OpImageQuerySamples' : 107,
725 'OpConvertFToU' : 109,
726 'OpConvertFToS' : 110,
727 'OpConvertSToF' : 111,
728 'OpConvertUToF' : 112,
732 'OpQuantizeToF16' : 116,
733 'OpConvertPtrToU' : 117,
734 'OpSatConvertSToU' : 118,
735 'OpSatConvertUToS' : 119,
736 'OpConvertUToPtr' : 120,
737 'OpPtrCastToGeneric' : 121,
738 'OpGenericCastToPtr' : 122,
739 'OpGenericCastToPtrExplicit' : 123,
757 'OpVectorTimesScalar' : 142,
758 'OpMatrixTimesScalar' : 143,
759 'OpVectorTimesMatrix' : 144,
760 'OpMatrixTimesVector' : 145,
761 'OpMatrixTimesMatrix' : 146,
762 'OpOuterProduct' : 147,
765 'OpISubBorrow' : 150,
766 'OpUMulExtended' : 151,
767 'OpSMulExtended' : 152,
774 'OpSignBitSet' : 160,
775 'OpLessOrGreater' : 161,
778 'OpLogicalEqual' : 164,
779 'OpLogicalNotEqual' : 165,
781 'OpLogicalAnd' : 167,
782 'OpLogicalNot' : 168,
786 'OpUGreaterThan' : 172,
787 'OpSGreaterThan' : 173,
788 'OpUGreaterThanEqual' : 174,
789 'OpSGreaterThanEqual' : 175,
792 'OpULessThanEqual' : 178,
793 'OpSLessThanEqual' : 179,
795 'OpFUnordEqual' : 181,
796 'OpFOrdNotEqual' : 182,
797 'OpFUnordNotEqual' : 183,
798 'OpFOrdLessThan' : 184,
799 'OpFUnordLessThan' : 185,
800 'OpFOrdGreaterThan' : 186,
801 'OpFUnordGreaterThan' : 187,
802 'OpFOrdLessThanEqual' : 188,
803 'OpFUnordLessThanEqual' : 189,
804 'OpFOrdGreaterThanEqual' : 190,
805 'OpFUnordGreaterThanEqual' : 191,
806 'OpShiftRightLogical' : 194,
807 'OpShiftRightArithmetic' : 195,
808 'OpShiftLeftLogical' : 196,
810 'OpBitwiseXor' : 198,
811 'OpBitwiseAnd' : 199,
813 'OpBitFieldInsert' : 201,
814 'OpBitFieldSExtract' : 202,
815 'OpBitFieldUExtract' : 203,
816 'OpBitReverse' : 204,
823 'OpFwidthFine' : 212,
824 'OpDPdxCoarse' : 213,
825 'OpDPdyCoarse' : 214,
826 'OpFwidthCoarse' : 215,
827 'OpEmitVertex' : 218,
828 'OpEndPrimitive' : 219,
829 'OpEmitStreamVertex' : 220,
830 'OpEndStreamPrimitive' : 221,
831 'OpControlBarrier' : 224,
832 'OpMemoryBarrier' : 225,
833 'OpAtomicLoad' : 227,
834 'OpAtomicStore' : 228,
835 'OpAtomicExchange' : 229,
836 'OpAtomicCompareExchange' : 230,
837 'OpAtomicCompareExchangeWeak' : 231,
838 'OpAtomicIIncrement' : 232,
839 'OpAtomicIDecrement' : 233,
840 'OpAtomicIAdd' : 234,
841 'OpAtomicISub' : 235,
842 'OpAtomicSMin' : 236,
843 'OpAtomicUMin' : 237,
844 'OpAtomicSMax' : 238,
845 'OpAtomicUMax' : 239,
851 'OpSelectionMerge' : 247,
854 'OpBranchConditional' : 250,
858 'OpReturnValue' : 254,
859 'OpUnreachable' : 255,
860 'OpLifetimeStart' : 256,
861 'OpLifetimeStop' : 257,
862 'OpGroupAsyncCopy' : 259,
863 'OpGroupWaitEvents' : 260,
866 'OpGroupBroadcast' : 263,
877 'OpReservedReadPipe' : 276,
878 'OpReservedWritePipe' : 277,
879 'OpReserveReadPipePackets' : 278,
880 'OpReserveWritePipePackets' : 279,
881 'OpCommitReadPipe' : 280,
882 'OpCommitWritePipe' : 281,
883 'OpIsValidReserveId' : 282,
884 'OpGetNumPipePackets' : 283,
885 'OpGetMaxPipePackets' : 284,
886 'OpGroupReserveReadPipePackets' : 285,
887 'OpGroupReserveWritePipePackets' : 286,
888 'OpGroupCommitReadPipe' : 287,
889 'OpGroupCommitWritePipe' : 288,
890 'OpEnqueueMarker' : 291,
891 'OpEnqueueKernel' : 292,
892 'OpGetKernelNDrangeSubGroupCount' : 293,
893 'OpGetKernelNDrangeMaxSubGroupSize' : 294,
894 'OpGetKernelWorkGroupSize' : 295,
895 'OpGetKernelPreferredWorkGroupSizeMultiple' : 296,
896 'OpRetainEvent' : 297,
897 'OpReleaseEvent' : 298,
898 'OpCreateUserEvent' : 299,
899 'OpIsValidEvent' : 300,
900 'OpSetUserEventStatus' : 301,
901 'OpCaptureEventProfilingInfo' : 302,
902 'OpGetDefaultQueue' : 303,
903 'OpBuildNDRange' : 304,
904 'OpImageSparseSampleImplicitLod' : 305,
905 'OpImageSparseSampleExplicitLod' : 306,
906 'OpImageSparseSampleDrefImplicitLod' : 307,
907 'OpImageSparseSampleDrefExplicitLod' : 308,
908 'OpImageSparseSampleProjImplicitLod' : 309,
909 'OpImageSparseSampleProjExplicitLod' : 310,
910 'OpImageSparseSampleProjDrefImplicitLod' : 311,
911 'OpImageSparseSampleProjDrefExplicitLod' : 312,
912 'OpImageSparseFetch' : 313,
913 'OpImageSparseGather' : 314,
914 'OpImageSparseDrefGather' : 315,
915 'OpImageSparseTexelsResident' : 316,
917 'OpAtomicFlagTestAndSet' : 318,
918 'OpAtomicFlagClear' : 319,
919 'OpImageSparseRead' : 320,
921 'OpTypePipeStorage' : 322,
922 'OpConstantPipeStorage' : 323,
923 'OpCreatePipeFromPipeStorage' : 324,
924 'OpGetKernelLocalSizeForSubgroupCount' : 325,
925 'OpGetKernelMaxNumSubgroups' : 326,
926 'OpTypeNamedBarrier' : 327,
927 'OpNamedBarrierInitialize' : 328,
928 'OpMemoryNamedBarrier' : 329,
929 'OpModuleProcessed' : 330,
930 'OpSubgroupBallotKHR' : 4421,
931 'OpSubgroupFirstInvocationKHR' : 4422,
932 'OpSubgroupAllKHR' : 4428,
933 'OpSubgroupAnyKHR' : 4429,
934 'OpSubgroupAllEqualKHR' : 4430,
935 'OpSubgroupReadInvocationKHR' : 4432,
936 'OpGroupIAddNonUniformAMD' : 5000,
937 'OpGroupFAddNonUniformAMD' : 5001,
938 'OpGroupFMinNonUniformAMD' : 5002,
939 'OpGroupUMinNonUniformAMD' : 5003,
940 'OpGroupSMinNonUniformAMD' : 5004,
941 'OpGroupFMaxNonUniformAMD' : 5005,
942 'OpGroupUMaxNonUniformAMD' : 5006,
943 'OpGroupSMaxNonUniformAMD' : 5007,