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' : 0x00010200,
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 'SubgroupsPerWorkgroupId' : 37,
118 'LocalSizeHintId' : 39,
119 'PostDepthCoverage' : 4446,
123 'UniformConstant' : 0,
128 'CrossWorkgroup' : 5,
133 'AtomicCounter' : 10,
135 'StorageBuffer' : 12,
148 'SamplerAddressingMode' : {
153 'RepeatMirrored' : 4,
156 'SamplerFilterMode' : {
204 'ImageChannelOrder' : {
227 'ImageChannelDataType' : {
234 'UnormInt101010' : 6,
239 'UnsignedInt16' : 11,
240 'UnsignedInt32' : 12,
244 'UnormInt101010_2' : 16,
247 'ImageOperandsShift' : {
258 'ImageOperandsMask' : {
263 'ConstOffset' : 0x00000008,
264 'Offset' : 0x00000010,
265 'ConstOffsets' : 0x00000020,
266 'Sample' : 0x00000040,
267 'MinLod' : 0x00000080,
270 'FPFastMathModeShift' : {
278 'FPFastMathModeMask' : {
280 'NotNaN' : 0x00000001,
281 'NotInf' : 0x00000002,
283 'AllowRecip' : 0x00000008,
299 'AccessQualifier' : {
305 'FunctionParameterAttribute' : {
317 'RelaxedPrecision' : 0,
329 'NoPerspective' : 13,
343 'SaturatedConversion' : 28,
349 'DescriptorSet' : 34,
353 'FuncParamAttr' : 38,
354 'FPRoundingMode' : 39,
355 'FPFastMathMode' : 40,
356 'LinkageAttributes' : 41,
357 'NoContraction' : 42,
358 'InputAttachmentIndex' : 43,
360 'MaxByteOffset' : 45,
362 'MaxByteOffsetId' : 47,
363 'ExplicitInterpAMD' : 4999,
364 'OverrideCoverageNV' : 5248,
365 'PassthroughNV' : 5250,
366 'ViewportRelativeNV' : 5252,
367 'SecondaryViewportRelativeNV' : 5256,
380 'ViewportIndex' : 10,
381 'TessLevelOuter' : 11,
382 'TessLevelInner' : 12,
384 'PatchVertices' : 14,
389 'SamplePosition' : 19,
392 'HelperInvocation' : 23,
393 'NumWorkgroups' : 24,
394 'WorkgroupSize' : 25,
396 'LocalInvocationId' : 27,
397 'GlobalInvocationId' : 28,
398 'LocalInvocationIndex' : 29,
401 'EnqueuedWorkgroupSize' : 32,
403 'GlobalLinearId' : 34,
405 'SubgroupMaxSize' : 37,
407 'NumEnqueuedSubgroups' : 39,
409 'SubgroupLocalInvocationId' : 41,
411 'InstanceIndex' : 43,
412 'SubgroupEqMaskKHR' : 4416,
413 'SubgroupGeMaskKHR' : 4417,
414 'SubgroupGtMaskKHR' : 4418,
415 'SubgroupLeMaskKHR' : 4419,
416 'SubgroupLtMaskKHR' : 4420,
418 'BaseInstance' : 4425,
420 'DeviceIndex' : 4438,
422 'BaryCoordNoPerspAMD' : 4992,
423 'BaryCoordNoPerspCentroidAMD' : 4993,
424 'BaryCoordNoPerspSampleAMD' : 4994,
425 'BaryCoordSmoothAMD' : 4995,
426 'BaryCoordSmoothCentroidAMD' : 4996,
427 'BaryCoordSmoothSampleAMD' : 4997,
428 'BaryCoordPullModelAMD' : 4998,
429 'ViewportMaskNV' : 5253,
430 'SecondaryPositionNV' : 5257,
431 'SecondaryViewportMaskNV' : 5258,
432 'PositionPerViewNV' : 5261,
433 'ViewportMaskPerViewNV' : 5262,
436 'SelectionControlShift' : {
441 'SelectionControlMask' : {
443 'Flatten' : 0x00000001,
444 'DontFlatten' : 0x00000002,
447 'LoopControlShift' : {
450 'DependencyInfinite' : 2,
451 'DependencyLength' : 3,
454 'LoopControlMask' : {
456 'Unroll' : 0x00000001,
457 'DontUnroll' : 0x00000002,
458 'DependencyInfinite' : 0x00000004,
459 'DependencyLength' : 0x00000008,
462 'FunctionControlShift' : {
469 'FunctionControlMask' : {
471 'Inline' : 0x00000001,
472 'DontInline' : 0x00000002,
474 'Const' : 0x00000008,
477 'MemorySemanticsShift' : {
480 'AcquireRelease' : 3,
481 'SequentiallyConsistent' : 4,
483 'SubgroupMemory' : 7,
484 'WorkgroupMemory' : 8,
485 'CrossWorkgroupMemory' : 9,
486 'AtomicCounterMemory' : 10,
490 'MemorySemanticsMask' : {
492 'Acquire' : 0x00000002,
493 'Release' : 0x00000004,
494 'AcquireRelease' : 0x00000008,
495 'SequentiallyConsistent' : 0x00000010,
496 'UniformMemory' : 0x00000040,
497 'SubgroupMemory' : 0x00000080,
498 'WorkgroupMemory' : 0x00000100,
499 'CrossWorkgroupMemory' : 0x00000200,
500 'AtomicCounterMemory' : 0x00000400,
501 'ImageMemory' : 0x00000800,
504 'MemoryAccessShift' : {
510 'MemoryAccessMask' : {
512 'Volatile' : 0x00000001,
513 'Aligned' : 0x00000002,
514 'Nontemporal' : 0x00000004,
531 'KernelEnqueueFlags' : {
537 'KernelProfilingInfoShift' : {
541 'KernelProfilingInfoMask' : {
543 'CmdExecTime' : 0x00000001,
561 'ImageReadWrite' : 14,
565 'DeviceEnqueue' : 19,
566 'LiteralSampler' : 20,
567 'AtomicStorage' : 21,
569 'TessellationPointSize' : 23,
570 'GeometryPointSize' : 24,
571 'ImageGatherExtended' : 25,
572 'StorageImageMultisample' : 27,
573 'UniformBufferArrayDynamicIndexing' : 28,
574 'SampledImageArrayDynamicIndexing' : 29,
575 'StorageBufferArrayDynamicIndexing' : 30,
576 'StorageImageArrayDynamicIndexing' : 31,
579 'ImageCubeArray' : 34,
580 'SampleRateShading' : 35,
583 'GenericPointer' : 38,
585 'InputAttachment' : 40,
586 'SparseResidency' : 41,
590 'SampledCubeArray' : 45,
591 'SampledBuffer' : 46,
594 'StorageImageExtendedFormats' : 49,
596 'DerivativeControl' : 51,
597 'InterpolationFunction' : 52,
598 'TransformFeedback' : 53,
599 'GeometryStreams' : 54,
600 'StorageImageReadWithoutFormat' : 55,
601 'StorageImageWriteWithoutFormat' : 56,
602 'MultiViewport' : 57,
603 'SubgroupDispatch' : 58,
606 'SubgroupBallotKHR' : 4423,
607 'DrawParameters' : 4427,
608 'SubgroupVoteKHR' : 4431,
609 'StorageBuffer16BitAccess' : 4433,
610 'StorageUniformBufferBlock16' : 4433,
611 'StorageUniform16' : 4434,
612 'UniformAndStorageBuffer16BitAccess' : 4434,
613 'StoragePushConstant16' : 4435,
614 'StorageInputOutput16' : 4436,
615 'DeviceGroup' : 4437,
617 'VariablePointersStorageBuffer' : 4441,
618 'VariablePointers' : 4442,
619 'AtomicStorageOps' : 4445,
620 'SampleMaskPostDepthCoverage' : 4447,
621 'ImageGatherBiasLodAMD' : 5009,
622 'SampleMaskOverrideCoverageNV' : 5249,
623 'GeometryShaderPassthroughNV' : 5251,
624 'ShaderViewportIndexLayerNV' : 5254,
625 'ShaderViewportMaskNV' : 5255,
626 'ShaderStereoViewNV' : 5259,
627 'PerViewAttributesNV' : 5260,
633 'OpSourceContinued' : 2,
635 'OpSourceExtension' : 4,
641 'OpExtInstImport' : 11,
643 'OpMemoryModel' : 14,
645 'OpExecutionMode' : 16,
654 'OpTypeSampler' : 26,
655 'OpTypeSampledImage' : 27,
657 'OpTypeRuntimeArray' : 29,
660 'OpTypePointer' : 32,
661 'OpTypeFunction' : 33,
663 'OpTypeDeviceEvent' : 35,
664 'OpTypeReserveId' : 36,
667 'OpTypeForwardPointer' : 39,
668 'OpConstantTrue' : 41,
669 'OpConstantFalse' : 42,
671 'OpConstantComposite' : 44,
672 'OpConstantSampler' : 45,
673 'OpConstantNull' : 46,
674 'OpSpecConstantTrue' : 48,
675 'OpSpecConstantFalse' : 49,
676 'OpSpecConstant' : 50,
677 'OpSpecConstantComposite' : 51,
678 'OpSpecConstantOp' : 52,
680 'OpFunctionParameter' : 55,
681 'OpFunctionEnd' : 56,
682 'OpFunctionCall' : 57,
684 'OpImageTexelPointer' : 60,
688 'OpCopyMemorySized' : 64,
689 'OpAccessChain' : 65,
690 'OpInBoundsAccessChain' : 66,
691 'OpPtrAccessChain' : 67,
692 'OpArrayLength' : 68,
693 'OpGenericPtrMemSemantics' : 69,
694 'OpInBoundsPtrAccessChain' : 70,
696 'OpMemberDecorate' : 72,
697 'OpDecorationGroup' : 73,
698 'OpGroupDecorate' : 74,
699 'OpGroupMemberDecorate' : 75,
700 'OpVectorExtractDynamic' : 77,
701 'OpVectorInsertDynamic' : 78,
702 'OpVectorShuffle' : 79,
703 'OpCompositeConstruct' : 80,
704 'OpCompositeExtract' : 81,
705 'OpCompositeInsert' : 82,
708 'OpSampledImage' : 86,
709 'OpImageSampleImplicitLod' : 87,
710 'OpImageSampleExplicitLod' : 88,
711 'OpImageSampleDrefImplicitLod' : 89,
712 'OpImageSampleDrefExplicitLod' : 90,
713 'OpImageSampleProjImplicitLod' : 91,
714 'OpImageSampleProjExplicitLod' : 92,
715 'OpImageSampleProjDrefImplicitLod' : 93,
716 'OpImageSampleProjDrefExplicitLod' : 94,
718 'OpImageGather' : 96,
719 'OpImageDrefGather' : 97,
723 'OpImageQueryFormat' : 101,
724 'OpImageQueryOrder' : 102,
725 'OpImageQuerySizeLod' : 103,
726 'OpImageQuerySize' : 104,
727 'OpImageQueryLod' : 105,
728 'OpImageQueryLevels' : 106,
729 'OpImageQuerySamples' : 107,
730 'OpConvertFToU' : 109,
731 'OpConvertFToS' : 110,
732 'OpConvertSToF' : 111,
733 'OpConvertUToF' : 112,
737 'OpQuantizeToF16' : 116,
738 'OpConvertPtrToU' : 117,
739 'OpSatConvertSToU' : 118,
740 'OpSatConvertUToS' : 119,
741 'OpConvertUToPtr' : 120,
742 'OpPtrCastToGeneric' : 121,
743 'OpGenericCastToPtr' : 122,
744 'OpGenericCastToPtrExplicit' : 123,
762 'OpVectorTimesScalar' : 142,
763 'OpMatrixTimesScalar' : 143,
764 'OpVectorTimesMatrix' : 144,
765 'OpMatrixTimesVector' : 145,
766 'OpMatrixTimesMatrix' : 146,
767 'OpOuterProduct' : 147,
770 'OpISubBorrow' : 150,
771 'OpUMulExtended' : 151,
772 'OpSMulExtended' : 152,
779 'OpSignBitSet' : 160,
780 'OpLessOrGreater' : 161,
783 'OpLogicalEqual' : 164,
784 'OpLogicalNotEqual' : 165,
786 'OpLogicalAnd' : 167,
787 'OpLogicalNot' : 168,
791 'OpUGreaterThan' : 172,
792 'OpSGreaterThan' : 173,
793 'OpUGreaterThanEqual' : 174,
794 'OpSGreaterThanEqual' : 175,
797 'OpULessThanEqual' : 178,
798 'OpSLessThanEqual' : 179,
800 'OpFUnordEqual' : 181,
801 'OpFOrdNotEqual' : 182,
802 'OpFUnordNotEqual' : 183,
803 'OpFOrdLessThan' : 184,
804 'OpFUnordLessThan' : 185,
805 'OpFOrdGreaterThan' : 186,
806 'OpFUnordGreaterThan' : 187,
807 'OpFOrdLessThanEqual' : 188,
808 'OpFUnordLessThanEqual' : 189,
809 'OpFOrdGreaterThanEqual' : 190,
810 'OpFUnordGreaterThanEqual' : 191,
811 'OpShiftRightLogical' : 194,
812 'OpShiftRightArithmetic' : 195,
813 'OpShiftLeftLogical' : 196,
815 'OpBitwiseXor' : 198,
816 'OpBitwiseAnd' : 199,
818 'OpBitFieldInsert' : 201,
819 'OpBitFieldSExtract' : 202,
820 'OpBitFieldUExtract' : 203,
821 'OpBitReverse' : 204,
828 'OpFwidthFine' : 212,
829 'OpDPdxCoarse' : 213,
830 'OpDPdyCoarse' : 214,
831 'OpFwidthCoarse' : 215,
832 'OpEmitVertex' : 218,
833 'OpEndPrimitive' : 219,
834 'OpEmitStreamVertex' : 220,
835 'OpEndStreamPrimitive' : 221,
836 'OpControlBarrier' : 224,
837 'OpMemoryBarrier' : 225,
838 'OpAtomicLoad' : 227,
839 'OpAtomicStore' : 228,
840 'OpAtomicExchange' : 229,
841 'OpAtomicCompareExchange' : 230,
842 'OpAtomicCompareExchangeWeak' : 231,
843 'OpAtomicIIncrement' : 232,
844 'OpAtomicIDecrement' : 233,
845 'OpAtomicIAdd' : 234,
846 'OpAtomicISub' : 235,
847 'OpAtomicSMin' : 236,
848 'OpAtomicUMin' : 237,
849 'OpAtomicSMax' : 238,
850 'OpAtomicUMax' : 239,
856 'OpSelectionMerge' : 247,
859 'OpBranchConditional' : 250,
863 'OpReturnValue' : 254,
864 'OpUnreachable' : 255,
865 'OpLifetimeStart' : 256,
866 'OpLifetimeStop' : 257,
867 'OpGroupAsyncCopy' : 259,
868 'OpGroupWaitEvents' : 260,
871 'OpGroupBroadcast' : 263,
882 'OpReservedReadPipe' : 276,
883 'OpReservedWritePipe' : 277,
884 'OpReserveReadPipePackets' : 278,
885 'OpReserveWritePipePackets' : 279,
886 'OpCommitReadPipe' : 280,
887 'OpCommitWritePipe' : 281,
888 'OpIsValidReserveId' : 282,
889 'OpGetNumPipePackets' : 283,
890 'OpGetMaxPipePackets' : 284,
891 'OpGroupReserveReadPipePackets' : 285,
892 'OpGroupReserveWritePipePackets' : 286,
893 'OpGroupCommitReadPipe' : 287,
894 'OpGroupCommitWritePipe' : 288,
895 'OpEnqueueMarker' : 291,
896 'OpEnqueueKernel' : 292,
897 'OpGetKernelNDrangeSubGroupCount' : 293,
898 'OpGetKernelNDrangeMaxSubGroupSize' : 294,
899 'OpGetKernelWorkGroupSize' : 295,
900 'OpGetKernelPreferredWorkGroupSizeMultiple' : 296,
901 'OpRetainEvent' : 297,
902 'OpReleaseEvent' : 298,
903 'OpCreateUserEvent' : 299,
904 'OpIsValidEvent' : 300,
905 'OpSetUserEventStatus' : 301,
906 'OpCaptureEventProfilingInfo' : 302,
907 'OpGetDefaultQueue' : 303,
908 'OpBuildNDRange' : 304,
909 'OpImageSparseSampleImplicitLod' : 305,
910 'OpImageSparseSampleExplicitLod' : 306,
911 'OpImageSparseSampleDrefImplicitLod' : 307,
912 'OpImageSparseSampleDrefExplicitLod' : 308,
913 'OpImageSparseSampleProjImplicitLod' : 309,
914 'OpImageSparseSampleProjExplicitLod' : 310,
915 'OpImageSparseSampleProjDrefImplicitLod' : 311,
916 'OpImageSparseSampleProjDrefExplicitLod' : 312,
917 'OpImageSparseFetch' : 313,
918 'OpImageSparseGather' : 314,
919 'OpImageSparseDrefGather' : 315,
920 'OpImageSparseTexelsResident' : 316,
922 'OpAtomicFlagTestAndSet' : 318,
923 'OpAtomicFlagClear' : 319,
924 'OpImageSparseRead' : 320,
926 'OpTypePipeStorage' : 322,
927 'OpConstantPipeStorage' : 323,
928 'OpCreatePipeFromPipeStorage' : 324,
929 'OpGetKernelLocalSizeForSubgroupCount' : 325,
930 'OpGetKernelMaxNumSubgroups' : 326,
931 'OpTypeNamedBarrier' : 327,
932 'OpNamedBarrierInitialize' : 328,
933 'OpMemoryNamedBarrier' : 329,
934 'OpModuleProcessed' : 330,
935 'OpExecutionModeId' : 331,
936 'OpDecorateId' : 332,
937 'OpSubgroupBallotKHR' : 4421,
938 'OpSubgroupFirstInvocationKHR' : 4422,
939 'OpSubgroupAllKHR' : 4428,
940 'OpSubgroupAnyKHR' : 4429,
941 'OpSubgroupAllEqualKHR' : 4430,
942 'OpSubgroupReadInvocationKHR' : 4432,
943 'OpGroupIAddNonUniformAMD' : 5000,
944 'OpGroupFAddNonUniformAMD' : 5001,
945 'OpGroupFMinNonUniformAMD' : 5002,
946 'OpGroupUMinNonUniformAMD' : 5003,
947 'OpGroupSMinNonUniformAMD' : 5004,
948 'OpGroupFMaxNonUniformAMD' : 5005,
949 'OpGroupUMaxNonUniformAMD' : 5006,
950 'OpGroupSMaxNonUniformAMD' : 5007,