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,
406 'SelectionControlShift' : {
411 'SelectionControlMask' : {
413 'Flatten' : 0x00000001,
414 'DontFlatten' : 0x00000002,
417 'LoopControlShift' : {
420 'DependencyInfinite' : 2,
421 'DependencyLength' : 3,
424 'LoopControlMask' : {
426 'Unroll' : 0x00000001,
427 'DontUnroll' : 0x00000002,
428 'DependencyInfinite' : 0x00000004,
429 'DependencyLength' : 0x00000008,
432 'FunctionControlShift' : {
439 'FunctionControlMask' : {
441 'Inline' : 0x00000001,
442 'DontInline' : 0x00000002,
444 'Const' : 0x00000008,
447 'MemorySemanticsShift' : {
450 'AcquireRelease' : 3,
451 'SequentiallyConsistent' : 4,
453 'SubgroupMemory' : 7,
454 'WorkgroupMemory' : 8,
455 'CrossWorkgroupMemory' : 9,
456 'AtomicCounterMemory' : 10,
460 'MemorySemanticsMask' : {
462 'Acquire' : 0x00000002,
463 'Release' : 0x00000004,
464 'AcquireRelease' : 0x00000008,
465 'SequentiallyConsistent' : 0x00000010,
466 'UniformMemory' : 0x00000040,
467 'SubgroupMemory' : 0x00000080,
468 'WorkgroupMemory' : 0x00000100,
469 'CrossWorkgroupMemory' : 0x00000200,
470 'AtomicCounterMemory' : 0x00000400,
471 'ImageMemory' : 0x00000800,
474 'MemoryAccessShift' : {
480 'MemoryAccessMask' : {
482 'Volatile' : 0x00000001,
483 'Aligned' : 0x00000002,
484 'Nontemporal' : 0x00000004,
501 'KernelEnqueueFlags' : {
507 'KernelProfilingInfoShift' : {
511 'KernelProfilingInfoMask' : {
513 'CmdExecTime' : 0x00000001,
531 'ImageReadWrite' : 14,
535 'DeviceEnqueue' : 19,
536 'LiteralSampler' : 20,
537 'AtomicStorage' : 21,
539 'TessellationPointSize' : 23,
540 'GeometryPointSize' : 24,
541 'ImageGatherExtended' : 25,
542 'StorageImageMultisample' : 27,
543 'UniformBufferArrayDynamicIndexing' : 28,
544 'SampledImageArrayDynamicIndexing' : 29,
545 'StorageBufferArrayDynamicIndexing' : 30,
546 'StorageImageArrayDynamicIndexing' : 31,
549 'ImageCubeArray' : 34,
550 'SampleRateShading' : 35,
553 'GenericPointer' : 38,
555 'InputAttachment' : 40,
556 'SparseResidency' : 41,
560 'SampledCubeArray' : 45,
561 'SampledBuffer' : 46,
564 'StorageImageExtendedFormats' : 49,
566 'DerivativeControl' : 51,
567 'InterpolationFunction' : 52,
568 'TransformFeedback' : 53,
569 'GeometryStreams' : 54,
570 'StorageImageReadWithoutFormat' : 55,
571 'StorageImageWriteWithoutFormat' : 56,
572 'MultiViewport' : 57,
573 'SubgroupDispatch' : 58,
576 'SubgroupBallotKHR' : 4423,
582 'OpSourceContinued' : 2,
584 'OpSourceExtension' : 4,
590 'OpExtInstImport' : 11,
592 'OpMemoryModel' : 14,
594 'OpExecutionMode' : 16,
603 'OpTypeSampler' : 26,
604 'OpTypeSampledImage' : 27,
606 'OpTypeRuntimeArray' : 29,
609 'OpTypePointer' : 32,
610 'OpTypeFunction' : 33,
612 'OpTypeDeviceEvent' : 35,
613 'OpTypeReserveId' : 36,
616 'OpTypeForwardPointer' : 39,
617 'OpConstantTrue' : 41,
618 'OpConstantFalse' : 42,
620 'OpConstantComposite' : 44,
621 'OpConstantSampler' : 45,
622 'OpConstantNull' : 46,
623 'OpSpecConstantTrue' : 48,
624 'OpSpecConstantFalse' : 49,
625 'OpSpecConstant' : 50,
626 'OpSpecConstantComposite' : 51,
627 'OpSpecConstantOp' : 52,
629 'OpFunctionParameter' : 55,
630 'OpFunctionEnd' : 56,
631 'OpFunctionCall' : 57,
633 'OpImageTexelPointer' : 60,
637 'OpCopyMemorySized' : 64,
638 'OpAccessChain' : 65,
639 'OpInBoundsAccessChain' : 66,
640 'OpPtrAccessChain' : 67,
641 'OpArrayLength' : 68,
642 'OpGenericPtrMemSemantics' : 69,
643 'OpInBoundsPtrAccessChain' : 70,
645 'OpMemberDecorate' : 72,
646 'OpDecorationGroup' : 73,
647 'OpGroupDecorate' : 74,
648 'OpGroupMemberDecorate' : 75,
649 'OpVectorExtractDynamic' : 77,
650 'OpVectorInsertDynamic' : 78,
651 'OpVectorShuffle' : 79,
652 'OpCompositeConstruct' : 80,
653 'OpCompositeExtract' : 81,
654 'OpCompositeInsert' : 82,
657 'OpSampledImage' : 86,
658 'OpImageSampleImplicitLod' : 87,
659 'OpImageSampleExplicitLod' : 88,
660 'OpImageSampleDrefImplicitLod' : 89,
661 'OpImageSampleDrefExplicitLod' : 90,
662 'OpImageSampleProjImplicitLod' : 91,
663 'OpImageSampleProjExplicitLod' : 92,
664 'OpImageSampleProjDrefImplicitLod' : 93,
665 'OpImageSampleProjDrefExplicitLod' : 94,
667 'OpImageGather' : 96,
668 'OpImageDrefGather' : 97,
672 'OpImageQueryFormat' : 101,
673 'OpImageQueryOrder' : 102,
674 'OpImageQuerySizeLod' : 103,
675 'OpImageQuerySize' : 104,
676 'OpImageQueryLod' : 105,
677 'OpImageQueryLevels' : 106,
678 'OpImageQuerySamples' : 107,
679 'OpConvertFToU' : 109,
680 'OpConvertFToS' : 110,
681 'OpConvertSToF' : 111,
682 'OpConvertUToF' : 112,
686 'OpQuantizeToF16' : 116,
687 'OpConvertPtrToU' : 117,
688 'OpSatConvertSToU' : 118,
689 'OpSatConvertUToS' : 119,
690 'OpConvertUToPtr' : 120,
691 'OpPtrCastToGeneric' : 121,
692 'OpGenericCastToPtr' : 122,
693 'OpGenericCastToPtrExplicit' : 123,
711 'OpVectorTimesScalar' : 142,
712 'OpMatrixTimesScalar' : 143,
713 'OpVectorTimesMatrix' : 144,
714 'OpMatrixTimesVector' : 145,
715 'OpMatrixTimesMatrix' : 146,
716 'OpOuterProduct' : 147,
719 'OpISubBorrow' : 150,
720 'OpUMulExtended' : 151,
721 'OpSMulExtended' : 152,
728 'OpSignBitSet' : 160,
729 'OpLessOrGreater' : 161,
732 'OpLogicalEqual' : 164,
733 'OpLogicalNotEqual' : 165,
735 'OpLogicalAnd' : 167,
736 'OpLogicalNot' : 168,
740 'OpUGreaterThan' : 172,
741 'OpSGreaterThan' : 173,
742 'OpUGreaterThanEqual' : 174,
743 'OpSGreaterThanEqual' : 175,
746 'OpULessThanEqual' : 178,
747 'OpSLessThanEqual' : 179,
749 'OpFUnordEqual' : 181,
750 'OpFOrdNotEqual' : 182,
751 'OpFUnordNotEqual' : 183,
752 'OpFOrdLessThan' : 184,
753 'OpFUnordLessThan' : 185,
754 'OpFOrdGreaterThan' : 186,
755 'OpFUnordGreaterThan' : 187,
756 'OpFOrdLessThanEqual' : 188,
757 'OpFUnordLessThanEqual' : 189,
758 'OpFOrdGreaterThanEqual' : 190,
759 'OpFUnordGreaterThanEqual' : 191,
760 'OpShiftRightLogical' : 194,
761 'OpShiftRightArithmetic' : 195,
762 'OpShiftLeftLogical' : 196,
764 'OpBitwiseXor' : 198,
765 'OpBitwiseAnd' : 199,
767 'OpBitFieldInsert' : 201,
768 'OpBitFieldSExtract' : 202,
769 'OpBitFieldUExtract' : 203,
770 'OpBitReverse' : 204,
777 'OpFwidthFine' : 212,
778 'OpDPdxCoarse' : 213,
779 'OpDPdyCoarse' : 214,
780 'OpFwidthCoarse' : 215,
781 'OpEmitVertex' : 218,
782 'OpEndPrimitive' : 219,
783 'OpEmitStreamVertex' : 220,
784 'OpEndStreamPrimitive' : 221,
785 'OpControlBarrier' : 224,
786 'OpMemoryBarrier' : 225,
787 'OpAtomicLoad' : 227,
788 'OpAtomicStore' : 228,
789 'OpAtomicExchange' : 229,
790 'OpAtomicCompareExchange' : 230,
791 'OpAtomicCompareExchangeWeak' : 231,
792 'OpAtomicIIncrement' : 232,
793 'OpAtomicIDecrement' : 233,
794 'OpAtomicIAdd' : 234,
795 'OpAtomicISub' : 235,
796 'OpAtomicSMin' : 236,
797 'OpAtomicUMin' : 237,
798 'OpAtomicSMax' : 238,
799 'OpAtomicUMax' : 239,
805 'OpSelectionMerge' : 247,
808 'OpBranchConditional' : 250,
812 'OpReturnValue' : 254,
813 'OpUnreachable' : 255,
814 'OpLifetimeStart' : 256,
815 'OpLifetimeStop' : 257,
816 'OpGroupAsyncCopy' : 259,
817 'OpGroupWaitEvents' : 260,
820 'OpGroupBroadcast' : 263,
831 'OpReservedReadPipe' : 276,
832 'OpReservedWritePipe' : 277,
833 'OpReserveReadPipePackets' : 278,
834 'OpReserveWritePipePackets' : 279,
835 'OpCommitReadPipe' : 280,
836 'OpCommitWritePipe' : 281,
837 'OpIsValidReserveId' : 282,
838 'OpGetNumPipePackets' : 283,
839 'OpGetMaxPipePackets' : 284,
840 'OpGroupReserveReadPipePackets' : 285,
841 'OpGroupReserveWritePipePackets' : 286,
842 'OpGroupCommitReadPipe' : 287,
843 'OpGroupCommitWritePipe' : 288,
844 'OpEnqueueMarker' : 291,
845 'OpEnqueueKernel' : 292,
846 'OpGetKernelNDrangeSubGroupCount' : 293,
847 'OpGetKernelNDrangeMaxSubGroupSize' : 294,
848 'OpGetKernelWorkGroupSize' : 295,
849 'OpGetKernelPreferredWorkGroupSizeMultiple' : 296,
850 'OpRetainEvent' : 297,
851 'OpReleaseEvent' : 298,
852 'OpCreateUserEvent' : 299,
853 'OpIsValidEvent' : 300,
854 'OpSetUserEventStatus' : 301,
855 'OpCaptureEventProfilingInfo' : 302,
856 'OpGetDefaultQueue' : 303,
857 'OpBuildNDRange' : 304,
858 'OpImageSparseSampleImplicitLod' : 305,
859 'OpImageSparseSampleExplicitLod' : 306,
860 'OpImageSparseSampleDrefImplicitLod' : 307,
861 'OpImageSparseSampleDrefExplicitLod' : 308,
862 'OpImageSparseSampleProjImplicitLod' : 309,
863 'OpImageSparseSampleProjExplicitLod' : 310,
864 'OpImageSparseSampleProjDrefImplicitLod' : 311,
865 'OpImageSparseSampleProjDrefExplicitLod' : 312,
866 'OpImageSparseFetch' : 313,
867 'OpImageSparseGather' : 314,
868 'OpImageSparseDrefGather' : 315,
869 'OpImageSparseTexelsResident' : 316,
871 'OpAtomicFlagTestAndSet' : 318,
872 'OpAtomicFlagClear' : 319,
873 'OpImageSparseRead' : 320,
875 'OpTypePipeStorage' : 322,
876 'OpConstantPipeStorage' : 323,
877 'OpCreatePipeFromPipeStorage' : 324,
878 'OpGetKernelLocalSizeForSubgroupCount' : 325,
879 'OpGetKernelMaxNumSubgroups' : 326,
880 'OpTypeNamedBarrier' : 327,
881 'OpNamedBarrierInitialize' : 328,
882 'OpMemoryNamedBarrier' : 329,
883 'OpModuleProcessed' : 330,
884 'OpSubgroupBallotKHR' : 4421,
885 'OpSubgroupFirstInvocationKHR' : 4422,