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,
401 'SelectionControlShift' : {
406 'SelectionControlMask' : {
408 'Flatten' : 0x00000001,
409 'DontFlatten' : 0x00000002,
412 'LoopControlShift' : {
415 'DependencyInfinite' : 2,
416 'DependencyLength' : 3,
419 'LoopControlMask' : {
421 'Unroll' : 0x00000001,
422 'DontUnroll' : 0x00000002,
423 'DependencyInfinite' : 0x00000004,
424 'DependencyLength' : 0x00000008,
427 'FunctionControlShift' : {
434 'FunctionControlMask' : {
436 'Inline' : 0x00000001,
437 'DontInline' : 0x00000002,
439 'Const' : 0x00000008,
442 'MemorySemanticsShift' : {
445 'AcquireRelease' : 3,
446 'SequentiallyConsistent' : 4,
448 'SubgroupMemory' : 7,
449 'WorkgroupMemory' : 8,
450 'CrossWorkgroupMemory' : 9,
451 'AtomicCounterMemory' : 10,
455 'MemorySemanticsMask' : {
457 'Acquire' : 0x00000002,
458 'Release' : 0x00000004,
459 'AcquireRelease' : 0x00000008,
460 'SequentiallyConsistent' : 0x00000010,
461 'UniformMemory' : 0x00000040,
462 'SubgroupMemory' : 0x00000080,
463 'WorkgroupMemory' : 0x00000100,
464 'CrossWorkgroupMemory' : 0x00000200,
465 'AtomicCounterMemory' : 0x00000400,
466 'ImageMemory' : 0x00000800,
469 'MemoryAccessShift' : {
475 'MemoryAccessMask' : {
477 'Volatile' : 0x00000001,
478 'Aligned' : 0x00000002,
479 'Nontemporal' : 0x00000004,
496 'KernelEnqueueFlags' : {
502 'KernelProfilingInfoShift' : {
506 'KernelProfilingInfoMask' : {
508 'CmdExecTime' : 0x00000001,
526 'ImageReadWrite' : 14,
530 'DeviceEnqueue' : 19,
531 'LiteralSampler' : 20,
532 'AtomicStorage' : 21,
534 'TessellationPointSize' : 23,
535 'GeometryPointSize' : 24,
536 'ImageGatherExtended' : 25,
537 'StorageImageMultisample' : 27,
538 'UniformBufferArrayDynamicIndexing' : 28,
539 'SampledImageArrayDynamicIndexing' : 29,
540 'StorageBufferArrayDynamicIndexing' : 30,
541 'StorageImageArrayDynamicIndexing' : 31,
544 'ImageCubeArray' : 34,
545 'SampleRateShading' : 35,
548 'GenericPointer' : 38,
550 'InputAttachment' : 40,
551 'SparseResidency' : 41,
555 'SampledCubeArray' : 45,
556 'SampledBuffer' : 46,
559 'StorageImageExtendedFormats' : 49,
561 'DerivativeControl' : 51,
562 'InterpolationFunction' : 52,
563 'TransformFeedback' : 53,
564 'GeometryStreams' : 54,
565 'StorageImageReadWithoutFormat' : 55,
566 'StorageImageWriteWithoutFormat' : 56,
567 'MultiViewport' : 57,
568 'SubgroupDispatch' : 58,
576 'OpSourceContinued' : 2,
578 'OpSourceExtension' : 4,
584 'OpExtInstImport' : 11,
586 'OpMemoryModel' : 14,
588 'OpExecutionMode' : 16,
597 'OpTypeSampler' : 26,
598 'OpTypeSampledImage' : 27,
600 'OpTypeRuntimeArray' : 29,
603 'OpTypePointer' : 32,
604 'OpTypeFunction' : 33,
606 'OpTypeDeviceEvent' : 35,
607 'OpTypeReserveId' : 36,
610 'OpTypeForwardPointer' : 39,
611 'OpConstantTrue' : 41,
612 'OpConstantFalse' : 42,
614 'OpConstantComposite' : 44,
615 'OpConstantSampler' : 45,
616 'OpConstantNull' : 46,
617 'OpSpecConstantTrue' : 48,
618 'OpSpecConstantFalse' : 49,
619 'OpSpecConstant' : 50,
620 'OpSpecConstantComposite' : 51,
621 'OpSpecConstantOp' : 52,
623 'OpFunctionParameter' : 55,
624 'OpFunctionEnd' : 56,
625 'OpFunctionCall' : 57,
627 'OpImageTexelPointer' : 60,
631 'OpCopyMemorySized' : 64,
632 'OpAccessChain' : 65,
633 'OpInBoundsAccessChain' : 66,
634 'OpPtrAccessChain' : 67,
635 'OpArrayLength' : 68,
636 'OpGenericPtrMemSemantics' : 69,
637 'OpInBoundsPtrAccessChain' : 70,
639 'OpMemberDecorate' : 72,
640 'OpDecorationGroup' : 73,
641 'OpGroupDecorate' : 74,
642 'OpGroupMemberDecorate' : 75,
643 'OpVectorExtractDynamic' : 77,
644 'OpVectorInsertDynamic' : 78,
645 'OpVectorShuffle' : 79,
646 'OpCompositeConstruct' : 80,
647 'OpCompositeExtract' : 81,
648 'OpCompositeInsert' : 82,
651 'OpSampledImage' : 86,
652 'OpImageSampleImplicitLod' : 87,
653 'OpImageSampleExplicitLod' : 88,
654 'OpImageSampleDrefImplicitLod' : 89,
655 'OpImageSampleDrefExplicitLod' : 90,
656 'OpImageSampleProjImplicitLod' : 91,
657 'OpImageSampleProjExplicitLod' : 92,
658 'OpImageSampleProjDrefImplicitLod' : 93,
659 'OpImageSampleProjDrefExplicitLod' : 94,
661 'OpImageGather' : 96,
662 'OpImageDrefGather' : 97,
666 'OpImageQueryFormat' : 101,
667 'OpImageQueryOrder' : 102,
668 'OpImageQuerySizeLod' : 103,
669 'OpImageQuerySize' : 104,
670 'OpImageQueryLod' : 105,
671 'OpImageQueryLevels' : 106,
672 'OpImageQuerySamples' : 107,
673 'OpConvertFToU' : 109,
674 'OpConvertFToS' : 110,
675 'OpConvertSToF' : 111,
676 'OpConvertUToF' : 112,
680 'OpQuantizeToF16' : 116,
681 'OpConvertPtrToU' : 117,
682 'OpSatConvertSToU' : 118,
683 'OpSatConvertUToS' : 119,
684 'OpConvertUToPtr' : 120,
685 'OpPtrCastToGeneric' : 121,
686 'OpGenericCastToPtr' : 122,
687 'OpGenericCastToPtrExplicit' : 123,
705 'OpVectorTimesScalar' : 142,
706 'OpMatrixTimesScalar' : 143,
707 'OpVectorTimesMatrix' : 144,
708 'OpMatrixTimesVector' : 145,
709 'OpMatrixTimesMatrix' : 146,
710 'OpOuterProduct' : 147,
713 'OpISubBorrow' : 150,
714 'OpUMulExtended' : 151,
715 'OpSMulExtended' : 152,
722 'OpSignBitSet' : 160,
723 'OpLessOrGreater' : 161,
726 'OpLogicalEqual' : 164,
727 'OpLogicalNotEqual' : 165,
729 'OpLogicalAnd' : 167,
730 'OpLogicalNot' : 168,
734 'OpUGreaterThan' : 172,
735 'OpSGreaterThan' : 173,
736 'OpUGreaterThanEqual' : 174,
737 'OpSGreaterThanEqual' : 175,
740 'OpULessThanEqual' : 178,
741 'OpSLessThanEqual' : 179,
743 'OpFUnordEqual' : 181,
744 'OpFOrdNotEqual' : 182,
745 'OpFUnordNotEqual' : 183,
746 'OpFOrdLessThan' : 184,
747 'OpFUnordLessThan' : 185,
748 'OpFOrdGreaterThan' : 186,
749 'OpFUnordGreaterThan' : 187,
750 'OpFOrdLessThanEqual' : 188,
751 'OpFUnordLessThanEqual' : 189,
752 'OpFOrdGreaterThanEqual' : 190,
753 'OpFUnordGreaterThanEqual' : 191,
754 'OpShiftRightLogical' : 194,
755 'OpShiftRightArithmetic' : 195,
756 'OpShiftLeftLogical' : 196,
758 'OpBitwiseXor' : 198,
759 'OpBitwiseAnd' : 199,
761 'OpBitFieldInsert' : 201,
762 'OpBitFieldSExtract' : 202,
763 'OpBitFieldUExtract' : 203,
764 'OpBitReverse' : 204,
771 'OpFwidthFine' : 212,
772 'OpDPdxCoarse' : 213,
773 'OpDPdyCoarse' : 214,
774 'OpFwidthCoarse' : 215,
775 'OpEmitVertex' : 218,
776 'OpEndPrimitive' : 219,
777 'OpEmitStreamVertex' : 220,
778 'OpEndStreamPrimitive' : 221,
779 'OpControlBarrier' : 224,
780 'OpMemoryBarrier' : 225,
781 'OpAtomicLoad' : 227,
782 'OpAtomicStore' : 228,
783 'OpAtomicExchange' : 229,
784 'OpAtomicCompareExchange' : 230,
785 'OpAtomicCompareExchangeWeak' : 231,
786 'OpAtomicIIncrement' : 232,
787 'OpAtomicIDecrement' : 233,
788 'OpAtomicIAdd' : 234,
789 'OpAtomicISub' : 235,
790 'OpAtomicSMin' : 236,
791 'OpAtomicUMin' : 237,
792 'OpAtomicSMax' : 238,
793 'OpAtomicUMax' : 239,
799 'OpSelectionMerge' : 247,
802 'OpBranchConditional' : 250,
806 'OpReturnValue' : 254,
807 'OpUnreachable' : 255,
808 'OpLifetimeStart' : 256,
809 'OpLifetimeStop' : 257,
810 'OpGroupAsyncCopy' : 259,
811 'OpGroupWaitEvents' : 260,
814 'OpGroupBroadcast' : 263,
825 'OpReservedReadPipe' : 276,
826 'OpReservedWritePipe' : 277,
827 'OpReserveReadPipePackets' : 278,
828 'OpReserveWritePipePackets' : 279,
829 'OpCommitReadPipe' : 280,
830 'OpCommitWritePipe' : 281,
831 'OpIsValidReserveId' : 282,
832 'OpGetNumPipePackets' : 283,
833 'OpGetMaxPipePackets' : 284,
834 'OpGroupReserveReadPipePackets' : 285,
835 'OpGroupReserveWritePipePackets' : 286,
836 'OpGroupCommitReadPipe' : 287,
837 'OpGroupCommitWritePipe' : 288,
838 'OpEnqueueMarker' : 291,
839 'OpEnqueueKernel' : 292,
840 'OpGetKernelNDrangeSubGroupCount' : 293,
841 'OpGetKernelNDrangeMaxSubGroupSize' : 294,
842 'OpGetKernelWorkGroupSize' : 295,
843 'OpGetKernelPreferredWorkGroupSizeMultiple' : 296,
844 'OpRetainEvent' : 297,
845 'OpReleaseEvent' : 298,
846 'OpCreateUserEvent' : 299,
847 'OpIsValidEvent' : 300,
848 'OpSetUserEventStatus' : 301,
849 'OpCaptureEventProfilingInfo' : 302,
850 'OpGetDefaultQueue' : 303,
851 'OpBuildNDRange' : 304,
852 'OpImageSparseSampleImplicitLod' : 305,
853 'OpImageSparseSampleExplicitLod' : 306,
854 'OpImageSparseSampleDrefImplicitLod' : 307,
855 'OpImageSparseSampleDrefExplicitLod' : 308,
856 'OpImageSparseSampleProjImplicitLod' : 309,
857 'OpImageSparseSampleProjExplicitLod' : 310,
858 'OpImageSparseSampleProjDrefImplicitLod' : 311,
859 'OpImageSparseSampleProjDrefExplicitLod' : 312,
860 'OpImageSparseFetch' : 313,
861 'OpImageSparseGather' : 314,
862 'OpImageSparseDrefGather' : 315,
863 'OpImageSparseTexelsResident' : 316,
865 'OpAtomicFlagTestAndSet' : 318,
866 'OpAtomicFlagClear' : 319,
867 'OpImageSparseRead' : 320,
869 'OpTypePipeStorage' : 322,
870 'OpConstantPipeStorage' : 323,
871 'OpCreatePipeFromPipeStorage' : 324,
872 'OpGetKernelLocalSizeForSubgroupCount' : 325,
873 'OpGetKernelMaxNumSubgroups' : 326,
874 'OpTypeNamedBarrier' : 327,
875 'OpNamedBarrierInitialize' : 328,
876 'OpMemoryNamedBarrier' : 329,
877 'OpModuleProcessed' : 330,