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,
115 'UniformConstant' : 0,
120 'CrossWorkgroup' : 5,
125 'AtomicCounter' : 10,
127 'StorageBuffer' : 12,
140 'SamplerAddressingMode' : {
145 'RepeatMirrored' : 4,
148 'SamplerFilterMode' : {
196 'ImageChannelOrder' : {
219 'ImageChannelDataType' : {
226 'UnormInt101010' : 6,
231 'UnsignedInt16' : 11,
232 'UnsignedInt32' : 12,
236 'UnormInt101010_2' : 16,
239 'ImageOperandsShift' : {
250 'ImageOperandsMask' : {
255 'ConstOffset' : 0x00000008,
256 'Offset' : 0x00000010,
257 'ConstOffsets' : 0x00000020,
258 'Sample' : 0x00000040,
259 'MinLod' : 0x00000080,
262 'FPFastMathModeShift' : {
270 'FPFastMathModeMask' : {
272 'NotNaN' : 0x00000001,
273 'NotInf' : 0x00000002,
275 'AllowRecip' : 0x00000008,
291 'AccessQualifier' : {
297 'FunctionParameterAttribute' : {
309 'RelaxedPrecision' : 0,
321 'NoPerspective' : 13,
335 'SaturatedConversion' : 28,
341 'DescriptorSet' : 34,
345 'FuncParamAttr' : 38,
346 'FPRoundingMode' : 39,
347 'FPFastMathMode' : 40,
348 'LinkageAttributes' : 41,
349 'NoContraction' : 42,
350 'InputAttachmentIndex' : 43,
352 'OverrideCoverageNV' : 5248,
353 'PassthroughNV' : 5250,
354 'ViewportRelativeNV' : 5252,
355 'SecondaryViewportRelativeNV' : 5256,
368 'ViewportIndex' : 10,
369 'TessLevelOuter' : 11,
370 'TessLevelInner' : 12,
372 'PatchVertices' : 14,
377 'SamplePosition' : 19,
380 'HelperInvocation' : 23,
381 'NumWorkgroups' : 24,
382 'WorkgroupSize' : 25,
384 'LocalInvocationId' : 27,
385 'GlobalInvocationId' : 28,
386 'LocalInvocationIndex' : 29,
389 'EnqueuedWorkgroupSize' : 32,
391 'GlobalLinearId' : 34,
393 'SubgroupMaxSize' : 37,
395 'NumEnqueuedSubgroups' : 39,
397 'SubgroupLocalInvocationId' : 41,
399 'InstanceIndex' : 43,
400 'SubgroupEqMaskKHR' : 4416,
401 'SubgroupGeMaskKHR' : 4417,
402 'SubgroupGtMaskKHR' : 4418,
403 'SubgroupLeMaskKHR' : 4419,
404 'SubgroupLtMaskKHR' : 4420,
406 'BaseInstance' : 4425,
408 'DeviceIndex' : 4438,
410 'ViewportMaskNV' : 5253,
411 'SecondaryPositionNV' : 5257,
412 'SecondaryViewportMaskNV' : 5258,
413 'PositionPerViewNV' : 5261,
414 'ViewportMaskPerViewNV' : 5262,
417 'SelectionControlShift' : {
422 'SelectionControlMask' : {
424 'Flatten' : 0x00000001,
425 'DontFlatten' : 0x00000002,
428 'LoopControlShift' : {
433 'LoopControlMask' : {
435 'Unroll' : 0x00000001,
436 'DontUnroll' : 0x00000002,
439 'FunctionControlShift' : {
446 'FunctionControlMask' : {
448 'Inline' : 0x00000001,
449 'DontInline' : 0x00000002,
451 'Const' : 0x00000008,
454 'MemorySemanticsShift' : {
457 'AcquireRelease' : 3,
458 'SequentiallyConsistent' : 4,
460 'SubgroupMemory' : 7,
461 'WorkgroupMemory' : 8,
462 'CrossWorkgroupMemory' : 9,
463 'AtomicCounterMemory' : 10,
467 'MemorySemanticsMask' : {
469 'Acquire' : 0x00000002,
470 'Release' : 0x00000004,
471 'AcquireRelease' : 0x00000008,
472 'SequentiallyConsistent' : 0x00000010,
473 'UniformMemory' : 0x00000040,
474 'SubgroupMemory' : 0x00000080,
475 'WorkgroupMemory' : 0x00000100,
476 'CrossWorkgroupMemory' : 0x00000200,
477 'AtomicCounterMemory' : 0x00000400,
478 'ImageMemory' : 0x00000800,
481 'MemoryAccessShift' : {
487 'MemoryAccessMask' : {
489 'Volatile' : 0x00000001,
490 'Aligned' : 0x00000002,
491 'Nontemporal' : 0x00000004,
508 'KernelEnqueueFlags' : {
514 'KernelProfilingInfoShift' : {
518 'KernelProfilingInfoMask' : {
520 'CmdExecTime' : 0x00000001,
538 'ImageReadWrite' : 14,
542 'DeviceEnqueue' : 19,
543 'LiteralSampler' : 20,
544 'AtomicStorage' : 21,
546 'TessellationPointSize' : 23,
547 'GeometryPointSize' : 24,
548 'ImageGatherExtended' : 25,
549 'StorageImageMultisample' : 27,
550 'UniformBufferArrayDynamicIndexing' : 28,
551 'SampledImageArrayDynamicIndexing' : 29,
552 'StorageBufferArrayDynamicIndexing' : 30,
553 'StorageImageArrayDynamicIndexing' : 31,
556 'ImageCubeArray' : 34,
557 'SampleRateShading' : 35,
560 'GenericPointer' : 38,
562 'InputAttachment' : 40,
563 'SparseResidency' : 41,
567 'SampledCubeArray' : 45,
568 'SampledBuffer' : 46,
571 'StorageImageExtendedFormats' : 49,
573 'DerivativeControl' : 51,
574 'InterpolationFunction' : 52,
575 'TransformFeedback' : 53,
576 'GeometryStreams' : 54,
577 'StorageImageReadWithoutFormat' : 55,
578 'StorageImageWriteWithoutFormat' : 56,
579 'MultiViewport' : 57,
580 'SubgroupBallotKHR' : 4423,
581 'DrawParameters' : 4427,
582 'SubgroupVoteKHR' : 4431,
583 'StorageBuffer16BitAccess' : 4433,
584 'StorageUniformBufferBlock16' : 4433,
585 'StorageUniform16' : 4434,
586 'UniformAndStorageBuffer16BitAccess' : 4434,
587 'StoragePushConstant16' : 4435,
588 'StorageInputOutput16' : 4436,
589 'DeviceGroup' : 4437,
591 'VariablePointersStorageBuffer' : 4441,
592 'VariablePointers' : 4442,
593 'SampleMaskOverrideCoverageNV' : 5249,
594 'GeometryShaderPassthroughNV' : 5251,
595 'ShaderViewportIndexLayerNV' : 5254,
596 'ShaderViewportMaskNV' : 5255,
597 'ShaderStereoViewNV' : 5259,
598 'PerViewAttributesNV' : 5260,
604 'OpSourceContinued' : 2,
606 'OpSourceExtension' : 4,
612 'OpExtInstImport' : 11,
614 'OpMemoryModel' : 14,
616 'OpExecutionMode' : 16,
625 'OpTypeSampler' : 26,
626 'OpTypeSampledImage' : 27,
628 'OpTypeRuntimeArray' : 29,
631 'OpTypePointer' : 32,
632 'OpTypeFunction' : 33,
634 'OpTypeDeviceEvent' : 35,
635 'OpTypeReserveId' : 36,
638 'OpTypeForwardPointer' : 39,
639 'OpConstantTrue' : 41,
640 'OpConstantFalse' : 42,
642 'OpConstantComposite' : 44,
643 'OpConstantSampler' : 45,
644 'OpConstantNull' : 46,
645 'OpSpecConstantTrue' : 48,
646 'OpSpecConstantFalse' : 49,
647 'OpSpecConstant' : 50,
648 'OpSpecConstantComposite' : 51,
649 'OpSpecConstantOp' : 52,
651 'OpFunctionParameter' : 55,
652 'OpFunctionEnd' : 56,
653 'OpFunctionCall' : 57,
655 'OpImageTexelPointer' : 60,
659 'OpCopyMemorySized' : 64,
660 'OpAccessChain' : 65,
661 'OpInBoundsAccessChain' : 66,
662 'OpPtrAccessChain' : 67,
663 'OpArrayLength' : 68,
664 'OpGenericPtrMemSemantics' : 69,
665 'OpInBoundsPtrAccessChain' : 70,
667 'OpMemberDecorate' : 72,
668 'OpDecorationGroup' : 73,
669 'OpGroupDecorate' : 74,
670 'OpGroupMemberDecorate' : 75,
671 'OpVectorExtractDynamic' : 77,
672 'OpVectorInsertDynamic' : 78,
673 'OpVectorShuffle' : 79,
674 'OpCompositeConstruct' : 80,
675 'OpCompositeExtract' : 81,
676 'OpCompositeInsert' : 82,
679 'OpSampledImage' : 86,
680 'OpImageSampleImplicitLod' : 87,
681 'OpImageSampleExplicitLod' : 88,
682 'OpImageSampleDrefImplicitLod' : 89,
683 'OpImageSampleDrefExplicitLod' : 90,
684 'OpImageSampleProjImplicitLod' : 91,
685 'OpImageSampleProjExplicitLod' : 92,
686 'OpImageSampleProjDrefImplicitLod' : 93,
687 'OpImageSampleProjDrefExplicitLod' : 94,
689 'OpImageGather' : 96,
690 'OpImageDrefGather' : 97,
694 'OpImageQueryFormat' : 101,
695 'OpImageQueryOrder' : 102,
696 'OpImageQuerySizeLod' : 103,
697 'OpImageQuerySize' : 104,
698 'OpImageQueryLod' : 105,
699 'OpImageQueryLevels' : 106,
700 'OpImageQuerySamples' : 107,
701 'OpConvertFToU' : 109,
702 'OpConvertFToS' : 110,
703 'OpConvertSToF' : 111,
704 'OpConvertUToF' : 112,
708 'OpQuantizeToF16' : 116,
709 'OpConvertPtrToU' : 117,
710 'OpSatConvertSToU' : 118,
711 'OpSatConvertUToS' : 119,
712 'OpConvertUToPtr' : 120,
713 'OpPtrCastToGeneric' : 121,
714 'OpGenericCastToPtr' : 122,
715 'OpGenericCastToPtrExplicit' : 123,
733 'OpVectorTimesScalar' : 142,
734 'OpMatrixTimesScalar' : 143,
735 'OpVectorTimesMatrix' : 144,
736 'OpMatrixTimesVector' : 145,
737 'OpMatrixTimesMatrix' : 146,
738 'OpOuterProduct' : 147,
741 'OpISubBorrow' : 150,
742 'OpUMulExtended' : 151,
743 'OpSMulExtended' : 152,
750 'OpSignBitSet' : 160,
751 'OpLessOrGreater' : 161,
754 'OpLogicalEqual' : 164,
755 'OpLogicalNotEqual' : 165,
757 'OpLogicalAnd' : 167,
758 'OpLogicalNot' : 168,
762 'OpUGreaterThan' : 172,
763 'OpSGreaterThan' : 173,
764 'OpUGreaterThanEqual' : 174,
765 'OpSGreaterThanEqual' : 175,
768 'OpULessThanEqual' : 178,
769 'OpSLessThanEqual' : 179,
771 'OpFUnordEqual' : 181,
772 'OpFOrdNotEqual' : 182,
773 'OpFUnordNotEqual' : 183,
774 'OpFOrdLessThan' : 184,
775 'OpFUnordLessThan' : 185,
776 'OpFOrdGreaterThan' : 186,
777 'OpFUnordGreaterThan' : 187,
778 'OpFOrdLessThanEqual' : 188,
779 'OpFUnordLessThanEqual' : 189,
780 'OpFOrdGreaterThanEqual' : 190,
781 'OpFUnordGreaterThanEqual' : 191,
782 'OpShiftRightLogical' : 194,
783 'OpShiftRightArithmetic' : 195,
784 'OpShiftLeftLogical' : 196,
786 'OpBitwiseXor' : 198,
787 'OpBitwiseAnd' : 199,
789 'OpBitFieldInsert' : 201,
790 'OpBitFieldSExtract' : 202,
791 'OpBitFieldUExtract' : 203,
792 'OpBitReverse' : 204,
799 'OpFwidthFine' : 212,
800 'OpDPdxCoarse' : 213,
801 'OpDPdyCoarse' : 214,
802 'OpFwidthCoarse' : 215,
803 'OpEmitVertex' : 218,
804 'OpEndPrimitive' : 219,
805 'OpEmitStreamVertex' : 220,
806 'OpEndStreamPrimitive' : 221,
807 'OpControlBarrier' : 224,
808 'OpMemoryBarrier' : 225,
809 'OpAtomicLoad' : 227,
810 'OpAtomicStore' : 228,
811 'OpAtomicExchange' : 229,
812 'OpAtomicCompareExchange' : 230,
813 'OpAtomicCompareExchangeWeak' : 231,
814 'OpAtomicIIncrement' : 232,
815 'OpAtomicIDecrement' : 233,
816 'OpAtomicIAdd' : 234,
817 'OpAtomicISub' : 235,
818 'OpAtomicSMin' : 236,
819 'OpAtomicUMin' : 237,
820 'OpAtomicSMax' : 238,
821 'OpAtomicUMax' : 239,
827 'OpSelectionMerge' : 247,
830 'OpBranchConditional' : 250,
834 'OpReturnValue' : 254,
835 'OpUnreachable' : 255,
836 'OpLifetimeStart' : 256,
837 'OpLifetimeStop' : 257,
838 'OpGroupAsyncCopy' : 259,
839 'OpGroupWaitEvents' : 260,
842 'OpGroupBroadcast' : 263,
853 'OpReservedReadPipe' : 276,
854 'OpReservedWritePipe' : 277,
855 'OpReserveReadPipePackets' : 278,
856 'OpReserveWritePipePackets' : 279,
857 'OpCommitReadPipe' : 280,
858 'OpCommitWritePipe' : 281,
859 'OpIsValidReserveId' : 282,
860 'OpGetNumPipePackets' : 283,
861 'OpGetMaxPipePackets' : 284,
862 'OpGroupReserveReadPipePackets' : 285,
863 'OpGroupReserveWritePipePackets' : 286,
864 'OpGroupCommitReadPipe' : 287,
865 'OpGroupCommitWritePipe' : 288,
866 'OpEnqueueMarker' : 291,
867 'OpEnqueueKernel' : 292,
868 'OpGetKernelNDrangeSubGroupCount' : 293,
869 'OpGetKernelNDrangeMaxSubGroupSize' : 294,
870 'OpGetKernelWorkGroupSize' : 295,
871 'OpGetKernelPreferredWorkGroupSizeMultiple' : 296,
872 'OpRetainEvent' : 297,
873 'OpReleaseEvent' : 298,
874 'OpCreateUserEvent' : 299,
875 'OpIsValidEvent' : 300,
876 'OpSetUserEventStatus' : 301,
877 'OpCaptureEventProfilingInfo' : 302,
878 'OpGetDefaultQueue' : 303,
879 'OpBuildNDRange' : 304,
880 'OpImageSparseSampleImplicitLod' : 305,
881 'OpImageSparseSampleExplicitLod' : 306,
882 'OpImageSparseSampleDrefImplicitLod' : 307,
883 'OpImageSparseSampleDrefExplicitLod' : 308,
884 'OpImageSparseSampleProjImplicitLod' : 309,
885 'OpImageSparseSampleProjExplicitLod' : 310,
886 'OpImageSparseSampleProjDrefImplicitLod' : 311,
887 'OpImageSparseSampleProjDrefExplicitLod' : 312,
888 'OpImageSparseFetch' : 313,
889 'OpImageSparseGather' : 314,
890 'OpImageSparseDrefGather' : 315,
891 'OpImageSparseTexelsResident' : 316,
893 'OpAtomicFlagTestAndSet' : 318,
894 'OpAtomicFlagClear' : 319,
895 'OpImageSparseRead' : 320,
896 'OpSubgroupBallotKHR' : 4421,
897 'OpSubgroupFirstInvocationKHR' : 4422,
898 'OpSubgroupAllKHR' : 4428,
899 'OpSubgroupAnyKHR' : 4429,
900 'OpSubgroupAllEqualKHR' : 4430,
901 'OpSubgroupReadInvocationKHR' : 4432,