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,
122 'UniformConstant' : 0,
127 'CrossWorkgroup' : 5,
132 'AtomicCounter' : 10,
134 'StorageBuffer' : 12,
147 'SamplerAddressingMode' : {
152 'RepeatMirrored' : 4,
155 'SamplerFilterMode' : {
203 'ImageChannelOrder' : {
226 'ImageChannelDataType' : {
233 'UnormInt101010' : 6,
238 'UnsignedInt16' : 11,
239 'UnsignedInt32' : 12,
243 'UnormInt101010_2' : 16,
246 'ImageOperandsShift' : {
257 'ImageOperandsMask' : {
262 'ConstOffset' : 0x00000008,
263 'Offset' : 0x00000010,
264 'ConstOffsets' : 0x00000020,
265 'Sample' : 0x00000040,
266 'MinLod' : 0x00000080,
269 'FPFastMathModeShift' : {
277 'FPFastMathModeMask' : {
279 'NotNaN' : 0x00000001,
280 'NotInf' : 0x00000002,
282 'AllowRecip' : 0x00000008,
298 'AccessQualifier' : {
304 'FunctionParameterAttribute' : {
316 'RelaxedPrecision' : 0,
328 'NoPerspective' : 13,
342 'SaturatedConversion' : 28,
348 'DescriptorSet' : 34,
352 'FuncParamAttr' : 38,
353 'FPRoundingMode' : 39,
354 'FPFastMathMode' : 40,
355 'LinkageAttributes' : 41,
356 'NoContraction' : 42,
357 'InputAttachmentIndex' : 43,
359 'MaxByteOffset' : 45,
361 'MaxByteOffsetId' : 47,
362 'OverrideCoverageNV' : 5248,
363 'PassthroughNV' : 5250,
364 'ViewportRelativeNV' : 5252,
365 'SecondaryViewportRelativeNV' : 5256,
378 'ViewportIndex' : 10,
379 'TessLevelOuter' : 11,
380 'TessLevelInner' : 12,
382 'PatchVertices' : 14,
387 'SamplePosition' : 19,
390 'HelperInvocation' : 23,
391 'NumWorkgroups' : 24,
392 'WorkgroupSize' : 25,
394 'LocalInvocationId' : 27,
395 'GlobalInvocationId' : 28,
396 'LocalInvocationIndex' : 29,
399 'EnqueuedWorkgroupSize' : 32,
401 'GlobalLinearId' : 34,
403 'SubgroupMaxSize' : 37,
405 'NumEnqueuedSubgroups' : 39,
407 'SubgroupLocalInvocationId' : 41,
409 'InstanceIndex' : 43,
410 'SubgroupEqMaskKHR' : 4416,
411 'SubgroupGeMaskKHR' : 4417,
412 'SubgroupGtMaskKHR' : 4418,
413 'SubgroupLeMaskKHR' : 4419,
414 'SubgroupLtMaskKHR' : 4420,
416 'BaseInstance' : 4425,
418 'DeviceIndex' : 4438,
420 'ViewportMaskNV' : 5253,
421 'SecondaryPositionNV' : 5257,
422 'SecondaryViewportMaskNV' : 5258,
423 'PositionPerViewNV' : 5261,
424 'ViewportMaskPerViewNV' : 5262,
427 'SelectionControlShift' : {
432 'SelectionControlMask' : {
434 'Flatten' : 0x00000001,
435 'DontFlatten' : 0x00000002,
438 'LoopControlShift' : {
441 'DependencyInfinite' : 2,
442 'DependencyLength' : 3,
445 'LoopControlMask' : {
447 'Unroll' : 0x00000001,
448 'DontUnroll' : 0x00000002,
449 'DependencyInfinite' : 0x00000004,
450 'DependencyLength' : 0x00000008,
453 'FunctionControlShift' : {
460 'FunctionControlMask' : {
462 'Inline' : 0x00000001,
463 'DontInline' : 0x00000002,
465 'Const' : 0x00000008,
468 'MemorySemanticsShift' : {
471 'AcquireRelease' : 3,
472 'SequentiallyConsistent' : 4,
474 'SubgroupMemory' : 7,
475 'WorkgroupMemory' : 8,
476 'CrossWorkgroupMemory' : 9,
477 'AtomicCounterMemory' : 10,
481 'MemorySemanticsMask' : {
483 'Acquire' : 0x00000002,
484 'Release' : 0x00000004,
485 'AcquireRelease' : 0x00000008,
486 'SequentiallyConsistent' : 0x00000010,
487 'UniformMemory' : 0x00000040,
488 'SubgroupMemory' : 0x00000080,
489 'WorkgroupMemory' : 0x00000100,
490 'CrossWorkgroupMemory' : 0x00000200,
491 'AtomicCounterMemory' : 0x00000400,
492 'ImageMemory' : 0x00000800,
495 'MemoryAccessShift' : {
501 'MemoryAccessMask' : {
503 'Volatile' : 0x00000001,
504 'Aligned' : 0x00000002,
505 'Nontemporal' : 0x00000004,
522 'KernelEnqueueFlags' : {
528 'KernelProfilingInfoShift' : {
532 'KernelProfilingInfoMask' : {
534 'CmdExecTime' : 0x00000001,
552 'ImageReadWrite' : 14,
556 'DeviceEnqueue' : 19,
557 'LiteralSampler' : 20,
558 'AtomicStorage' : 21,
560 'TessellationPointSize' : 23,
561 'GeometryPointSize' : 24,
562 'ImageGatherExtended' : 25,
563 'StorageImageMultisample' : 27,
564 'UniformBufferArrayDynamicIndexing' : 28,
565 'SampledImageArrayDynamicIndexing' : 29,
566 'StorageBufferArrayDynamicIndexing' : 30,
567 'StorageImageArrayDynamicIndexing' : 31,
570 'ImageCubeArray' : 34,
571 'SampleRateShading' : 35,
574 'GenericPointer' : 38,
576 'InputAttachment' : 40,
577 'SparseResidency' : 41,
581 'SampledCubeArray' : 45,
582 'SampledBuffer' : 46,
585 'StorageImageExtendedFormats' : 49,
587 'DerivativeControl' : 51,
588 'InterpolationFunction' : 52,
589 'TransformFeedback' : 53,
590 'GeometryStreams' : 54,
591 'StorageImageReadWithoutFormat' : 55,
592 'StorageImageWriteWithoutFormat' : 56,
593 'MultiViewport' : 57,
594 'SubgroupDispatch' : 58,
597 'SubgroupBallotKHR' : 4423,
598 'DrawParameters' : 4427,
599 'SubgroupVoteKHR' : 4431,
600 'StorageBuffer16BitAccess' : 4433,
601 'StorageUniformBufferBlock16' : 4433,
602 'StorageUniform16' : 4434,
603 'UniformAndStorageBuffer16BitAccess' : 4434,
604 'StoragePushConstant16' : 4435,
605 'StorageInputOutput16' : 4436,
606 'DeviceGroup' : 4437,
608 'VariablePointersStorageBuffer' : 4441,
609 'VariablePointers' : 4442,
610 'SampleMaskOverrideCoverageNV' : 5249,
611 'GeometryShaderPassthroughNV' : 5251,
612 'ShaderViewportIndexLayerNV' : 5254,
613 'ShaderViewportMaskNV' : 5255,
614 'ShaderStereoViewNV' : 5259,
615 'PerViewAttributesNV' : 5260,
621 'OpSourceContinued' : 2,
623 'OpSourceExtension' : 4,
629 'OpExtInstImport' : 11,
631 'OpMemoryModel' : 14,
633 'OpExecutionMode' : 16,
642 'OpTypeSampler' : 26,
643 'OpTypeSampledImage' : 27,
645 'OpTypeRuntimeArray' : 29,
648 'OpTypePointer' : 32,
649 'OpTypeFunction' : 33,
651 'OpTypeDeviceEvent' : 35,
652 'OpTypeReserveId' : 36,
655 'OpTypeForwardPointer' : 39,
656 'OpConstantTrue' : 41,
657 'OpConstantFalse' : 42,
659 'OpConstantComposite' : 44,
660 'OpConstantSampler' : 45,
661 'OpConstantNull' : 46,
662 'OpSpecConstantTrue' : 48,
663 'OpSpecConstantFalse' : 49,
664 'OpSpecConstant' : 50,
665 'OpSpecConstantComposite' : 51,
666 'OpSpecConstantOp' : 52,
668 'OpFunctionParameter' : 55,
669 'OpFunctionEnd' : 56,
670 'OpFunctionCall' : 57,
672 'OpImageTexelPointer' : 60,
676 'OpCopyMemorySized' : 64,
677 'OpAccessChain' : 65,
678 'OpInBoundsAccessChain' : 66,
679 'OpPtrAccessChain' : 67,
680 'OpArrayLength' : 68,
681 'OpGenericPtrMemSemantics' : 69,
682 'OpInBoundsPtrAccessChain' : 70,
684 'OpMemberDecorate' : 72,
685 'OpDecorationGroup' : 73,
686 'OpGroupDecorate' : 74,
687 'OpGroupMemberDecorate' : 75,
688 'OpVectorExtractDynamic' : 77,
689 'OpVectorInsertDynamic' : 78,
690 'OpVectorShuffle' : 79,
691 'OpCompositeConstruct' : 80,
692 'OpCompositeExtract' : 81,
693 'OpCompositeInsert' : 82,
696 'OpSampledImage' : 86,
697 'OpImageSampleImplicitLod' : 87,
698 'OpImageSampleExplicitLod' : 88,
699 'OpImageSampleDrefImplicitLod' : 89,
700 'OpImageSampleDrefExplicitLod' : 90,
701 'OpImageSampleProjImplicitLod' : 91,
702 'OpImageSampleProjExplicitLod' : 92,
703 'OpImageSampleProjDrefImplicitLod' : 93,
704 'OpImageSampleProjDrefExplicitLod' : 94,
706 'OpImageGather' : 96,
707 'OpImageDrefGather' : 97,
711 'OpImageQueryFormat' : 101,
712 'OpImageQueryOrder' : 102,
713 'OpImageQuerySizeLod' : 103,
714 'OpImageQuerySize' : 104,
715 'OpImageQueryLod' : 105,
716 'OpImageQueryLevels' : 106,
717 'OpImageQuerySamples' : 107,
718 'OpConvertFToU' : 109,
719 'OpConvertFToS' : 110,
720 'OpConvertSToF' : 111,
721 'OpConvertUToF' : 112,
725 'OpQuantizeToF16' : 116,
726 'OpConvertPtrToU' : 117,
727 'OpSatConvertSToU' : 118,
728 'OpSatConvertUToS' : 119,
729 'OpConvertUToPtr' : 120,
730 'OpPtrCastToGeneric' : 121,
731 'OpGenericCastToPtr' : 122,
732 'OpGenericCastToPtrExplicit' : 123,
750 'OpVectorTimesScalar' : 142,
751 'OpMatrixTimesScalar' : 143,
752 'OpVectorTimesMatrix' : 144,
753 'OpMatrixTimesVector' : 145,
754 'OpMatrixTimesMatrix' : 146,
755 'OpOuterProduct' : 147,
758 'OpISubBorrow' : 150,
759 'OpUMulExtended' : 151,
760 'OpSMulExtended' : 152,
767 'OpSignBitSet' : 160,
768 'OpLessOrGreater' : 161,
771 'OpLogicalEqual' : 164,
772 'OpLogicalNotEqual' : 165,
774 'OpLogicalAnd' : 167,
775 'OpLogicalNot' : 168,
779 'OpUGreaterThan' : 172,
780 'OpSGreaterThan' : 173,
781 'OpUGreaterThanEqual' : 174,
782 'OpSGreaterThanEqual' : 175,
785 'OpULessThanEqual' : 178,
786 'OpSLessThanEqual' : 179,
788 'OpFUnordEqual' : 181,
789 'OpFOrdNotEqual' : 182,
790 'OpFUnordNotEqual' : 183,
791 'OpFOrdLessThan' : 184,
792 'OpFUnordLessThan' : 185,
793 'OpFOrdGreaterThan' : 186,
794 'OpFUnordGreaterThan' : 187,
795 'OpFOrdLessThanEqual' : 188,
796 'OpFUnordLessThanEqual' : 189,
797 'OpFOrdGreaterThanEqual' : 190,
798 'OpFUnordGreaterThanEqual' : 191,
799 'OpShiftRightLogical' : 194,
800 'OpShiftRightArithmetic' : 195,
801 'OpShiftLeftLogical' : 196,
803 'OpBitwiseXor' : 198,
804 'OpBitwiseAnd' : 199,
806 'OpBitFieldInsert' : 201,
807 'OpBitFieldSExtract' : 202,
808 'OpBitFieldUExtract' : 203,
809 'OpBitReverse' : 204,
816 'OpFwidthFine' : 212,
817 'OpDPdxCoarse' : 213,
818 'OpDPdyCoarse' : 214,
819 'OpFwidthCoarse' : 215,
820 'OpEmitVertex' : 218,
821 'OpEndPrimitive' : 219,
822 'OpEmitStreamVertex' : 220,
823 'OpEndStreamPrimitive' : 221,
824 'OpControlBarrier' : 224,
825 'OpMemoryBarrier' : 225,
826 'OpAtomicLoad' : 227,
827 'OpAtomicStore' : 228,
828 'OpAtomicExchange' : 229,
829 'OpAtomicCompareExchange' : 230,
830 'OpAtomicCompareExchangeWeak' : 231,
831 'OpAtomicIIncrement' : 232,
832 'OpAtomicIDecrement' : 233,
833 'OpAtomicIAdd' : 234,
834 'OpAtomicISub' : 235,
835 'OpAtomicSMin' : 236,
836 'OpAtomicUMin' : 237,
837 'OpAtomicSMax' : 238,
838 'OpAtomicUMax' : 239,
844 'OpSelectionMerge' : 247,
847 'OpBranchConditional' : 250,
851 'OpReturnValue' : 254,
852 'OpUnreachable' : 255,
853 'OpLifetimeStart' : 256,
854 'OpLifetimeStop' : 257,
855 'OpGroupAsyncCopy' : 259,
856 'OpGroupWaitEvents' : 260,
859 'OpGroupBroadcast' : 263,
870 'OpReservedReadPipe' : 276,
871 'OpReservedWritePipe' : 277,
872 'OpReserveReadPipePackets' : 278,
873 'OpReserveWritePipePackets' : 279,
874 'OpCommitReadPipe' : 280,
875 'OpCommitWritePipe' : 281,
876 'OpIsValidReserveId' : 282,
877 'OpGetNumPipePackets' : 283,
878 'OpGetMaxPipePackets' : 284,
879 'OpGroupReserveReadPipePackets' : 285,
880 'OpGroupReserveWritePipePackets' : 286,
881 'OpGroupCommitReadPipe' : 287,
882 'OpGroupCommitWritePipe' : 288,
883 'OpEnqueueMarker' : 291,
884 'OpEnqueueKernel' : 292,
885 'OpGetKernelNDrangeSubGroupCount' : 293,
886 'OpGetKernelNDrangeMaxSubGroupSize' : 294,
887 'OpGetKernelWorkGroupSize' : 295,
888 'OpGetKernelPreferredWorkGroupSizeMultiple' : 296,
889 'OpRetainEvent' : 297,
890 'OpReleaseEvent' : 298,
891 'OpCreateUserEvent' : 299,
892 'OpIsValidEvent' : 300,
893 'OpSetUserEventStatus' : 301,
894 'OpCaptureEventProfilingInfo' : 302,
895 'OpGetDefaultQueue' : 303,
896 'OpBuildNDRange' : 304,
897 'OpImageSparseSampleImplicitLod' : 305,
898 'OpImageSparseSampleExplicitLod' : 306,
899 'OpImageSparseSampleDrefImplicitLod' : 307,
900 'OpImageSparseSampleDrefExplicitLod' : 308,
901 'OpImageSparseSampleProjImplicitLod' : 309,
902 'OpImageSparseSampleProjExplicitLod' : 310,
903 'OpImageSparseSampleProjDrefImplicitLod' : 311,
904 'OpImageSparseSampleProjDrefExplicitLod' : 312,
905 'OpImageSparseFetch' : 313,
906 'OpImageSparseGather' : 314,
907 'OpImageSparseDrefGather' : 315,
908 'OpImageSparseTexelsResident' : 316,
910 'OpAtomicFlagTestAndSet' : 318,
911 'OpAtomicFlagClear' : 319,
912 'OpImageSparseRead' : 320,
914 'OpTypePipeStorage' : 322,
915 'OpConstantPipeStorage' : 323,
916 'OpCreatePipeFromPipeStorage' : 324,
917 'OpGetKernelLocalSizeForSubgroupCount' : 325,
918 'OpGetKernelMaxNumSubgroups' : 326,
919 'OpTypeNamedBarrier' : 327,
920 'OpNamedBarrierInitialize' : 328,
921 'OpMemoryNamedBarrier' : 329,
922 'OpModuleProcessed' : 330,
923 'OpExecutionModeId' : 331,
924 'OpDecorateId' : 332,
925 'OpSubgroupBallotKHR' : 4421,
926 'OpSubgroupFirstInvocationKHR' : 4422,
927 'OpSubgroupAllKHR' : 4428,
928 'OpSubgroupAnyKHR' : 4429,
929 'OpSubgroupAllEqualKHR' : 4430,
930 'OpSubgroupReadInvocationKHR' : 4432,