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,
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,
112 'PostDepthCoverage' : 4446,
116 'UniformConstant' : 0,
121 'CrossWorkgroup' : 5,
126 'AtomicCounter' : 10,
128 'StorageBuffer' : 12,
141 'SamplerAddressingMode' : {
146 'RepeatMirrored' : 4,
149 'SamplerFilterMode' : {
197 'ImageChannelOrder' : {
220 'ImageChannelDataType' : {
227 'UnormInt101010' : 6,
232 'UnsignedInt16' : 11,
233 'UnsignedInt32' : 12,
237 'UnormInt101010_2' : 16,
240 'ImageOperandsShift' : {
251 'ImageOperandsMask' : {
256 'ConstOffset' : 0x00000008,
257 'Offset' : 0x00000010,
258 'ConstOffsets' : 0x00000020,
259 'Sample' : 0x00000040,
260 'MinLod' : 0x00000080,
263 'FPFastMathModeShift' : {
271 'FPFastMathModeMask' : {
273 'NotNaN' : 0x00000001,
274 'NotInf' : 0x00000002,
276 'AllowRecip' : 0x00000008,
292 'AccessQualifier' : {
298 'FunctionParameterAttribute' : {
310 'RelaxedPrecision' : 0,
322 'NoPerspective' : 13,
336 'SaturatedConversion' : 28,
342 'DescriptorSet' : 34,
346 'FuncParamAttr' : 38,
347 'FPRoundingMode' : 39,
348 'FPFastMathMode' : 40,
349 'LinkageAttributes' : 41,
350 'NoContraction' : 42,
351 'InputAttachmentIndex' : 43,
353 'ExplicitInterpAMD' : 4999,
354 'OverrideCoverageNV' : 5248,
355 'PassthroughNV' : 5250,
356 'ViewportRelativeNV' : 5252,
357 'SecondaryViewportRelativeNV' : 5256,
370 'ViewportIndex' : 10,
371 'TessLevelOuter' : 11,
372 'TessLevelInner' : 12,
374 'PatchVertices' : 14,
379 'SamplePosition' : 19,
382 'HelperInvocation' : 23,
383 'NumWorkgroups' : 24,
384 'WorkgroupSize' : 25,
386 'LocalInvocationId' : 27,
387 'GlobalInvocationId' : 28,
388 'LocalInvocationIndex' : 29,
391 'EnqueuedWorkgroupSize' : 32,
393 'GlobalLinearId' : 34,
395 'SubgroupMaxSize' : 37,
397 'NumEnqueuedSubgroups' : 39,
399 'SubgroupLocalInvocationId' : 41,
401 'InstanceIndex' : 43,
402 'SubgroupEqMaskKHR' : 4416,
403 'SubgroupGeMaskKHR' : 4417,
404 'SubgroupGtMaskKHR' : 4418,
405 'SubgroupLeMaskKHR' : 4419,
406 'SubgroupLtMaskKHR' : 4420,
408 'BaseInstance' : 4425,
410 'DeviceIndex' : 4438,
412 'BaryCoordNoPerspAMD' : 4992,
413 'BaryCoordNoPerspCentroidAMD' : 4993,
414 'BaryCoordNoPerspSampleAMD' : 4994,
415 'BaryCoordSmoothAMD' : 4995,
416 'BaryCoordSmoothCentroidAMD' : 4996,
417 'BaryCoordSmoothSampleAMD' : 4997,
418 'BaryCoordPullModelAMD' : 4998,
419 'ViewportMaskNV' : 5253,
420 'SecondaryPositionNV' : 5257,
421 'SecondaryViewportMaskNV' : 5258,
422 'PositionPerViewNV' : 5261,
423 'ViewportMaskPerViewNV' : 5262,
426 'SelectionControlShift' : {
431 'SelectionControlMask' : {
433 'Flatten' : 0x00000001,
434 'DontFlatten' : 0x00000002,
437 'LoopControlShift' : {
442 'LoopControlMask' : {
444 'Unroll' : 0x00000001,
445 'DontUnroll' : 0x00000002,
448 'FunctionControlShift' : {
455 'FunctionControlMask' : {
457 'Inline' : 0x00000001,
458 'DontInline' : 0x00000002,
460 'Const' : 0x00000008,
463 'MemorySemanticsShift' : {
466 'AcquireRelease' : 3,
467 'SequentiallyConsistent' : 4,
469 'SubgroupMemory' : 7,
470 'WorkgroupMemory' : 8,
471 'CrossWorkgroupMemory' : 9,
472 'AtomicCounterMemory' : 10,
476 'MemorySemanticsMask' : {
478 'Acquire' : 0x00000002,
479 'Release' : 0x00000004,
480 'AcquireRelease' : 0x00000008,
481 'SequentiallyConsistent' : 0x00000010,
482 'UniformMemory' : 0x00000040,
483 'SubgroupMemory' : 0x00000080,
484 'WorkgroupMemory' : 0x00000100,
485 'CrossWorkgroupMemory' : 0x00000200,
486 'AtomicCounterMemory' : 0x00000400,
487 'ImageMemory' : 0x00000800,
490 'MemoryAccessShift' : {
496 'MemoryAccessMask' : {
498 'Volatile' : 0x00000001,
499 'Aligned' : 0x00000002,
500 'Nontemporal' : 0x00000004,
517 'KernelEnqueueFlags' : {
523 'KernelProfilingInfoShift' : {
527 'KernelProfilingInfoMask' : {
529 'CmdExecTime' : 0x00000001,
547 'ImageReadWrite' : 14,
551 'DeviceEnqueue' : 19,
552 'LiteralSampler' : 20,
553 'AtomicStorage' : 21,
555 'TessellationPointSize' : 23,
556 'GeometryPointSize' : 24,
557 'ImageGatherExtended' : 25,
558 'StorageImageMultisample' : 27,
559 'UniformBufferArrayDynamicIndexing' : 28,
560 'SampledImageArrayDynamicIndexing' : 29,
561 'StorageBufferArrayDynamicIndexing' : 30,
562 'StorageImageArrayDynamicIndexing' : 31,
565 'ImageCubeArray' : 34,
566 'SampleRateShading' : 35,
569 'GenericPointer' : 38,
571 'InputAttachment' : 40,
572 'SparseResidency' : 41,
576 'SampledCubeArray' : 45,
577 'SampledBuffer' : 46,
580 'StorageImageExtendedFormats' : 49,
582 'DerivativeControl' : 51,
583 'InterpolationFunction' : 52,
584 'TransformFeedback' : 53,
585 'GeometryStreams' : 54,
586 'StorageImageReadWithoutFormat' : 55,
587 'StorageImageWriteWithoutFormat' : 56,
588 'MultiViewport' : 57,
589 'SubgroupBallotKHR' : 4423,
590 'DrawParameters' : 4427,
591 'SubgroupVoteKHR' : 4431,
592 'StorageBuffer16BitAccess' : 4433,
593 'StorageUniformBufferBlock16' : 4433,
594 'StorageUniform16' : 4434,
595 'UniformAndStorageBuffer16BitAccess' : 4434,
596 'StoragePushConstant16' : 4435,
597 'StorageInputOutput16' : 4436,
598 'DeviceGroup' : 4437,
600 'VariablePointersStorageBuffer' : 4441,
601 'VariablePointers' : 4442,
602 'AtomicStorageOps' : 4445,
603 'SampleMaskPostDepthCoverage' : 4447,
604 'ImageGatherBiasLodAMD' : 5009,
605 'SampleMaskOverrideCoverageNV' : 5249,
606 'GeometryShaderPassthroughNV' : 5251,
607 'ShaderViewportIndexLayerNV' : 5254,
608 'ShaderViewportMaskNV' : 5255,
609 'ShaderStereoViewNV' : 5259,
610 'PerViewAttributesNV' : 5260,
616 'OpSourceContinued' : 2,
618 'OpSourceExtension' : 4,
624 'OpExtInstImport' : 11,
626 'OpMemoryModel' : 14,
628 'OpExecutionMode' : 16,
637 'OpTypeSampler' : 26,
638 'OpTypeSampledImage' : 27,
640 'OpTypeRuntimeArray' : 29,
643 'OpTypePointer' : 32,
644 'OpTypeFunction' : 33,
646 'OpTypeDeviceEvent' : 35,
647 'OpTypeReserveId' : 36,
650 'OpTypeForwardPointer' : 39,
651 'OpConstantTrue' : 41,
652 'OpConstantFalse' : 42,
654 'OpConstantComposite' : 44,
655 'OpConstantSampler' : 45,
656 'OpConstantNull' : 46,
657 'OpSpecConstantTrue' : 48,
658 'OpSpecConstantFalse' : 49,
659 'OpSpecConstant' : 50,
660 'OpSpecConstantComposite' : 51,
661 'OpSpecConstantOp' : 52,
663 'OpFunctionParameter' : 55,
664 'OpFunctionEnd' : 56,
665 'OpFunctionCall' : 57,
667 'OpImageTexelPointer' : 60,
671 'OpCopyMemorySized' : 64,
672 'OpAccessChain' : 65,
673 'OpInBoundsAccessChain' : 66,
674 'OpPtrAccessChain' : 67,
675 'OpArrayLength' : 68,
676 'OpGenericPtrMemSemantics' : 69,
677 'OpInBoundsPtrAccessChain' : 70,
679 'OpMemberDecorate' : 72,
680 'OpDecorationGroup' : 73,
681 'OpGroupDecorate' : 74,
682 'OpGroupMemberDecorate' : 75,
683 'OpVectorExtractDynamic' : 77,
684 'OpVectorInsertDynamic' : 78,
685 'OpVectorShuffle' : 79,
686 'OpCompositeConstruct' : 80,
687 'OpCompositeExtract' : 81,
688 'OpCompositeInsert' : 82,
691 'OpSampledImage' : 86,
692 'OpImageSampleImplicitLod' : 87,
693 'OpImageSampleExplicitLod' : 88,
694 'OpImageSampleDrefImplicitLod' : 89,
695 'OpImageSampleDrefExplicitLod' : 90,
696 'OpImageSampleProjImplicitLod' : 91,
697 'OpImageSampleProjExplicitLod' : 92,
698 'OpImageSampleProjDrefImplicitLod' : 93,
699 'OpImageSampleProjDrefExplicitLod' : 94,
701 'OpImageGather' : 96,
702 'OpImageDrefGather' : 97,
706 'OpImageQueryFormat' : 101,
707 'OpImageQueryOrder' : 102,
708 'OpImageQuerySizeLod' : 103,
709 'OpImageQuerySize' : 104,
710 'OpImageQueryLod' : 105,
711 'OpImageQueryLevels' : 106,
712 'OpImageQuerySamples' : 107,
713 'OpConvertFToU' : 109,
714 'OpConvertFToS' : 110,
715 'OpConvertSToF' : 111,
716 'OpConvertUToF' : 112,
720 'OpQuantizeToF16' : 116,
721 'OpConvertPtrToU' : 117,
722 'OpSatConvertSToU' : 118,
723 'OpSatConvertUToS' : 119,
724 'OpConvertUToPtr' : 120,
725 'OpPtrCastToGeneric' : 121,
726 'OpGenericCastToPtr' : 122,
727 'OpGenericCastToPtrExplicit' : 123,
745 'OpVectorTimesScalar' : 142,
746 'OpMatrixTimesScalar' : 143,
747 'OpVectorTimesMatrix' : 144,
748 'OpMatrixTimesVector' : 145,
749 'OpMatrixTimesMatrix' : 146,
750 'OpOuterProduct' : 147,
753 'OpISubBorrow' : 150,
754 'OpUMulExtended' : 151,
755 'OpSMulExtended' : 152,
762 'OpSignBitSet' : 160,
763 'OpLessOrGreater' : 161,
766 'OpLogicalEqual' : 164,
767 'OpLogicalNotEqual' : 165,
769 'OpLogicalAnd' : 167,
770 'OpLogicalNot' : 168,
774 'OpUGreaterThan' : 172,
775 'OpSGreaterThan' : 173,
776 'OpUGreaterThanEqual' : 174,
777 'OpSGreaterThanEqual' : 175,
780 'OpULessThanEqual' : 178,
781 'OpSLessThanEqual' : 179,
783 'OpFUnordEqual' : 181,
784 'OpFOrdNotEqual' : 182,
785 'OpFUnordNotEqual' : 183,
786 'OpFOrdLessThan' : 184,
787 'OpFUnordLessThan' : 185,
788 'OpFOrdGreaterThan' : 186,
789 'OpFUnordGreaterThan' : 187,
790 'OpFOrdLessThanEqual' : 188,
791 'OpFUnordLessThanEqual' : 189,
792 'OpFOrdGreaterThanEqual' : 190,
793 'OpFUnordGreaterThanEqual' : 191,
794 'OpShiftRightLogical' : 194,
795 'OpShiftRightArithmetic' : 195,
796 'OpShiftLeftLogical' : 196,
798 'OpBitwiseXor' : 198,
799 'OpBitwiseAnd' : 199,
801 'OpBitFieldInsert' : 201,
802 'OpBitFieldSExtract' : 202,
803 'OpBitFieldUExtract' : 203,
804 'OpBitReverse' : 204,
811 'OpFwidthFine' : 212,
812 'OpDPdxCoarse' : 213,
813 'OpDPdyCoarse' : 214,
814 'OpFwidthCoarse' : 215,
815 'OpEmitVertex' : 218,
816 'OpEndPrimitive' : 219,
817 'OpEmitStreamVertex' : 220,
818 'OpEndStreamPrimitive' : 221,
819 'OpControlBarrier' : 224,
820 'OpMemoryBarrier' : 225,
821 'OpAtomicLoad' : 227,
822 'OpAtomicStore' : 228,
823 'OpAtomicExchange' : 229,
824 'OpAtomicCompareExchange' : 230,
825 'OpAtomicCompareExchangeWeak' : 231,
826 'OpAtomicIIncrement' : 232,
827 'OpAtomicIDecrement' : 233,
828 'OpAtomicIAdd' : 234,
829 'OpAtomicISub' : 235,
830 'OpAtomicSMin' : 236,
831 'OpAtomicUMin' : 237,
832 'OpAtomicSMax' : 238,
833 'OpAtomicUMax' : 239,
839 'OpSelectionMerge' : 247,
842 'OpBranchConditional' : 250,
846 'OpReturnValue' : 254,
847 'OpUnreachable' : 255,
848 'OpLifetimeStart' : 256,
849 'OpLifetimeStop' : 257,
850 'OpGroupAsyncCopy' : 259,
851 'OpGroupWaitEvents' : 260,
854 'OpGroupBroadcast' : 263,
865 'OpReservedReadPipe' : 276,
866 'OpReservedWritePipe' : 277,
867 'OpReserveReadPipePackets' : 278,
868 'OpReserveWritePipePackets' : 279,
869 'OpCommitReadPipe' : 280,
870 'OpCommitWritePipe' : 281,
871 'OpIsValidReserveId' : 282,
872 'OpGetNumPipePackets' : 283,
873 'OpGetMaxPipePackets' : 284,
874 'OpGroupReserveReadPipePackets' : 285,
875 'OpGroupReserveWritePipePackets' : 286,
876 'OpGroupCommitReadPipe' : 287,
877 'OpGroupCommitWritePipe' : 288,
878 'OpEnqueueMarker' : 291,
879 'OpEnqueueKernel' : 292,
880 'OpGetKernelNDrangeSubGroupCount' : 293,
881 'OpGetKernelNDrangeMaxSubGroupSize' : 294,
882 'OpGetKernelWorkGroupSize' : 295,
883 'OpGetKernelPreferredWorkGroupSizeMultiple' : 296,
884 'OpRetainEvent' : 297,
885 'OpReleaseEvent' : 298,
886 'OpCreateUserEvent' : 299,
887 'OpIsValidEvent' : 300,
888 'OpSetUserEventStatus' : 301,
889 'OpCaptureEventProfilingInfo' : 302,
890 'OpGetDefaultQueue' : 303,
891 'OpBuildNDRange' : 304,
892 'OpImageSparseSampleImplicitLod' : 305,
893 'OpImageSparseSampleExplicitLod' : 306,
894 'OpImageSparseSampleDrefImplicitLod' : 307,
895 'OpImageSparseSampleDrefExplicitLod' : 308,
896 'OpImageSparseSampleProjImplicitLod' : 309,
897 'OpImageSparseSampleProjExplicitLod' : 310,
898 'OpImageSparseSampleProjDrefImplicitLod' : 311,
899 'OpImageSparseSampleProjDrefExplicitLod' : 312,
900 'OpImageSparseFetch' : 313,
901 'OpImageSparseGather' : 314,
902 'OpImageSparseDrefGather' : 315,
903 'OpImageSparseTexelsResident' : 316,
905 'OpAtomicFlagTestAndSet' : 318,
906 'OpAtomicFlagClear' : 319,
907 'OpImageSparseRead' : 320,
908 'OpSubgroupBallotKHR' : 4421,
909 'OpSubgroupFirstInvocationKHR' : 4422,
910 'OpSubgroupAllKHR' : 4428,
911 'OpSubgroupAnyKHR' : 4429,
912 'OpSubgroupAllEqualKHR' : 4430,
913 'OpSubgroupReadInvocationKHR' : 4432,
914 'OpGroupIAddNonUniformAMD' : 5000,
915 'OpGroupFAddNonUniformAMD' : 5001,
916 'OpGroupFMinNonUniformAMD' : 5002,
917 'OpGroupUMinNonUniformAMD' : 5003,
918 'OpGroupSMinNonUniformAMD' : 5004,
919 'OpGroupFMaxNonUniformAMD' : 5005,
920 'OpGroupUMaxNonUniformAMD' : 5006,
921 'OpGroupSMaxNonUniformAMD' : 5007,