1 # Copyright (c) 2014-2016 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,
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 'SubgroupsPerWorkgroup' : 36,
118 'UniformConstant' : 0,
123 'CrossWorkgroup' : 5,
128 'AtomicCounter' : 10,
142 'SamplerAddressingMode' : {
147 'RepeatMirrored' : 4,
150 'SamplerFilterMode' : {
198 'ImageChannelOrder' : {
221 'ImageChannelDataType' : {
228 'UnormInt101010' : 6,
233 'UnsignedInt16' : 11,
234 'UnsignedInt32' : 12,
238 'UnormInt101010_2' : 16,
241 'ImageOperandsShift' : {
252 'ImageOperandsMask' : {
257 'ConstOffset' : 0x00000008,
258 'Offset' : 0x00000010,
259 'ConstOffsets' : 0x00000020,
260 'Sample' : 0x00000040,
261 'MinLod' : 0x00000080,
264 'FPFastMathModeShift' : {
272 'FPFastMathModeMask' : {
274 'NotNaN' : 0x00000001,
275 'NotInf' : 0x00000002,
277 'AllowRecip' : 0x00000008,
293 'AccessQualifier' : {
299 'FunctionParameterAttribute' : {
311 'RelaxedPrecision' : 0,
323 'NoPerspective' : 13,
337 'SaturatedConversion' : 28,
343 'DescriptorSet' : 34,
347 'FuncParamAttr' : 38,
348 'FPRoundingMode' : 39,
349 'FPFastMathMode' : 40,
350 'LinkageAttributes' : 41,
351 'NoContraction' : 42,
352 'InputAttachmentIndex' : 43,
354 'MaxByteOffset' : 45,
367 'ViewportIndex' : 10,
368 'TessLevelOuter' : 11,
369 'TessLevelInner' : 12,
371 'PatchVertices' : 14,
376 'SamplePosition' : 19,
379 'HelperInvocation' : 23,
380 'NumWorkgroups' : 24,
381 'WorkgroupSize' : 25,
383 'LocalInvocationId' : 27,
384 'GlobalInvocationId' : 28,
385 'LocalInvocationIndex' : 29,
388 'EnqueuedWorkgroupSize' : 32,
390 'GlobalLinearId' : 34,
392 'SubgroupMaxSize' : 37,
394 'NumEnqueuedSubgroups' : 39,
396 'SubgroupLocalInvocationId' : 41,
398 'InstanceIndex' : 43,
399 'SubgroupEqMaskKHR' : 4416,
400 'SubgroupGeMaskKHR' : 4417,
401 'SubgroupGtMaskKHR' : 4418,
402 'SubgroupLeMaskKHR' : 4419,
403 'SubgroupLtMaskKHR' : 4420,
405 'BaseInstance' : 4425,
409 'SelectionControlShift' : {
414 'SelectionControlMask' : {
416 'Flatten' : 0x00000001,
417 'DontFlatten' : 0x00000002,
420 'LoopControlShift' : {
423 'DependencyInfinite' : 2,
424 'DependencyLength' : 3,
427 'LoopControlMask' : {
429 'Unroll' : 0x00000001,
430 'DontUnroll' : 0x00000002,
431 'DependencyInfinite' : 0x00000004,
432 'DependencyLength' : 0x00000008,
435 'FunctionControlShift' : {
442 'FunctionControlMask' : {
444 'Inline' : 0x00000001,
445 'DontInline' : 0x00000002,
447 'Const' : 0x00000008,
450 'MemorySemanticsShift' : {
453 'AcquireRelease' : 3,
454 'SequentiallyConsistent' : 4,
456 'SubgroupMemory' : 7,
457 'WorkgroupMemory' : 8,
458 'CrossWorkgroupMemory' : 9,
459 'AtomicCounterMemory' : 10,
463 'MemorySemanticsMask' : {
465 'Acquire' : 0x00000002,
466 'Release' : 0x00000004,
467 'AcquireRelease' : 0x00000008,
468 'SequentiallyConsistent' : 0x00000010,
469 'UniformMemory' : 0x00000040,
470 'SubgroupMemory' : 0x00000080,
471 'WorkgroupMemory' : 0x00000100,
472 'CrossWorkgroupMemory' : 0x00000200,
473 'AtomicCounterMemory' : 0x00000400,
474 'ImageMemory' : 0x00000800,
477 'MemoryAccessShift' : {
483 'MemoryAccessMask' : {
485 'Volatile' : 0x00000001,
486 'Aligned' : 0x00000002,
487 'Nontemporal' : 0x00000004,
504 'KernelEnqueueFlags' : {
510 'KernelProfilingInfoShift' : {
514 'KernelProfilingInfoMask' : {
516 'CmdExecTime' : 0x00000001,
534 'ImageReadWrite' : 14,
538 'DeviceEnqueue' : 19,
539 'LiteralSampler' : 20,
540 'AtomicStorage' : 21,
542 'TessellationPointSize' : 23,
543 'GeometryPointSize' : 24,
544 'ImageGatherExtended' : 25,
545 'StorageImageMultisample' : 27,
546 'UniformBufferArrayDynamicIndexing' : 28,
547 'SampledImageArrayDynamicIndexing' : 29,
548 'StorageBufferArrayDynamicIndexing' : 30,
549 'StorageImageArrayDynamicIndexing' : 31,
552 'ImageCubeArray' : 34,
553 'SampleRateShading' : 35,
556 'GenericPointer' : 38,
558 'InputAttachment' : 40,
559 'SparseResidency' : 41,
563 'SampledCubeArray' : 45,
564 'SampledBuffer' : 46,
567 'StorageImageExtendedFormats' : 49,
569 'DerivativeControl' : 51,
570 'InterpolationFunction' : 52,
571 'TransformFeedback' : 53,
572 'GeometryStreams' : 54,
573 'StorageImageReadWithoutFormat' : 55,
574 'StorageImageWriteWithoutFormat' : 56,
575 'MultiViewport' : 57,
576 'SubgroupDispatch' : 58,
579 'SubgroupBallotKHR' : 4423,
580 'DrawParameters' : 4427,
586 'OpSourceContinued' : 2,
588 'OpSourceExtension' : 4,
594 'OpExtInstImport' : 11,
596 'OpMemoryModel' : 14,
598 'OpExecutionMode' : 16,
607 'OpTypeSampler' : 26,
608 'OpTypeSampledImage' : 27,
610 'OpTypeRuntimeArray' : 29,
613 'OpTypePointer' : 32,
614 'OpTypeFunction' : 33,
616 'OpTypeDeviceEvent' : 35,
617 'OpTypeReserveId' : 36,
620 'OpTypeForwardPointer' : 39,
621 'OpConstantTrue' : 41,
622 'OpConstantFalse' : 42,
624 'OpConstantComposite' : 44,
625 'OpConstantSampler' : 45,
626 'OpConstantNull' : 46,
627 'OpSpecConstantTrue' : 48,
628 'OpSpecConstantFalse' : 49,
629 'OpSpecConstant' : 50,
630 'OpSpecConstantComposite' : 51,
631 'OpSpecConstantOp' : 52,
633 'OpFunctionParameter' : 55,
634 'OpFunctionEnd' : 56,
635 'OpFunctionCall' : 57,
637 'OpImageTexelPointer' : 60,
641 'OpCopyMemorySized' : 64,
642 'OpAccessChain' : 65,
643 'OpInBoundsAccessChain' : 66,
644 'OpPtrAccessChain' : 67,
645 'OpArrayLength' : 68,
646 'OpGenericPtrMemSemantics' : 69,
647 'OpInBoundsPtrAccessChain' : 70,
649 'OpMemberDecorate' : 72,
650 'OpDecorationGroup' : 73,
651 'OpGroupDecorate' : 74,
652 'OpGroupMemberDecorate' : 75,
653 'OpVectorExtractDynamic' : 77,
654 'OpVectorInsertDynamic' : 78,
655 'OpVectorShuffle' : 79,
656 'OpCompositeConstruct' : 80,
657 'OpCompositeExtract' : 81,
658 'OpCompositeInsert' : 82,
661 'OpSampledImage' : 86,
662 'OpImageSampleImplicitLod' : 87,
663 'OpImageSampleExplicitLod' : 88,
664 'OpImageSampleDrefImplicitLod' : 89,
665 'OpImageSampleDrefExplicitLod' : 90,
666 'OpImageSampleProjImplicitLod' : 91,
667 'OpImageSampleProjExplicitLod' : 92,
668 'OpImageSampleProjDrefImplicitLod' : 93,
669 'OpImageSampleProjDrefExplicitLod' : 94,
671 'OpImageGather' : 96,
672 'OpImageDrefGather' : 97,
676 'OpImageQueryFormat' : 101,
677 'OpImageQueryOrder' : 102,
678 'OpImageQuerySizeLod' : 103,
679 'OpImageQuerySize' : 104,
680 'OpImageQueryLod' : 105,
681 'OpImageQueryLevels' : 106,
682 'OpImageQuerySamples' : 107,
683 'OpConvertFToU' : 109,
684 'OpConvertFToS' : 110,
685 'OpConvertSToF' : 111,
686 'OpConvertUToF' : 112,
690 'OpQuantizeToF16' : 116,
691 'OpConvertPtrToU' : 117,
692 'OpSatConvertSToU' : 118,
693 'OpSatConvertUToS' : 119,
694 'OpConvertUToPtr' : 120,
695 'OpPtrCastToGeneric' : 121,
696 'OpGenericCastToPtr' : 122,
697 'OpGenericCastToPtrExplicit' : 123,
715 'OpVectorTimesScalar' : 142,
716 'OpMatrixTimesScalar' : 143,
717 'OpVectorTimesMatrix' : 144,
718 'OpMatrixTimesVector' : 145,
719 'OpMatrixTimesMatrix' : 146,
720 'OpOuterProduct' : 147,
723 'OpISubBorrow' : 150,
724 'OpUMulExtended' : 151,
725 'OpSMulExtended' : 152,
732 'OpSignBitSet' : 160,
733 'OpLessOrGreater' : 161,
736 'OpLogicalEqual' : 164,
737 'OpLogicalNotEqual' : 165,
739 'OpLogicalAnd' : 167,
740 'OpLogicalNot' : 168,
744 'OpUGreaterThan' : 172,
745 'OpSGreaterThan' : 173,
746 'OpUGreaterThanEqual' : 174,
747 'OpSGreaterThanEqual' : 175,
750 'OpULessThanEqual' : 178,
751 'OpSLessThanEqual' : 179,
753 'OpFUnordEqual' : 181,
754 'OpFOrdNotEqual' : 182,
755 'OpFUnordNotEqual' : 183,
756 'OpFOrdLessThan' : 184,
757 'OpFUnordLessThan' : 185,
758 'OpFOrdGreaterThan' : 186,
759 'OpFUnordGreaterThan' : 187,
760 'OpFOrdLessThanEqual' : 188,
761 'OpFUnordLessThanEqual' : 189,
762 'OpFOrdGreaterThanEqual' : 190,
763 'OpFUnordGreaterThanEqual' : 191,
764 'OpShiftRightLogical' : 194,
765 'OpShiftRightArithmetic' : 195,
766 'OpShiftLeftLogical' : 196,
768 'OpBitwiseXor' : 198,
769 'OpBitwiseAnd' : 199,
771 'OpBitFieldInsert' : 201,
772 'OpBitFieldSExtract' : 202,
773 'OpBitFieldUExtract' : 203,
774 'OpBitReverse' : 204,
781 'OpFwidthFine' : 212,
782 'OpDPdxCoarse' : 213,
783 'OpDPdyCoarse' : 214,
784 'OpFwidthCoarse' : 215,
785 'OpEmitVertex' : 218,
786 'OpEndPrimitive' : 219,
787 'OpEmitStreamVertex' : 220,
788 'OpEndStreamPrimitive' : 221,
789 'OpControlBarrier' : 224,
790 'OpMemoryBarrier' : 225,
791 'OpAtomicLoad' : 227,
792 'OpAtomicStore' : 228,
793 'OpAtomicExchange' : 229,
794 'OpAtomicCompareExchange' : 230,
795 'OpAtomicCompareExchangeWeak' : 231,
796 'OpAtomicIIncrement' : 232,
797 'OpAtomicIDecrement' : 233,
798 'OpAtomicIAdd' : 234,
799 'OpAtomicISub' : 235,
800 'OpAtomicSMin' : 236,
801 'OpAtomicUMin' : 237,
802 'OpAtomicSMax' : 238,
803 'OpAtomicUMax' : 239,
809 'OpSelectionMerge' : 247,
812 'OpBranchConditional' : 250,
816 'OpReturnValue' : 254,
817 'OpUnreachable' : 255,
818 'OpLifetimeStart' : 256,
819 'OpLifetimeStop' : 257,
820 'OpGroupAsyncCopy' : 259,
821 'OpGroupWaitEvents' : 260,
824 'OpGroupBroadcast' : 263,
835 'OpReservedReadPipe' : 276,
836 'OpReservedWritePipe' : 277,
837 'OpReserveReadPipePackets' : 278,
838 'OpReserveWritePipePackets' : 279,
839 'OpCommitReadPipe' : 280,
840 'OpCommitWritePipe' : 281,
841 'OpIsValidReserveId' : 282,
842 'OpGetNumPipePackets' : 283,
843 'OpGetMaxPipePackets' : 284,
844 'OpGroupReserveReadPipePackets' : 285,
845 'OpGroupReserveWritePipePackets' : 286,
846 'OpGroupCommitReadPipe' : 287,
847 'OpGroupCommitWritePipe' : 288,
848 'OpEnqueueMarker' : 291,
849 'OpEnqueueKernel' : 292,
850 'OpGetKernelNDrangeSubGroupCount' : 293,
851 'OpGetKernelNDrangeMaxSubGroupSize' : 294,
852 'OpGetKernelWorkGroupSize' : 295,
853 'OpGetKernelPreferredWorkGroupSizeMultiple' : 296,
854 'OpRetainEvent' : 297,
855 'OpReleaseEvent' : 298,
856 'OpCreateUserEvent' : 299,
857 'OpIsValidEvent' : 300,
858 'OpSetUserEventStatus' : 301,
859 'OpCaptureEventProfilingInfo' : 302,
860 'OpGetDefaultQueue' : 303,
861 'OpBuildNDRange' : 304,
862 'OpImageSparseSampleImplicitLod' : 305,
863 'OpImageSparseSampleExplicitLod' : 306,
864 'OpImageSparseSampleDrefImplicitLod' : 307,
865 'OpImageSparseSampleDrefExplicitLod' : 308,
866 'OpImageSparseSampleProjImplicitLod' : 309,
867 'OpImageSparseSampleProjExplicitLod' : 310,
868 'OpImageSparseSampleProjDrefImplicitLod' : 311,
869 'OpImageSparseSampleProjDrefExplicitLod' : 312,
870 'OpImageSparseFetch' : 313,
871 'OpImageSparseGather' : 314,
872 'OpImageSparseDrefGather' : 315,
873 'OpImageSparseTexelsResident' : 316,
875 'OpAtomicFlagTestAndSet' : 318,
876 'OpAtomicFlagClear' : 319,
877 'OpImageSparseRead' : 320,
879 'OpTypePipeStorage' : 322,
880 'OpConstantPipeStorage' : 323,
881 'OpCreatePipeFromPipeStorage' : 324,
882 'OpGetKernelLocalSizeForSubgroupCount' : 325,
883 'OpGetKernelMaxNumSubgroups' : 326,
884 'OpTypeNamedBarrier' : 327,
885 'OpNamedBarrierInitialize' : 328,
886 'OpMemoryNamedBarrier' : 329,
887 'OpModuleProcessed' : 330,
888 'OpSubgroupBallotKHR' : 4421,
889 'OpSubgroupFirstInvocationKHR' : 4422,