From edb45f2a10832a0ef7f0b2741492bb46fcacda2c Mon Sep 17 00:00:00 2001 From: Rune Date: Sun, 12 Jul 2026 16:21:19 +0200 Subject: [PATCH] add bindings --- .gitignore | 4 + .gitmodules | 3 + BeefProj.toml | 70 + BeefSpace.toml | 8 + SPIRV-Cross | 1 + Setup/BeefProj.toml | 9 + Setup/BeefSpace.toml | 9 + Setup/src/Program.bf | 218 ++ src/Library.bf | 31 + src/SpirV.bf | 5616 ++++++++++++++++++++++++++++++++++++++++++ src/SpirVCross.bf | 1101 +++++++++ 11 files changed, 7070 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 BeefProj.toml create mode 100644 BeefSpace.toml create mode 160000 SPIRV-Cross create mode 100644 Setup/BeefProj.toml create mode 100644 Setup/BeefSpace.toml create mode 100644 Setup/src/Program.bf create mode 100644 src/Library.bf create mode 100644 src/SpirV.bf create mode 100644 src/SpirVCross.bf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c385d5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +recovery +build +BeefSpace_User.toml +BeefSpace_Lock.toml diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a533a80 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "SPIRV-Cross"] + path = SPIRV-Cross + url = https://github.com/KhronosGroup/SPIRV-Cross.git diff --git a/BeefProj.toml b/BeefProj.toml new file mode 100644 index 0000000..04d3583 --- /dev/null +++ b/BeefProj.toml @@ -0,0 +1,70 @@ +FileVersion = 1 + +[Project] +Name = "SpirVCross" +TargetType = "BeefLib" +StartupObject = "SpirVCross.Program" + +[Dependencies] +corlib = "*" +"CxxBuildTool.git" = {Git = "https://git.unicon-gmbh.de/Rune/CxxBuildTool.git"} + +[Configs.Debug.Win32] +LibPaths = ["$(BuildDir)/spirv_cross.lib"] + +[Configs.Debug.Win64] +LibPaths = ["$(BuildDir)/spirv_cross.lib"] + +[Configs.Debug.Linux32] +LibPaths = ["$(BuildDir)/spirv_cross.a"] + +[Configs.Debug.Linux64] +LibPaths = ["$(BuildDir)/spirv_cross.a"] + +[Configs.Debug.macOS] +LibPaths = ["$(BuildDir)/spirv_cross.a"] + +[Configs.Release.Win32] +LibPaths = ["$(BuildDir)/spirv_cross.lib"] + +[Configs.Release.Win64] +LibPaths = ["$(BuildDir)/spirv_cross.lib"] + +[Configs.Release.Linux32] +LibPaths = ["$(BuildDir)/spirv_cross.a"] + +[Configs.Release.Linux64] +LibPaths = ["$(BuildDir)/spirv_cross.a"] + +[Configs.Release.macOS] +LibPaths = ["$(BuildDir)/spirv_cross.a"] + +[Configs.Paranoid.Win32] +LibPaths = ["$(BuildDir)/spirv_cross.lib"] + +[Configs.Paranoid.Win64] +LibPaths = ["$(BuildDir)/spirv_cross.lib"] + +[Configs.Paranoid.Linux32] +LibPaths = ["$(BuildDir)/spirv_cross.a"] + +[Configs.Paranoid.Linux64] +LibPaths = ["$(BuildDir)/spirv_cross.a"] + +[Configs.Paranoid.macOS] +LibPaths = ["$(BuildDir)/spirv_cross.a"] + +[Configs.Test.Win32] +LibPaths = ["$(BuildDir)/spirv_cross.lib"] + +[Configs.Test.Win64] +LibPaths = ["$(BuildDir)/spirv_cross.lib"] + +[Configs.Test.Linux32] +LibPaths = ["$(BuildDir)/spirv_cross.a"] + +[Configs.Test.Linux64] +LibPaths = ["$(BuildDir)/spirv_cross.a"] + +[Configs.Test.macOS] +LibPaths = ["$(BuildDir)/spirv_cross.a"] diff --git a/BeefSpace.toml b/BeefSpace.toml new file mode 100644 index 0000000..c49d38f --- /dev/null +++ b/BeefSpace.toml @@ -0,0 +1,8 @@ +FileVersion = 1 + +[Workspace] +StartupProject = "SpirVCross" + +[Projects] +SpirVCross = {Path = "."} +"CxxBuildTool.git" = {Git = "https://git.unicon-gmbh.de/Rune/CxxBuildTool.git"} diff --git a/SPIRV-Cross b/SPIRV-Cross new file mode 160000 index 0000000..6c09849 --- /dev/null +++ b/SPIRV-Cross @@ -0,0 +1 @@ +Subproject commit 6c09849fe88c48eaed08413aa022aaa136a3a057 diff --git a/Setup/BeefProj.toml b/Setup/BeefProj.toml new file mode 100644 index 0000000..7a94053 --- /dev/null +++ b/Setup/BeefProj.toml @@ -0,0 +1,9 @@ +FileVersion = 1 + +[Project] +Name = "SpirVCross.Setup" +StartupObject = "SpirVCross.Setup.Program" + +[Dependencies] +corlib = "*" +"Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/Rune/Cpp2Beef.git"} diff --git a/Setup/BeefSpace.toml b/Setup/BeefSpace.toml new file mode 100644 index 0000000..c4d3ca2 --- /dev/null +++ b/Setup/BeefSpace.toml @@ -0,0 +1,9 @@ +FileVersion = 1 +ExtraPlatforms = ["Linux32", "Linux64", "macOS"] + +[Workspace] +StartupProject = "SpirVCross.Setup" + +[Projects] +"SpirVCross.Setup" = {Path = "."} +"Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/Rune/Cpp2Beef.git"} diff --git a/Setup/src/Program.bf b/Setup/src/Program.bf new file mode 100644 index 0000000..ec33bb3 --- /dev/null +++ b/Setup/src/Program.bf @@ -0,0 +1,218 @@ +using System; +using System.IO; +using System.Collections; +using System.Diagnostics; + +using Cpp2Beef; +using LibClang; + +namespace SpirVCross.Setup; + +class SpriVCrossGenerator : Cpp2BeefGenerator, this(Span args) +{ + protected override Span Args => args; + protected override Flags Flags => .None; + + StreamWriter spvWriter = new .()..Create("../src/SpirV.bf")..Write(""" + // This file was generated by Cpp2Beef + + using System; + using System.Interop; + + namespace SpirVCross; + + + """) ~ delete _; + StreamWriter spvcWriter = new .()..Create("../src/SpirVCross.bf")..Write(""" + // This file was generated by Cpp2Beef + + using System; + using System.Interop; + + namespace SpirVCross; + + + """) ~ delete _; + + protected override StreamWriter GetWriterForHeader(StringView header) + { + // Here you define the target file to which a cursor should be written + // Returning null skips the cursor + if (header.EndsWith("spirv_cross_c.h")) + return spvcWriter; + if (header.EndsWith("spirv.h")) + return spvWriter; + return null; + } + + protected override bool IsOutParam(CXCursor arg, CXCursor method) + { + let type = Clang.GetCursorType(arg); + if (type.kind != .Pointer) return false; + let spelling = GetTypeSpelling!(Clang.GetPointeeType(type)); + return handles.ContainsAlt(spelling); + } + + HashSet handles = new .(16) ~ DeleteContainerAndItems!(_); + + protected override void HandleCursor(CXCursor cursor) + { + switch (cursor.kind) + { + case .TypedefDecl: + let spelling = GetCursorSpelling!(cursor); + if (spelling == "spvc_bool") + return; + + if (spelling.EndsWith("_flags")) + { + BeginCursor(cursor); + AccessSpecifier(cursor); + str.Append("typealias "); + GetNameInBindings(cursor, str); + str.Append(" = "); + GetNameInBindings(cursor, str); + str.Length--; + str.Append("Bits;"); + return; + } + + let type = Clang.GetTypedefDeclUnderlyingType(cursor); + let typeSpelling = GetTypeSpelling!(type); + if (!(typeSpelling.StartsWith("struct spvc_") || typeSpelling.StartsWith("const struct spvc_")) || !typeSpelling.EndsWith("_s *")) + break; + BeginCursor(cursor); + AccessSpecifier(cursor); + str.Append("struct "); + GetNameInBindings(cursor, str); + str.Append(" : int {}"); + handles.Add(new .(spelling)); + return; + case .StructDecl: + let spelling = GetCursorSpelling!(cursor); + if (spelling.EndsWith("_s")) + return; + default: + } + base.HandleCursor(cursor); + } + + protected override void GetNameInBindings(CXCursor cursor, String outString) + { + switch (cursor.kind) + { + case .EnumDecl: + let spelling = GetCursorSpelling!(cursor); + if (spelling.StartsWith("Spv") && spelling.EndsWith('_')) + { + outString.Append(spelling[..<^1]); + return; + } + fallthrough; + case .StructDecl, .UnionDecl, .TypedefDecl: + let spelling = GetCursorSpelling!(cursor); + if (!spelling.StartsWith("spvc_")) + break; + UpperSnakeCase2PascalCase(spelling, outString); + return; + case .EnumConstantDecl: + var parentSpelling = GetCursorSpelling!(Clang.GetCursorSemanticParent(cursor)); + var spelling = GetCursorSpelling!(cursor); + if (parentSpelling.StartsWith("spvc_")) + { + bool bit = false; + if (parentSpelling.EndsWith("_flag_bits")) + { + parentSpelling.RemoveFromEnd("_flag_bits".Length); + bit = true; + } + if (spelling.EndsWith("_INT_MAX") || spelling.EndsWith("_MAX_INT")) + outString.Append("//"); + if (spelling.StartsWith(parentSpelling, .OrdinalIgnoreCase)) + spelling.RemoveFromStart(parentSpelling.Length); + else + break; + if (bit && spelling.EndsWith("_BIT")) + spelling.RemoveFromEnd(4); + if (spelling[0] == '_' && spelling[1].IsDigit) + outString.Append('_'); + UpperSnakeCase2PascalCase(spelling, outString); + } + else if (parentSpelling.StartsWith("Spv")) + { + if (parentSpelling == "SpvOp_") + parentSpelling = "Spv"; + if (parentSpelling.EndsWith('_')) + parentSpelling.RemoveFromEnd(1); + StringView suffix = null; + if (parentSpelling.EndsWith("Shift")) + suffix = "Shift"; + else if (parentSpelling.EndsWith("Mask")) + suffix = "Mask"; + parentSpelling.RemoveFromEnd(suffix.Length); + + if (spelling.StartsWith(parentSpelling)) + spelling.RemoveFromStart(parentSpelling.Length); + if (spelling.EndsWith(suffix)) + spelling.RemoveFromEnd(suffix.Length); + else if (spelling.StartsWith(suffix)) + spelling.RemoveFromStart(suffix.Length); + + if (spelling == "Max") + outString.Append("//"); + if (spelling[0].IsDigit) + outString.Append('_'); + outString.Append(spelling); + } + else break; + return; + case .FunctionDecl: + if (!IsInstanceMethod(cursor)) break; + let arg = Clang.Cursor_GetArgument(cursor, 0); + let handle = GetTypeSpelling!(Clang.GetCursorType(arg)); + var spelling = GetCursorSpelling!(cursor); + Runtime.Assert(spelling.StartsWith(handle)); + spelling.RemoveFromStart(handle.Length + 1); + UpperSnakeCase2PascalCase(spelling, outString); + return; + default: + } + base.GetNameInBindings(cursor, outString); + } + + protected override void WriteToken(CXToken token) + { + let spelling = GetTokenSpelling!(token); + if (Clang.GetTokenKind(token) == .Identifier && spelling == "spvc_bool") + str.Append("SpvcBool"); + else if (Clang.GetTokenKind(token) == .Literal && spelling.Length == 9 && spelling.StartsWith("0x")) + str.Append("0x0", spelling[2...]); + else + base.WriteToken(token); + } + + bool IsInstanceMethod(CXCursor cursor) + { + if (Clang.Cursor_GetNumArguments(cursor) < 1) + return false; + let arg = Clang.Cursor_GetArgument(cursor, 0); + let type = GetTypeSpelling!(Clang.GetCursorType(arg)); + return handles.ContainsAlt(type); + } + + protected override void Method_Parameters(CXCursor cursor) + { + if (IsInstanceMethod(cursor)) + str.Append("this "); + base.Method_Parameters(cursor); + } +} + +class Program +{ + public static int Main(String[] args) + { + scope SpriVCrossGenerator(char8*[?]("--language=c")).Generate("../SPIRV-Cross/spirv_cross_c.h"); + return 0; + } +} \ No newline at end of file diff --git a/src/Library.bf b/src/Library.bf new file mode 100644 index 0000000..7938d9d --- /dev/null +++ b/src/Library.bf @@ -0,0 +1,31 @@ +using System; +using System.Interop; + +using CxxBuildTool; + +namespace SpirVCross; + +struct SpvcBool : c_uchar +{ + [Inline] public static operator bool(Self s) => s != SPVC_FALSE; + [Inline] public static operator Self(bool s) => s ? SPVC_TRUE : SPVC_FALSE; +} + +extension SpvcResult +{ + [NoShow(false), SkipCall, Warn("SpvcResult discarded")] + public void ReturnValueDiscarded(); +} + +static +{ + [OnCompile(.TypeDone)] + private static void Build() + { + if (!Compiler.IsBuilding) return; + CxxBuildTool.Ninja(Compiler.ProjectDir + "/SPIRV-Cross", Compiler.BuildDir + "/" + Compiler.ProjectName, "spirv_cross", "", + "spirv_cfg.cpp", "spirv_cross_c.cpp", "spirv_glsl.cpp", "spirv_parser.cpp", + "spirv_cpp.cpp", "spirv_cross_parsed_ir.cpp", "spirv_hlsl.cpp", "spirv_reflect.cpp", + "spirv_cross.cpp", "spirv_cross_util.cpp", "spirv_msl.cpp"); + } +} diff --git a/src/SpirV.bf b/src/SpirV.bf new file mode 100644 index 0000000..8e4c0f0 --- /dev/null +++ b/src/SpirV.bf @@ -0,0 +1,5616 @@ +// This file was generated by Cpp2Beef + +using System; +using System.Interop; + +namespace SpirVCross; + +static +{ +/* +** Copyright: 2014-2024 The Khronos Group Inc. +** License: MIT +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS +** KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS +** SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT +** https://www.khronos.org/registry/ +*/ + +/* +** This header is automatically generated by the same tool that creates +** the Binary Section of the SPIR-V specification. +*/ + +/* +** Enumeration tokens for SPIR-V, in various styles: +** C, C++, C++11, JSON, Lua, Python, C#, D, Beef +** +** - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +** - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +** - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +** - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +** - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +** - C# will use enum classes in the Specification class located in the "Spv" namespace, +** e.g.: Spv.Specification.SourceLanguage.GLSL +** - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +** - Beef will use enum classes in the Specification class located in the "Spv" namespace, +** e.g.: Spv.Specification.SourceLanguage.GLSL +** +** Some tokens act like mask values, which can be OR'd together, +** while others are mutually exclusive. The mask-like ones have +** "Mask" in their name, and a parallel enum that has the shift +** amount (1 << x) for each corresponding enumerant. +*/ + + + +} + + + +public typealias SpvId = c_uint; + +static +{ +public const let SPV_VERSION = 0x10600; +public const let SPV_REVISION = 1; + +public const c_uint SpvMagicNumber = 0x07230203; +public const c_uint SpvVersion = 0x00010600; +public const c_uint SpvRevision = 1; +public const c_uint SpvOpCodeMask = 0xffff; +public const c_uint SpvWordCountShift = 16; +} + +[AllowDuplicates] public enum SpvSourceLanguage : c_int { + Unknown = 0, + ESSL = 1, + GLSL = 2, + OpenCL_C = 3, + OpenCL_CPP = 4, + HLSL = 5, + CPP_for_OpenCL = 6, + SYCL = 7, + HERO_C = 8, + NZSL = 9, + WGSL = 10, + Slang = 11, + Zig = 12, + Rust = 13, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvExecutionModel : c_int { + Vertex = 0, + TessellationControl = 1, + TessellationEvaluation = 2, + Geometry = 3, + Fragment = 4, + GLCompute = 5, + Kernel = 6, + TaskNV = 5267, + MeshNV = 5268, + RayGenerationKHR = 5313, + RayGenerationNV = 5313, + IntersectionKHR = 5314, + IntersectionNV = 5314, + AnyHitKHR = 5315, + AnyHitNV = 5315, + ClosestHitKHR = 5316, + ClosestHitNV = 5316, + MissKHR = 5317, + MissNV = 5317, + CallableKHR = 5318, + CallableNV = 5318, + TaskEXT = 5364, + MeshEXT = 5365, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvAddressingModel : c_int { + Logical = 0, + Physical32 = 1, + Physical64 = 2, + PhysicalStorageBuffer64 = 5348, + PhysicalStorageBuffer64EXT = 5348, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvMemoryModel : c_int { + Simple = 0, + GLSL450 = 1, + OpenCL = 2, + Vulkan = 3, + VulkanKHR = 3, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvExecutionMode : c_int { + Invocations = 0, + SpacingEqual = 1, + SpacingFractionalEven = 2, + SpacingFractionalOdd = 3, + VertexOrderCw = 4, + VertexOrderCcw = 5, + PixelCenterInteger = 6, + OriginUpperLeft = 7, + OriginLowerLeft = 8, + EarlyFragmentTests = 9, + PointMode = 10, + Xfb = 11, + DepthReplacing = 12, + DepthGreater = 14, + DepthLess = 15, + DepthUnchanged = 16, + LocalSize = 17, + LocalSizeHint = 18, + InputPoints = 19, + InputLines = 20, + InputLinesAdjacency = 21, + Triangles = 22, + InputTrianglesAdjacency = 23, + Quads = 24, + Isolines = 25, + OutputVertices = 26, + OutputPoints = 27, + OutputLineStrip = 28, + OutputTriangleStrip = 29, + VecTypeHint = 30, + ContractionOff = 31, + Initializer = 33, + Finalizer = 34, + SubgroupSize = 35, + SubgroupsPerWorkgroup = 36, + SubgroupsPerWorkgroupId = 37, + LocalSizeId = 38, + LocalSizeHintId = 39, + NonCoherentColorAttachmentReadEXT = 4169, + NonCoherentDepthAttachmentReadEXT = 4170, + NonCoherentStencilAttachmentReadEXT = 4171, + SubgroupUniformControlFlowKHR = 4421, + PostDepthCoverage = 4446, + DenormPreserve = 4459, + DenormFlushToZero = 4460, + SignedZeroInfNanPreserve = 4461, + RoundingModeRTE = 4462, + RoundingModeRTZ = 4463, + NonCoherentTileAttachmentReadQCOM = 4489, + TileShadingRateQCOM = 4490, + EarlyAndLateFragmentTestsAMD = 5017, + StencilRefReplacingEXT = 5027, + CoalescingAMDX = 5069, + IsApiEntryAMDX = 5070, + MaxNodeRecursionAMDX = 5071, + StaticNumWorkgroupsAMDX = 5072, + ShaderIndexAMDX = 5073, + MaxNumWorkgroupsAMDX = 5077, + StencilRefUnchangedFrontAMD = 5079, + StencilRefGreaterFrontAMD = 5080, + StencilRefLessFrontAMD = 5081, + StencilRefUnchangedBackAMD = 5082, + StencilRefGreaterBackAMD = 5083, + StencilRefLessBackAMD = 5084, + QuadDerivativesKHR = 5088, + RequireFullQuadsKHR = 5089, + SharesInputWithAMDX = 5102, + ArithmeticPoisonKHR = 5157, + OutputLinesEXT = 5269, + OutputLinesNV = 5269, + OutputPrimitivesEXT = 5270, + OutputPrimitivesNV = 5270, + DerivativeGroupQuadsKHR = 5289, + DerivativeGroupQuadsNV = 5289, + DerivativeGroupLinearKHR = 5290, + DerivativeGroupLinearNV = 5290, + OutputTrianglesEXT = 5298, + OutputTrianglesNV = 5298, + PixelInterlockOrderedEXT = 5366, + PixelInterlockUnorderedEXT = 5367, + SampleInterlockOrderedEXT = 5368, + SampleInterlockUnorderedEXT = 5369, + ShadingRateInterlockOrderedEXT = 5370, + ShadingRateInterlockUnorderedEXT = 5371, + Shader64BitIndexingEXT = 5427, + SharedLocalMemorySizeINTEL = 5618, + RoundingModeRTPINTEL = 5620, + RoundingModeRTNINTEL = 5621, + FloatingPointModeALTINTEL = 5622, + FloatingPointModeIEEEINTEL = 5623, + MaxWorkgroupSizeINTEL = 5893, + MaxWorkDimINTEL = 5894, + NoGlobalOffsetINTEL = 5895, + NumSIMDWorkitemsINTEL = 5896, + SchedulerTargetFmaxMhzINTEL = 5903, + MaximallyReconvergesKHR = 6023, + FPFastMathDefault = 6028, + StreamingInterfaceINTEL = 6154, + RegisterMapInterfaceINTEL = 6160, + NamedBarrierCountINTEL = 6417, + MaximumRegistersINTEL = 6461, + MaximumRegistersIdINTEL = 6462, + NamedMaximumRegistersINTEL = 6463, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvStorageClass : c_int { + UniformConstant = 0, + Input = 1, + Uniform = 2, + Output = 3, + Workgroup = 4, + CrossWorkgroup = 5, + Private = 6, + Function = 7, + Generic = 8, + PushConstant = 9, + AtomicCounter = 10, + Image = 11, + StorageBuffer = 12, + TileImageEXT = 4172, + TileAttachmentQCOM = 4491, + NodePayloadAMDX = 5068, + CallableDataKHR = 5328, + CallableDataNV = 5328, + IncomingCallableDataKHR = 5329, + IncomingCallableDataNV = 5329, + RayPayloadKHR = 5338, + RayPayloadNV = 5338, + HitAttributeKHR = 5339, + HitAttributeNV = 5339, + IncomingRayPayloadKHR = 5342, + IncomingRayPayloadNV = 5342, + ShaderRecordBufferKHR = 5343, + ShaderRecordBufferNV = 5343, + PhysicalStorageBuffer = 5349, + PhysicalStorageBufferEXT = 5349, + HitObjectAttributeNV = 5385, + TaskPayloadWorkgroupEXT = 5402, + HitObjectAttributeEXT = 5411, + CodeSectionINTEL = 5605, + DeviceOnlyALTERA = 5936, + DeviceOnlyINTEL = 5936, + HostOnlyALTERA = 5937, + HostOnlyINTEL = 5937, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvDim : c_int { + _1D = 0, + _2D = 1, + _3D = 2, + Cube = 3, + Rect = 4, + Buffer = 5, + SubpassData = 6, + TileImageDataEXT = 4173, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvSamplerAddressingMode : c_int { + None = 0, + ClampToEdge = 1, + Clamp = 2, + Repeat = 3, + RepeatMirrored = 4, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvSamplerFilterMode : c_int { + Nearest = 0, + Linear = 1, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvImageFormat : c_int { + Unknown = 0, + Rgba32f = 1, + Rgba16f = 2, + R32f = 3, + Rgba8 = 4, + Rgba8Snorm = 5, + Rg32f = 6, + Rg16f = 7, + R11fG11fB10f = 8, + R16f = 9, + Rgba16 = 10, + Rgb10A2 = 11, + Rg16 = 12, + Rg8 = 13, + R16 = 14, + R8 = 15, + Rgba16Snorm = 16, + Rg16Snorm = 17, + Rg8Snorm = 18, + R16Snorm = 19, + R8Snorm = 20, + Rgba32i = 21, + Rgba16i = 22, + Rgba8i = 23, + R32i = 24, + Rg32i = 25, + Rg16i = 26, + Rg8i = 27, + R16i = 28, + R8i = 29, + Rgba32ui = 30, + Rgba16ui = 31, + Rgba8ui = 32, + R32ui = 33, + Rgb10a2ui = 34, + Rg32ui = 35, + Rg16ui = 36, + Rg8ui = 37, + R16ui = 38, + R8ui = 39, + R64ui = 40, + R64i = 41, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvImageChannelOrder : c_int { + R = 0, + A = 1, + RG = 2, + RA = 3, + RGB = 4, + RGBA = 5, + BGRA = 6, + ARGB = 7, + Intensity = 8, + Luminance = 9, + Rx = 10, + RGx = 11, + RGBx = 12, + Depth = 13, + DepthStencil = 14, + sRGB = 15, + sRGBx = 16, + sRGBA = 17, + sBGRA = 18, + ABGR = 19, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvImageChannelDataType : c_int { + SnormInt8 = 0, + SnormInt16 = 1, + UnormInt8 = 2, + UnormInt16 = 3, + UnormShort565 = 4, + UnormShort555 = 5, + UnormInt101010 = 6, + SignedInt8 = 7, + SignedInt16 = 8, + SignedInt32 = 9, + UnsignedInt8 = 10, + UnsignedInt16 = 11, + UnsignedInt32 = 12, + HalfFloat = 13, + Float = 14, + UnormInt24 = 15, + UnormInt101010_2 = 16, + UnormInt10X6EXT = 17, + UnsignedIntRaw10EXT = 19, + UnsignedIntRaw12EXT = 20, + UnormInt2_101010EXT = 21, + UnsignedInt10X6EXT = 22, + UnsignedInt12X4EXT = 23, + UnsignedInt14X2EXT = 24, + UnormInt12X4EXT = 25, + UnormInt14X2EXT = 26, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvImageOperandsShift : c_int { + Bias = 0, + Lod = 1, + Grad = 2, + ConstOffset = 3, + Offset = 4, + ConstOffsets = 5, + Sample = 6, + MinLod = 7, + MakeTexelAvailable = 8, + MakeTexelAvailableKHR = 8, + MakeTexelVisible = 9, + MakeTexelVisibleKHR = 9, + NonPrivateTexel = 10, + NonPrivateTexelKHR = 10, + VolatileTexel = 11, + VolatileTexelKHR = 11, + SignExtend = 12, + ZeroExtend = 13, + Nontemporal = 14, + Offsets = 16, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvImageOperandsMask : c_int { + None = 0, + Bias = 0x00000001, + Lod = 0x00000002, + Grad = 0x00000004, + ConstOffset = 0x00000008, + Offset = 0x00000010, + ConstOffsets = 0x00000020, + Sample = 0x00000040, + MinLod = 0x00000080, + MakeTexelAvailable = 0x00000100, + MakeTexelAvailableKHR = 0x00000100, + MakeTexelVisible = 0x00000200, + MakeTexelVisibleKHR = 0x00000200, + NonPrivateTexel = 0x00000400, + NonPrivateTexelKHR = 0x00000400, + VolatileTexel = 0x00000800, + VolatileTexelKHR = 0x00000800, + SignExtend = 0x00001000, + ZeroExtend = 0x00002000, + Nontemporal = 0x00004000, + Offsets = 0x00010000, +} + +[AllowDuplicates] public enum SpvFPFastMathModeShift : c_int { + NotNaN = 0, + NotInf = 1, + NSZ = 2, + AllowRecip = 3, + Fast = 4, + AllowContract = 16, + AllowContractFastINTEL = 16, + AllowReassoc = 17, + AllowReassocINTEL = 17, + AllowTransform = 18, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvFPFastMathModeMask : c_int { + None = 0, + NotNaN = 0x00000001, + NotInf = 0x00000002, + NSZ = 0x00000004, + AllowRecip = 0x00000008, + Fast = 0x00000010, + AllowContract = 0x00010000, + AllowContractFastINTEL = 0x00010000, + AllowReassoc = 0x00020000, + AllowReassocINTEL = 0x00020000, + AllowTransform = 0x00040000, +} + +[AllowDuplicates] public enum SpvFPRoundingMode : c_int { + RTE = 0, + RTZ = 1, + RTP = 2, + RTN = 3, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvLinkageType : c_int { + Export = 0, + Import = 1, + LinkOnceODR = 2, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvAccessQualifier : c_int { + ReadOnly = 0, + WriteOnly = 1, + ReadWrite = 2, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvFunctionParameterAttribute : c_int { + Zext = 0, + Sext = 1, + ByVal = 2, + Sret = 3, + NoAlias = 4, + NoCapture = 5, + NoWrite = 6, + NoReadWrite = 7, + RuntimeAlignedALTERA = 5940, + RuntimeAlignedINTEL = 5940, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvDecoration : c_int { + RelaxedPrecision = 0, + SpecId = 1, + Block = 2, + BufferBlock = 3, + RowMajor = 4, + ColMajor = 5, + ArrayStride = 6, + MatrixStride = 7, + GLSLShared = 8, + GLSLPacked = 9, + CPacked = 10, + BuiltIn = 11, + NoPerspective = 13, + Flat = 14, + Patch = 15, + Centroid = 16, + Sample = 17, + Invariant = 18, + Restrict = 19, + Aliased = 20, + Volatile = 21, + Constant = 22, + Coherent = 23, + NonWritable = 24, + NonReadable = 25, + Uniform = 26, + UniformId = 27, + SaturatedConversion = 28, + Stream = 29, + Location = 30, + Component = 31, + Index = 32, + Binding = 33, + DescriptorSet = 34, + Offset = 35, + XfbBuffer = 36, + XfbStride = 37, + FuncParamAttr = 38, + FPRoundingMode = 39, + FPFastMathMode = 40, + LinkageAttributes = 41, + NoContraction = 42, + InputAttachmentIndex = 43, + Alignment = 44, + MaxByteOffset = 45, + AlignmentId = 46, + MaxByteOffsetId = 47, + SaturatedToLargestFloat8NormalConversionEXT = 4216, + NoSignedWrap = 4469, + NoUnsignedWrap = 4470, + WeightTextureQCOM = 4487, + BlockMatchTextureQCOM = 4488, + BlockMatchSamplerQCOM = 4499, + ExplicitInterpAMD = 4999, + NodeSharesPayloadLimitsWithAMDX = 5019, + NodeMaxPayloadsAMDX = 5020, + TrackFinishWritingAMDX = 5078, + PayloadNodeNameAMDX = 5091, + PayloadNodeBaseIndexAMDX = 5098, + PayloadNodeSparseArrayAMDX = 5099, + PayloadNodeArraySizeAMDX = 5100, + PayloadDispatchIndirectAMDX = 5105, + ArrayStrideIdEXT = 5124, + OffsetIdEXT = 5125, + UTFEncodedKHR = 5145, + OverrideCoverageNV = 5248, + PassthroughNV = 5250, + ViewportRelativeNV = 5252, + SecondaryViewportRelativeNV = 5256, + PerPrimitiveEXT = 5271, + PerPrimitiveNV = 5271, + PerViewNV = 5272, + PerTaskNV = 5273, + PerVertexKHR = 5285, + PerVertexNV = 5285, + NonUniform = 5300, + NonUniformEXT = 5300, + RestrictPointer = 5355, + RestrictPointerEXT = 5355, + AliasedPointer = 5356, + AliasedPointerEXT = 5356, + MemberOffsetNV = 5358, + HitObjectShaderRecordBufferNV = 5386, + HitObjectShaderRecordBufferEXT = 5389, + BankNV = 5397, + BindlessSamplerNV = 5398, + BindlessImageNV = 5399, + BoundSamplerNV = 5400, + BoundImageNV = 5401, + SIMTCallINTEL = 5599, + ReferencedIndirectlyINTEL = 5602, + ClobberINTEL = 5607, + SideEffectsINTEL = 5608, + VectorComputeVariableINTEL = 5624, + FuncParamIOKindINTEL = 5625, + VectorComputeFunctionINTEL = 5626, + StackCallINTEL = 5627, + GlobalVariableOffsetINTEL = 5628, + CounterBuffer = 5634, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, + UserSemantic = 5635, + UserTypeGOOGLE = 5636, + FunctionRoundingModeINTEL = 5822, + FunctionDenormModeINTEL = 5823, + RegisterALTERA = 5825, + RegisterINTEL = 5825, + MemoryALTERA = 5826, + MemoryINTEL = 5826, + NumbanksALTERA = 5827, + NumbanksINTEL = 5827, + BankwidthALTERA = 5828, + BankwidthINTEL = 5828, + MaxPrivateCopiesALTERA = 5829, + MaxPrivateCopiesINTEL = 5829, + SinglepumpALTERA = 5830, + SinglepumpINTEL = 5830, + DoublepumpALTERA = 5831, + DoublepumpINTEL = 5831, + MaxReplicatesALTERA = 5832, + MaxReplicatesINTEL = 5832, + SimpleDualPortALTERA = 5833, + SimpleDualPortINTEL = 5833, + MergeALTERA = 5834, + MergeINTEL = 5834, + BankBitsALTERA = 5835, + BankBitsINTEL = 5835, + ForcePow2DepthALTERA = 5836, + ForcePow2DepthINTEL = 5836, + StridesizeALTERA = 5883, + StridesizeINTEL = 5883, + WordsizeALTERA = 5884, + WordsizeINTEL = 5884, + TrueDualPortALTERA = 5885, + TrueDualPortINTEL = 5885, + BurstCoalesceALTERA = 5899, + BurstCoalesceINTEL = 5899, + CacheSizeALTERA = 5900, + CacheSizeINTEL = 5900, + DontStaticallyCoalesceALTERA = 5901, + DontStaticallyCoalesceINTEL = 5901, + PrefetchALTERA = 5902, + PrefetchINTEL = 5902, + StallEnableALTERA = 5905, + StallEnableINTEL = 5905, + FuseLoopsInFunctionALTERA = 5907, + FuseLoopsInFunctionINTEL = 5907, + MathOpDSPModeALTERA = 5909, + MathOpDSPModeINTEL = 5909, + AliasScopeINTEL = 5914, + NoAliasINTEL = 5915, + InitiationIntervalALTERA = 5917, + InitiationIntervalINTEL = 5917, + MaxConcurrencyALTERA = 5918, + MaxConcurrencyINTEL = 5918, + PipelineEnableALTERA = 5919, + PipelineEnableINTEL = 5919, + BufferLocationALTERA = 5921, + BufferLocationINTEL = 5921, + IOPipeStorageALTERA = 5944, + IOPipeStorageINTEL = 5944, + FunctionFloatingPointModeINTEL = 6080, + SingleElementVectorINTEL = 6085, + VectorComputeCallableFunctionINTEL = 6087, + MediaBlockIOINTEL = 6140, + StallFreeALTERA = 6151, + StallFreeINTEL = 6151, + FPMaxErrorDecorationINTEL = 6170, + LatencyControlLabelALTERA = 6172, + LatencyControlLabelINTEL = 6172, + LatencyControlConstraintALTERA = 6173, + LatencyControlConstraintINTEL = 6173, + ConduitKernelArgumentALTERA = 6175, + ConduitKernelArgumentINTEL = 6175, + RegisterMapKernelArgumentALTERA = 6176, + RegisterMapKernelArgumentINTEL = 6176, + MMHostInterfaceAddressWidthALTERA = 6177, + MMHostInterfaceAddressWidthINTEL = 6177, + MMHostInterfaceDataWidthALTERA = 6178, + MMHostInterfaceDataWidthINTEL = 6178, + MMHostInterfaceLatencyALTERA = 6179, + MMHostInterfaceLatencyINTEL = 6179, + MMHostInterfaceReadWriteModeALTERA = 6180, + MMHostInterfaceReadWriteModeINTEL = 6180, + MMHostInterfaceMaxBurstALTERA = 6181, + MMHostInterfaceMaxBurstINTEL = 6181, + MMHostInterfaceWaitRequestALTERA = 6182, + MMHostInterfaceWaitRequestINTEL = 6182, + StableKernelArgumentALTERA = 6183, + StableKernelArgumentINTEL = 6183, + HostAccessINTEL = 6188, + InitModeALTERA = 6190, + InitModeINTEL = 6190, + ImplementInRegisterMapALTERA = 6191, + ImplementInRegisterMapINTEL = 6191, + ConditionalINTEL = 6247, + CacheControlLoadINTEL = 6442, + CacheControlStoreINTEL = 6443, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvBuiltIn : c_int { + Position = 0, + PointSize = 1, + ClipDistance = 3, + CullDistance = 4, + VertexId = 5, + InstanceId = 6, + PrimitiveId = 7, + InvocationId = 8, + Layer = 9, + ViewportIndex = 10, + TessLevelOuter = 11, + TessLevelInner = 12, + TessCoord = 13, + PatchVertices = 14, + FragCoord = 15, + PointCoord = 16, + FrontFacing = 17, + SampleId = 18, + SamplePosition = 19, + SampleMask = 20, + FragDepth = 22, + HelperInvocation = 23, + NumWorkgroups = 24, + WorkgroupSize = 25, + WorkgroupId = 26, + LocalInvocationId = 27, + GlobalInvocationId = 28, + LocalInvocationIndex = 29, + WorkDim = 30, + GlobalSize = 31, + EnqueuedWorkgroupSize = 32, + GlobalOffset = 33, + GlobalLinearId = 34, + SubgroupSize = 36, + SubgroupMaxSize = 37, + NumSubgroups = 38, + NumEnqueuedSubgroups = 39, + SubgroupId = 40, + SubgroupLocalInvocationId = 41, + VertexIndex = 42, + InstanceIndex = 43, + CoreIDARM = 4160, + CoreCountARM = 4161, + CoreMaxIDARM = 4162, + WarpIDARM = 4163, + WarpMaxIDARM = 4164, + SubgroupEqMask = 4416, + SubgroupEqMaskKHR = 4416, + SubgroupGeMask = 4417, + SubgroupGeMaskKHR = 4417, + SubgroupGtMask = 4418, + SubgroupGtMaskKHR = 4418, + SubgroupLeMask = 4419, + SubgroupLeMaskKHR = 4419, + SubgroupLtMask = 4420, + SubgroupLtMaskKHR = 4420, + BaseVertex = 4424, + BaseInstance = 4425, + DrawIndex = 4426, + PrimitiveShadingRateKHR = 4432, + DeviceIndex = 4438, + ViewIndex = 4440, + ShadingRateKHR = 4444, + TileOffsetQCOM = 4492, + TileDimensionQCOM = 4493, + TileApronSizeQCOM = 4494, + BaryCoordNoPerspAMD = 4992, + BaryCoordNoPerspCentroidAMD = 4993, + BaryCoordNoPerspSampleAMD = 4994, + BaryCoordSmoothAMD = 4995, + BaryCoordSmoothCentroidAMD = 4996, + BaryCoordSmoothSampleAMD = 4997, + BaryCoordPullModelAMD = 4998, + FragStencilRefEXT = 5014, + RemainingRecursionLevelsAMDX = 5021, + ShaderIndexAMDX = 5073, + SamplerHeapEXT = 5122, + ResourceHeapEXT = 5123, + ViewportMaskNV = 5253, + SecondaryPositionNV = 5257, + SecondaryViewportMaskNV = 5258, + PositionPerViewNV = 5261, + ViewportMaskPerViewNV = 5262, + FullyCoveredEXT = 5264, + TaskCountNV = 5274, + PrimitiveCountNV = 5275, + PrimitiveIndicesNV = 5276, + ClipDistancePerViewNV = 5277, + CullDistancePerViewNV = 5278, + LayerPerViewNV = 5279, + MeshViewCountNV = 5280, + MeshViewIndicesNV = 5281, + BaryCoordKHR = 5286, + BaryCoordNV = 5286, + BaryCoordNoPerspKHR = 5287, + BaryCoordNoPerspNV = 5287, + FragSizeEXT = 5292, + FragmentSizeNV = 5292, + FragInvocationCountEXT = 5293, + InvocationsPerPixelNV = 5293, + PrimitivePointIndicesEXT = 5294, + PrimitiveLineIndicesEXT = 5295, + PrimitiveTriangleIndicesEXT = 5296, + CullPrimitiveEXT = 5299, + LaunchIdKHR = 5319, + LaunchIdNV = 5319, + LaunchSizeKHR = 5320, + LaunchSizeNV = 5320, + WorldRayOriginKHR = 5321, + WorldRayOriginNV = 5321, + WorldRayDirectionKHR = 5322, + WorldRayDirectionNV = 5322, + ObjectRayOriginKHR = 5323, + ObjectRayOriginNV = 5323, + ObjectRayDirectionKHR = 5324, + ObjectRayDirectionNV = 5324, + RayTminKHR = 5325, + RayTminNV = 5325, + RayTmaxKHR = 5326, + RayTmaxNV = 5326, + InstanceCustomIndexKHR = 5327, + InstanceCustomIndexNV = 5327, + ObjectToWorldKHR = 5330, + ObjectToWorldNV = 5330, + WorldToObjectKHR = 5331, + WorldToObjectNV = 5331, + HitTNV = 5332, + HitKindKHR = 5333, + HitKindNV = 5333, + CurrentRayTimeNV = 5334, + HitTriangleVertexPositionsKHR = 5335, + HitMicroTriangleVertexPositionsNV = 5337, + HitMicroTriangleVertexBarycentricsNV = 5344, + IncomingRayFlagsKHR = 5351, + IncomingRayFlagsNV = 5351, + RayGeometryIndexKHR = 5352, + HitIsSphereNV = 5359, + HitIsLSSNV = 5360, + HitSpherePositionNV = 5361, + WarpsPerSMNV = 5374, + SMCountNV = 5375, + WarpIDNV = 5376, + SMIDNV = 5377, + HitLSSPositionsNV = 5396, + HitKindFrontFacingMicroTriangleNV = 5405, + HitKindBackFacingMicroTriangleNV = 5406, + HitSphereRadiusNV = 5420, + HitLSSRadiiNV = 5421, + ClusterIDNV = 5436, + CullMaskKHR = 6021, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvSelectionControlShift : c_int { + Flatten = 0, + DontFlatten = 1, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvSelectionControlMask : c_int { + None = 0, + Flatten = 0x00000001, + DontFlatten = 0x00000002, +} + +[AllowDuplicates] public enum SpvLoopControlShift : c_int { + Unroll = 0, + DontUnroll = 1, + DependencyInfinite = 2, + DependencyLength = 3, + MinIterations = 4, + MaxIterations = 5, + IterationMultiple = 6, + PeelCount = 7, + PartialCount = 8, + InitiationIntervalALTERA = 16, + InitiationIntervalINTEL = 16, + MaxConcurrencyALTERA = 17, + MaxConcurrencyINTEL = 17, + DependencyArrayALTERA = 18, + DependencyArrayINTEL = 18, + PipelineEnableALTERA = 19, + PipelineEnableINTEL = 19, + LoopCoalesceALTERA = 20, + LoopCoalesceINTEL = 20, + MaxInterleavingALTERA = 21, + MaxInterleavingINTEL = 21, + SpeculatedIterationsALTERA = 22, + SpeculatedIterationsINTEL = 22, + NoFusionALTERA = 23, + NoFusionINTEL = 23, + LoopCountALTERA = 24, + LoopCountINTEL = 24, + MaxReinvocationDelayALTERA = 25, + MaxReinvocationDelayINTEL = 25, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvLoopControlMask : c_int { + None = 0, + Unroll = 0x00000001, + DontUnroll = 0x00000002, + DependencyInfinite = 0x00000004, + DependencyLength = 0x00000008, + MinIterations = 0x00000010, + MaxIterations = 0x00000020, + IterationMultiple = 0x00000040, + PeelCount = 0x00000080, + PartialCount = 0x00000100, + InitiationIntervalALTERA = 0x00010000, + InitiationIntervalINTEL = 0x00010000, + MaxConcurrencyALTERA = 0x00020000, + MaxConcurrencyINTEL = 0x00020000, + DependencyArrayALTERA = 0x00040000, + DependencyArrayINTEL = 0x00040000, + PipelineEnableALTERA = 0x00080000, + PipelineEnableINTEL = 0x00080000, + LoopCoalesceALTERA = 0x00100000, + LoopCoalesceINTEL = 0x00100000, + MaxInterleavingALTERA = 0x00200000, + MaxInterleavingINTEL = 0x00200000, + SpeculatedIterationsALTERA = 0x00400000, + SpeculatedIterationsINTEL = 0x00400000, + NoFusionALTERA = 0x00800000, + NoFusionINTEL = 0x00800000, + LoopCountALTERA = 0x01000000, + LoopCountINTEL = 0x01000000, + MaxReinvocationDelayALTERA = 0x02000000, + MaxReinvocationDelayINTEL = 0x02000000, +} + +[AllowDuplicates] public enum SpvFunctionControlShift : c_int { + Inline = 0, + DontInline = 1, + Pure = 2, + Const = 3, + OptNoneEXT = 16, + OptNoneINTEL = 16, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvFunctionControlMask : c_int { + None = 0, + Inline = 0x00000001, + DontInline = 0x00000002, + Pure = 0x00000004, + Const = 0x00000008, + OptNoneEXT = 0x00010000, + OptNoneINTEL = 0x00010000, +} + +[AllowDuplicates] public enum SpvMemorySemanticsShift : c_int { + Acquire = 1, + Release = 2, + AcquireRelease = 3, + SequentiallyConsistent = 4, + UniformMemory = 6, + SubgroupMemory = 7, + WorkgroupMemory = 8, + CrossWorkgroupMemory = 9, + AtomicCounterMemory = 10, + ImageMemory = 11, + OutputMemory = 12, + OutputMemoryKHR = 12, + MakeAvailable = 13, + MakeAvailableKHR = 13, + MakeVisible = 14, + MakeVisibleKHR = 14, + Volatile = 15, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvMemorySemanticsMask : c_int { + None = 0, + Acquire = 0x00000002, + Release = 0x00000004, + AcquireRelease = 0x00000008, + SequentiallyConsistent = 0x00000010, + UniformMemory = 0x00000040, + SubgroupMemory = 0x00000080, + WorkgroupMemory = 0x00000100, + CrossWorkgroupMemory = 0x00000200, + AtomicCounterMemory = 0x00000400, + ImageMemory = 0x00000800, + OutputMemory = 0x00001000, + OutputMemoryKHR = 0x00001000, + MakeAvailable = 0x00002000, + MakeAvailableKHR = 0x00002000, + MakeVisible = 0x00004000, + MakeVisibleKHR = 0x00004000, + Volatile = 0x00008000, +} + +[AllowDuplicates] public enum SpvMemoryAccessShift : c_int { + Volatile = 0, + Aligned = 1, + Nontemporal = 2, + MakePointerAvailable = 3, + MakePointerAvailableKHR = 3, + MakePointerVisible = 4, + MakePointerVisibleKHR = 4, + NonPrivatePointer = 5, + NonPrivatePointerKHR = 5, + AliasScopeINTELMask = 16, + NoAliasINTELMask = 17, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvMemoryAccessMask : c_int { + None = 0, + Volatile = 0x00000001, + Aligned = 0x00000002, + Nontemporal = 0x00000004, + MakePointerAvailable = 0x00000008, + MakePointerAvailableKHR = 0x00000008, + MakePointerVisible = 0x00000010, + MakePointerVisibleKHR = 0x00000010, + NonPrivatePointer = 0x00000020, + NonPrivatePointerKHR = 0x00000020, + AliasScopeINTELMask = 0x00010000, + NoAliasINTELMask = 0x00020000, +} + +[AllowDuplicates] public enum SpvScope : c_int { + CrossDevice = 0, + Device = 1, + Workgroup = 2, + Subgroup = 3, + Invocation = 4, + QueueFamily = 5, + QueueFamilyKHR = 5, + ShaderCallKHR = 6, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvGroupOperation : c_int { + Reduce = 0, + InclusiveScan = 1, + ExclusiveScan = 2, + ClusteredReduce = 3, + PartitionedReduceEXT = 6, + PartitionedReduceNV = 6, + PartitionedInclusiveScanEXT = 7, + PartitionedInclusiveScanNV = 7, + PartitionedExclusiveScanEXT = 8, + PartitionedExclusiveScanNV = 8, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvKernelEnqueueFlags : c_int { + NoWait = 0, + WaitKernel = 1, + WaitWorkGroup = 2, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvKernelProfilingInfoShift : c_int { + CmdExecTime = 0, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvKernelProfilingInfoMask : c_int { + None = 0, + CmdExecTime = 0x00000001, +} + +[AllowDuplicates] public enum SpvCapability : c_int { + Matrix = 0, + Shader = 1, + Geometry = 2, + Tessellation = 3, + Addresses = 4, + Linkage = 5, + Kernel = 6, + Vector16 = 7, + Float16Buffer = 8, + Float16 = 9, + Float64 = 10, + Int64 = 11, + Int64Atomics = 12, + ImageBasic = 13, + ImageReadWrite = 14, + ImageMipmap = 15, + Pipes = 17, + Groups = 18, + DeviceEnqueue = 19, + LiteralSampler = 20, + AtomicStorage = 21, + Int16 = 22, + TessellationPointSize = 23, + GeometryPointSize = 24, + ImageGatherExtended = 25, + StorageImageMultisample = 27, + UniformBufferArrayDynamicIndexing = 28, + SampledImageArrayDynamicIndexing = 29, + StorageBufferArrayDynamicIndexing = 30, + StorageImageArrayDynamicIndexing = 31, + ClipDistance = 32, + CullDistance = 33, + ImageCubeArray = 34, + SampleRateShading = 35, + ImageRect = 36, + SampledRect = 37, + GenericPointer = 38, + Int8 = 39, + InputAttachment = 40, + SparseResidency = 41, + MinLod = 42, + Sampled1D = 43, + Image1D = 44, + SampledCubeArray = 45, + SampledBuffer = 46, + ImageBuffer = 47, + ImageMSArray = 48, + StorageImageExtendedFormats = 49, + ImageQuery = 50, + DerivativeControl = 51, + InterpolationFunction = 52, + TransformFeedback = 53, + GeometryStreams = 54, + StorageImageReadWithoutFormat = 55, + StorageImageWriteWithoutFormat = 56, + MultiViewport = 57, + SubgroupDispatch = 58, + NamedBarrier = 59, + PipeStorage = 60, + GroupNonUniform = 61, + GroupNonUniformVote = 62, + GroupNonUniformArithmetic = 63, + GroupNonUniformBallot = 64, + GroupNonUniformShuffle = 65, + GroupNonUniformShuffleRelative = 66, + GroupNonUniformClustered = 67, + GroupNonUniformQuad = 68, + ShaderLayer = 69, + ShaderViewportIndex = 70, + UniformDecoration = 71, + CoreBuiltinsARM = 4165, + TileImageColorReadAccessEXT = 4166, + TileImageDepthReadAccessEXT = 4167, + TileImageStencilReadAccessEXT = 4168, + TensorsARM = 4174, + StorageTensorArrayDynamicIndexingARM = 4175, + StorageTensorArrayNonUniformIndexingARM = 4176, + GraphARM = 4191, + CooperativeMatrixLayoutsARM = 4201, + Float8EXT = 4212, + Float8CooperativeMatrixEXT = 4213, + FragmentShadingRateKHR = 4422, + SubgroupBallotKHR = 4423, + DrawParameters = 4427, + WorkgroupMemoryExplicitLayoutKHR = 4428, + WorkgroupMemoryExplicitLayout8BitAccessKHR = 4429, + WorkgroupMemoryExplicitLayout16BitAccessKHR = 4430, + SubgroupVoteKHR = 4431, + StorageBuffer16BitAccess = 4433, + StorageUniformBufferBlock16 = 4433, + StorageUniform16 = 4434, + UniformAndStorageBuffer16BitAccess = 4434, + StoragePushConstant16 = 4435, + StorageInputOutput16 = 4436, + DeviceGroup = 4437, + MultiView = 4439, + VariablePointersStorageBuffer = 4441, + VariablePointers = 4442, + AtomicStorageOps = 4445, + SampleMaskPostDepthCoverage = 4447, + StorageBuffer8BitAccess = 4448, + UniformAndStorageBuffer8BitAccess = 4449, + StoragePushConstant8 = 4450, + DenormPreserve = 4464, + DenormFlushToZero = 4465, + SignedZeroInfNanPreserve = 4466, + RoundingModeRTE = 4467, + RoundingModeRTZ = 4468, + RayQueryProvisionalKHR = 4471, + RayQueryKHR = 4472, + UntypedPointersKHR = 4473, + RayTraversalPrimitiveCullingKHR = 4478, + RayTracingKHR = 4479, + TextureSampleWeightedQCOM = 4484, + TextureBoxFilterQCOM = 4485, + TextureBlockMatchQCOM = 4486, + TileShadingQCOM = 4495, + CooperativeMatrixConversionQCOM = 4496, + TextureBlockMatch2QCOM = 4498, + Float16ImageAMD = 5008, + ImageGatherBiasLodAMD = 5009, + FragmentMaskAMD = 5010, + StencilExportEXT = 5013, + ImageReadWriteLodAMD = 5015, + Int64ImageEXT = 5016, + ShaderClockKHR = 5055, + ShaderEnqueueAMDX = 5067, + QuadControlKHR = 5087, + Int4TypeINTEL = 5112, + Int4CooperativeMatrixINTEL = 5114, + BFloat16TypeKHR = 5116, + BFloat16DotProductKHR = 5117, + BFloat16CooperativeMatrixKHR = 5118, + AbortKHR = 5120, + DescriptorHeapEXT = 5128, + ConstantDataKHR = 5146, + PoisonFreezeKHR = 5156, + SampleMaskOverrideCoverageNV = 5249, + GeometryShaderPassthroughNV = 5251, + ShaderViewportIndexLayerEXT = 5254, + ShaderViewportIndexLayerNV = 5254, + ShaderViewportMaskNV = 5255, + ShaderStereoViewNV = 5259, + PerViewAttributesNV = 5260, + FragmentFullyCoveredEXT = 5265, + MeshShadingNV = 5266, + ImageFootprintNV = 5282, + MeshShadingEXT = 5283, + FragmentBarycentricKHR = 5284, + FragmentBarycentricNV = 5284, + ComputeDerivativeGroupQuadsKHR = 5288, + ComputeDerivativeGroupQuadsNV = 5288, + FragmentDensityEXT = 5291, + ShadingRateNV = 5291, + GroupNonUniformPartitionedEXT = 5297, + GroupNonUniformPartitionedNV = 5297, + ShaderNonUniform = 5301, + ShaderNonUniformEXT = 5301, + RuntimeDescriptorArray = 5302, + RuntimeDescriptorArrayEXT = 5302, + InputAttachmentArrayDynamicIndexing = 5303, + InputAttachmentArrayDynamicIndexingEXT = 5303, + UniformTexelBufferArrayDynamicIndexing = 5304, + UniformTexelBufferArrayDynamicIndexingEXT = 5304, + StorageTexelBufferArrayDynamicIndexing = 5305, + StorageTexelBufferArrayDynamicIndexingEXT = 5305, + UniformBufferArrayNonUniformIndexing = 5306, + UniformBufferArrayNonUniformIndexingEXT = 5306, + SampledImageArrayNonUniformIndexing = 5307, + SampledImageArrayNonUniformIndexingEXT = 5307, + StorageBufferArrayNonUniformIndexing = 5308, + StorageBufferArrayNonUniformIndexingEXT = 5308, + StorageImageArrayNonUniformIndexing = 5309, + StorageImageArrayNonUniformIndexingEXT = 5309, + InputAttachmentArrayNonUniformIndexing = 5310, + InputAttachmentArrayNonUniformIndexingEXT = 5310, + UniformTexelBufferArrayNonUniformIndexing = 5311, + UniformTexelBufferArrayNonUniformIndexingEXT = 5311, + StorageTexelBufferArrayNonUniformIndexing = 5312, + StorageTexelBufferArrayNonUniformIndexingEXT = 5312, + RayTracingPositionFetchKHR = 5336, + RayTracingNV = 5340, + RayTracingMotionBlurNV = 5341, + VulkanMemoryModel = 5345, + VulkanMemoryModelKHR = 5345, + VulkanMemoryModelDeviceScope = 5346, + VulkanMemoryModelDeviceScopeKHR = 5346, + PhysicalStorageBufferAddresses = 5347, + PhysicalStorageBufferAddressesEXT = 5347, + ComputeDerivativeGroupLinearKHR = 5350, + ComputeDerivativeGroupLinearNV = 5350, + RayTracingProvisionalKHR = 5353, + CooperativeMatrixNV = 5357, + FragmentShaderSampleInterlockEXT = 5363, + FragmentShaderShadingRateInterlockEXT = 5372, + ShaderSMBuiltinsNV = 5373, + FragmentShaderPixelInterlockEXT = 5378, + DemoteToHelperInvocation = 5379, + DemoteToHelperInvocationEXT = 5379, + DisplacementMicromapNV = 5380, + RayTracingOpacityMicromapEXT = 5381, + ShaderInvocationReorderNV = 5383, + ShaderInvocationReorderEXT = 5388, + BindlessTextureNV = 5390, + RayQueryPositionFetchKHR = 5391, + CooperativeVectorNV = 5394, + AtomicFloat16VectorNV = 5404, + RayTracingDisplacementMicromapNV = 5409, + RawAccessChainsNV = 5414, + RayTracingSpheresGeometryNV = 5418, + RayTracingLinearSweptSpheresGeometryNV = 5419, + PushConstantBanksNV = 5423, + LongVectorEXT = 5425, + Shader64BitIndexingEXT = 5426, + CooperativeMatrixReductionsNV = 5430, + CooperativeMatrixConversionsNV = 5431, + CooperativeMatrixPerElementOperationsNV = 5432, + CooperativeMatrixTensorAddressingNV = 5433, + CooperativeMatrixBlockLoadsNV = 5434, + CooperativeVectorTrainingNV = 5435, + RayTracingClusterAccelerationStructureNV = 5437, + TensorAddressingNV = 5439, + SubgroupShuffleINTEL = 5568, + SubgroupBufferBlockIOINTEL = 5569, + SubgroupImageBlockIOINTEL = 5570, + SubgroupImageMediaBlockIOINTEL = 5579, + RoundToInfinityINTEL = 5582, + FloatingPointModeINTEL = 5583, + IntegerFunctions2INTEL = 5584, + FunctionPointersINTEL = 5603, + IndirectReferencesINTEL = 5604, + AsmINTEL = 5606, + AtomicFloat32MinMaxEXT = 5612, + AtomicFloat64MinMaxEXT = 5613, + AtomicFloat16MinMaxEXT = 5616, + VectorComputeINTEL = 5617, + VectorAnyINTEL = 5619, + ExpectAssumeKHR = 5629, + SubgroupAvcMotionEstimationINTEL = 5696, + SubgroupAvcMotionEstimationIntraINTEL = 5697, + SubgroupAvcMotionEstimationChromaINTEL = 5698, + VariableLengthArrayINTEL = 5817, + FunctionFloatControlINTEL = 5821, + FPGAMemoryAttributesALTERA = 5824, + FPGAMemoryAttributesINTEL = 5824, + FPFastMathModeINTEL = 5837, + ArbitraryPrecisionIntegersALTERA = 5844, + ArbitraryPrecisionIntegersINTEL = 5844, + ArbitraryPrecisionFloatingPointALTERA = 5845, + ArbitraryPrecisionFloatingPointINTEL = 5845, + UnstructuredLoopControlsINTEL = 5886, + FPGALoopControlsALTERA = 5888, + FPGALoopControlsINTEL = 5888, + KernelAttributesINTEL = 5892, + FPGAKernelAttributesINTEL = 5897, + FPGAMemoryAccessesALTERA = 5898, + FPGAMemoryAccessesINTEL = 5898, + FPGAClusterAttributesALTERA = 5904, + FPGAClusterAttributesINTEL = 5904, + LoopFuseALTERA = 5906, + LoopFuseINTEL = 5906, + FPGADSPControlALTERA = 5908, + FPGADSPControlINTEL = 5908, + MemoryAccessAliasingINTEL = 5910, + FPGAInvocationPipeliningAttributesALTERA = 5916, + FPGAInvocationPipeliningAttributesINTEL = 5916, + FPGABufferLocationALTERA = 5920, + FPGABufferLocationINTEL = 5920, + ArbitraryPrecisionFixedPointALTERA = 5922, + ArbitraryPrecisionFixedPointINTEL = 5922, + USMStorageClassesALTERA = 5935, + USMStorageClassesINTEL = 5935, + RuntimeAlignedAttributeALTERA = 5939, + RuntimeAlignedAttributeINTEL = 5939, + IOPipesALTERA = 5943, + IOPipesINTEL = 5943, + BlockingPipesALTERA = 5945, + BlockingPipesINTEL = 5945, + FPGARegALTERA = 5948, + FPGARegINTEL = 5948, + DotProductInputAll = 6016, + DotProductInputAllKHR = 6016, + DotProductInput4x8Bit = 6017, + DotProductInput4x8BitKHR = 6017, + DotProductInput4x8BitPacked = 6018, + DotProductInput4x8BitPackedKHR = 6018, + DotProduct = 6019, + DotProductKHR = 6019, + RayCullMaskKHR = 6020, + CooperativeMatrixKHR = 6022, + ReplicatedCompositesEXT = 6024, + BitInstructions = 6025, + GroupNonUniformRotateKHR = 6026, + FloatControls2 = 6029, + FMAKHR = 6030, + AtomicFloat32AddEXT = 6033, + AtomicFloat64AddEXT = 6034, + LongCompositesINTEL = 6089, + OptNoneEXT = 6094, + OptNoneINTEL = 6094, + AtomicFloat16AddEXT = 6095, + DebugInfoModuleINTEL = 6114, + BFloat16ConversionINTEL = 6115, + SplitBarrierINTEL = 6141, + ArithmeticFenceEXT = 6144, + FPGAClusterAttributesV2ALTERA = 6150, + FPGAClusterAttributesV2INTEL = 6150, + FPGAKernelAttributesv2INTEL = 6161, + TaskSequenceALTERA = 6162, + TaskSequenceINTEL = 6162, + FPMaxErrorINTEL = 6169, + FPGALatencyControlALTERA = 6171, + FPGALatencyControlINTEL = 6171, + FPGAArgumentInterfacesALTERA = 6174, + FPGAArgumentInterfacesINTEL = 6174, + GlobalVariableHostAccessINTEL = 6187, + GlobalVariableFPGADecorationsALTERA = 6189, + GlobalVariableFPGADecorationsINTEL = 6189, + SubgroupBufferPrefetchINTEL = 6220, + Subgroup2DBlockIOINTEL = 6228, + Subgroup2DBlockTransformINTEL = 6229, + Subgroup2DBlockTransposeINTEL = 6230, + SubgroupMatrixMultiplyAccumulateINTEL = 6236, + TernaryBitwiseFunctionINTEL = 6241, + UntypedVariableLengthArrayINTEL = 6243, + SpecConditionalINTEL = 6245, + FunctionVariantsINTEL = 6246, + GroupUniformArithmeticKHR = 6400, + TensorFloat32RoundingINTEL = 6425, + MaskedGatherScatterINTEL = 6427, + CacheControlsINTEL = 6441, + RegisterLimitsINTEL = 6460, + BindlessImagesINTEL = 6528, + DotProductFloat16AccFloat32VALVE = 6912, + DotProductFloat16AccFloat16VALVE = 6913, + DotProductBFloat16AccVALVE = 6914, + DotProductFloat8AccFloat32VALVE = 6915, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvRayFlagsShift : c_int { + OpaqueKHR = 0, + NoOpaqueKHR = 1, + TerminateOnFirstHitKHR = 2, + SkipClosestHitShaderKHR = 3, + CullBackFacingTrianglesKHR = 4, + CullFrontFacingTrianglesKHR = 5, + CullOpaqueKHR = 6, + CullNoOpaqueKHR = 7, + SkipBuiltinPrimitivesNV = 8, + SkipTrianglesKHR = 8, + SkipAABBsKHR = 9, + ForceOpacityMicromap2StateEXT = 10, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvRayFlagsMask : c_int { + None = 0, + OpaqueKHR = 0x00000001, + NoOpaqueKHR = 0x00000002, + TerminateOnFirstHitKHR = 0x00000004, + SkipClosestHitShaderKHR = 0x00000008, + CullBackFacingTrianglesKHR = 0x00000010, + CullFrontFacingTrianglesKHR = 0x00000020, + CullOpaqueKHR = 0x00000040, + CullNoOpaqueKHR = 0x00000080, + SkipBuiltinPrimitivesNV = 0x00000100, + SkipTrianglesKHR = 0x00000100, + SkipAABBsKHR = 0x00000200, + ForceOpacityMicromap2StateEXT = 0x00000400, +} + +[AllowDuplicates] public enum SpvRayQueryIntersection : c_int { + RayQueryCandidateIntersectionKHR = 0, + RayQueryCommittedIntersectionKHR = 1, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvRayQueryCommittedIntersectionType : c_int { + RayQueryCommittedIntersectionNoneKHR = 0, + RayQueryCommittedIntersectionTriangleKHR = 1, + RayQueryCommittedIntersectionGeneratedKHR = 2, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvRayQueryCandidateIntersectionType : c_int { + RayQueryCandidateIntersectionTriangleKHR = 0, + RayQueryCandidateIntersectionAABBKHR = 1, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvFragmentShadingRateShift : c_int { + Vertical2Pixels = 0, + Vertical4Pixels = 1, + Horizontal2Pixels = 2, + Horizontal4Pixels = 3, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvFragmentShadingRateMask : c_int { + None = 0, + Vertical2Pixels = 0x00000001, + Vertical4Pixels = 0x00000002, + Horizontal2Pixels = 0x00000004, + Horizontal4Pixels = 0x00000008, +} + +[AllowDuplicates] public enum SpvFPDenormMode : c_int { + Preserve = 0, + FlushToZero = 1, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvFPOperationMode : c_int { + IEEE = 0, + ALT = 1, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvQuantizationModes : c_int { + TRN = 0, + TRN_ZERO = 1, + RND = 2, + RND_ZERO = 3, + RND_INF = 4, + RND_MIN_INF = 5, + RND_CONV = 6, + RND_CONV_ODD = 7, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvOverflowModes : c_int { + WRAP = 0, + SAT = 1, + SAT_ZERO = 2, + SAT_SYM = 3, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvPackedVectorFormat : c_int { + PackedVectorFormat4x8Bit = 0, + PackedVectorFormat4x8BitKHR = 0, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvCooperativeMatrixOperandsShift : c_int { + MatrixASignedComponentsKHR = 0, + MatrixBSignedComponentsKHR = 1, + MatrixCSignedComponentsKHR = 2, + MatrixResultSignedComponentsKHR = 3, + SaturatingAccumulationKHR = 4, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvCooperativeMatrixOperandsMask : c_int { + None = 0, + MatrixASignedComponentsKHR = 0x00000001, + MatrixBSignedComponentsKHR = 0x00000002, + MatrixCSignedComponentsKHR = 0x00000004, + MatrixResultSignedComponentsKHR = 0x00000008, + SaturatingAccumulationKHR = 0x00000010, +} + +[AllowDuplicates] public enum SpvCooperativeMatrixLayout : c_int { + RowMajorKHR = 0, + ColumnMajorKHR = 1, + RowBlockedInterleavedARM = 4202, + ColumnBlockedInterleavedARM = 4203, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvCooperativeMatrixUse : c_int { + MatrixAKHR = 0, + MatrixBKHR = 1, + MatrixAccumulatorKHR = 2, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvCooperativeMatrixReduceShift : c_int { + Row = 0, + Column = 1, + _2x2 = 2, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvCooperativeMatrixReduceMask : c_int { + None = 0, + Row = 0x00000001, + Column = 0x00000002, + _2x2 = 0x00000004, +} + +[AllowDuplicates] public enum SpvTensorClampMode : c_int { + Undefined = 0, + Constant = 1, + ClampToEdge = 2, + Repeat = 3, + RepeatMirrored = 4, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvTensorAddressingOperandsShift : c_int { + TensorView = 0, + DecodeFunc = 1, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvTensorAddressingOperandsMask : c_int { + None = 0, + TensorView = 0x00000001, + DecodeFunc = 0x00000002, +} + +[AllowDuplicates] public enum SpvTensorOperandsShift : c_int { + NontemporalARM = 0, + OutOfBoundsValueARM = 1, + MakeElementAvailableARM = 2, + MakeElementVisibleARM = 3, + NonPrivateElementARM = 4, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvTensorOperandsMask : c_int { + None = 0, + NontemporalARM = 0x00000001, + OutOfBoundsValueARM = 0x00000002, + MakeElementAvailableARM = 0x00000004, + MakeElementVisibleARM = 0x00000008, + NonPrivateElementARM = 0x00000010, +} + +[AllowDuplicates] public enum SpvInitializationModeQualifier : c_int { + InitOnDeviceReprogramALTERA = 0, + InitOnDeviceReprogramINTEL = 0, + InitOnDeviceResetALTERA = 1, + InitOnDeviceResetINTEL = 1, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvHostAccessQualifier : c_int { + NoneINTEL = 0, + ReadINTEL = 1, + WriteINTEL = 2, + ReadWriteINTEL = 3, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvLoadCacheControl : c_int { + UncachedINTEL = 0, + CachedINTEL = 1, + StreamingINTEL = 2, + InvalidateAfterReadINTEL = 3, + ConstCachedINTEL = 4, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvStoreCacheControl : c_int { + UncachedINTEL = 0, + WriteThroughINTEL = 1, + WriteBackINTEL = 2, + StreamingINTEL = 3, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvNamedMaximumNumberOfRegisters : c_int { + AutoINTEL = 0, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvMatrixMultiplyAccumulateOperandsShift : c_int { + MatrixASignedComponentsINTEL = 0, + MatrixBSignedComponentsINTEL = 1, + MatrixCBFloat16INTEL = 2, + MatrixResultBFloat16INTEL = 3, + MatrixAPackedInt8INTEL = 4, + MatrixBPackedInt8INTEL = 5, + MatrixAPackedInt4INTEL = 6, + MatrixBPackedInt4INTEL = 7, + MatrixATF32INTEL = 8, + MatrixBTF32INTEL = 9, + MatrixAPackedFloat16INTEL = 10, + MatrixBPackedFloat16INTEL = 11, + MatrixAPackedBFloat16INTEL = 12, + MatrixBPackedBFloat16INTEL = 13, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvMatrixMultiplyAccumulateOperandsMask : c_int { + None = 0, + MatrixASignedComponentsINTEL = 0x00000001, + MatrixBSignedComponentsINTEL = 0x00000002, + MatrixCBFloat16INTEL = 0x00000004, + MatrixResultBFloat16INTEL = 0x00000008, + MatrixAPackedInt8INTEL = 0x00000010, + MatrixBPackedInt8INTEL = 0x00000020, + MatrixAPackedInt4INTEL = 0x00000040, + MatrixBPackedInt4INTEL = 0x00000080, + MatrixATF32INTEL = 0x00000100, + MatrixBTF32INTEL = 0x00000200, + MatrixAPackedFloat16INTEL = 0x00000400, + MatrixBPackedFloat16INTEL = 0x00000800, + MatrixAPackedBFloat16INTEL = 0x00001000, + MatrixBPackedBFloat16INTEL = 0x00002000, +} + +[AllowDuplicates] public enum SpvRawAccessChainOperandsShift : c_int { + RobustnessPerComponentNV = 0, + RobustnessPerElementNV = 1, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvRawAccessChainOperandsMask : c_int { + None = 0, + RobustnessPerComponentNV = 0x00000001, + RobustnessPerElementNV = 0x00000002, +} + +[AllowDuplicates] public enum SpvFPEncoding : c_int { + BFloat16KHR = 0, + Float8E4M3EXT = 4214, + Float8E5M2EXT = 4215, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvCooperativeVectorMatrixLayout : c_int { + RowMajorNV = 0, + ColumnMajorNV = 1, + InferencingOptimalNV = 2, + TrainingOptimalNV = 3, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvComponentType : c_int { + Float16NV = 0, + Float32NV = 1, + Float64NV = 2, + SignedInt8NV = 3, + SignedInt16NV = 4, + SignedInt32NV = 5, + SignedInt64NV = 6, + UnsignedInt8NV = 7, + UnsignedInt16NV = 8, + UnsignedInt32NV = 9, + UnsignedInt64NV = 10, + SignedInt8PackedNV = 1000491000, + UnsignedInt8PackedNV = 1000491001, + FloatE4M3NV = 1000491002, + FloatE5M2NV = 1000491003, + //Max = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvOp : c_int { + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, + OpImageSparseRead = 320, + OpSizeOf = 321, + OpTypePipeStorage = 322, + OpConstantPipeStorage = 323, + OpCreatePipeFromPipeStorage = 324, + OpGetKernelLocalSizeForSubgroupCount = 325, + OpGetKernelMaxNumSubgroups = 326, + OpTypeNamedBarrier = 327, + OpNamedBarrierInitialize = 328, + OpMemoryNamedBarrier = 329, + OpModuleProcessed = 330, + OpExecutionModeId = 331, + OpDecorateId = 332, + OpGroupNonUniformElect = 333, + OpGroupNonUniformAll = 334, + OpGroupNonUniformAny = 335, + OpGroupNonUniformAllEqual = 336, + OpGroupNonUniformBroadcast = 337, + OpGroupNonUniformBroadcastFirst = 338, + OpGroupNonUniformBallot = 339, + OpGroupNonUniformInverseBallot = 340, + OpGroupNonUniformBallotBitExtract = 341, + OpGroupNonUniformBallotBitCount = 342, + OpGroupNonUniformBallotFindLSB = 343, + OpGroupNonUniformBallotFindMSB = 344, + OpGroupNonUniformShuffle = 345, + OpGroupNonUniformShuffleXor = 346, + OpGroupNonUniformShuffleUp = 347, + OpGroupNonUniformShuffleDown = 348, + OpGroupNonUniformIAdd = 349, + OpGroupNonUniformFAdd = 350, + OpGroupNonUniformIMul = 351, + OpGroupNonUniformFMul = 352, + OpGroupNonUniformSMin = 353, + OpGroupNonUniformUMin = 354, + OpGroupNonUniformFMin = 355, + OpGroupNonUniformSMax = 356, + OpGroupNonUniformUMax = 357, + OpGroupNonUniformFMax = 358, + OpGroupNonUniformBitwiseAnd = 359, + OpGroupNonUniformBitwiseOr = 360, + OpGroupNonUniformBitwiseXor = 361, + OpGroupNonUniformLogicalAnd = 362, + OpGroupNonUniformLogicalOr = 363, + OpGroupNonUniformLogicalXor = 364, + OpGroupNonUniformQuadBroadcast = 365, + OpGroupNonUniformQuadSwap = 366, + OpCopyLogical = 400, + OpPtrEqual = 401, + OpPtrNotEqual = 402, + OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, + OpTypeTensorARM = 4163, + OpTensorReadARM = 4164, + OpTensorWriteARM = 4165, + OpTensorQuerySizeARM = 4166, + OpGraphConstantARM = 4181, + OpGraphEntryPointARM = 4182, + OpGraphARM = 4183, + OpGraphInputARM = 4184, + OpGraphSetOutputARM = 4185, + OpGraphEndARM = 4186, + OpTypeGraphARM = 4190, + OpTerminateInvocation = 4416, + OpTypeUntypedPointerKHR = 4417, + OpUntypedVariableKHR = 4418, + OpUntypedAccessChainKHR = 4419, + OpUntypedInBoundsAccessChainKHR = 4420, + OpSubgroupBallotKHR = 4421, + OpSubgroupFirstInvocationKHR = 4422, + OpUntypedPtrAccessChainKHR = 4423, + OpUntypedInBoundsPtrAccessChainKHR = 4424, + OpUntypedArrayLengthKHR = 4425, + OpUntypedPrefetchKHR = 4426, + OpFmaKHR = 4427, + OpSubgroupAllKHR = 4428, + OpSubgroupAnyKHR = 4429, + OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, + OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefsKHR = 4433, + OpUntypedGroupAsyncCopyKHR = 4434, + OpTraceRayKHR = 4445, + OpExecuteCallableKHR = 4446, + OpConvertUToAccelerationStructureKHR = 4447, + OpIgnoreIntersectionKHR = 4448, + OpTerminateRayKHR = 4449, + OpSDot = 4450, + OpSDotKHR = 4450, + OpUDot = 4451, + OpUDotKHR = 4451, + OpSUDot = 4452, + OpSUDotKHR = 4452, + OpSDotAccSat = 4453, + OpSDotAccSatKHR = 4453, + OpUDotAccSat = 4454, + OpUDotAccSatKHR = 4454, + OpSUDotAccSat = 4455, + OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, + OpConstantCompositeReplicateEXT = 4461, + OpSpecConstantCompositeReplicateEXT = 4462, + OpCompositeConstructReplicateEXT = 4463, + OpTypeRayQueryKHR = 4472, + OpRayQueryInitializeKHR = 4473, + OpRayQueryTerminateKHR = 4474, + OpRayQueryGenerateIntersectionKHR = 4475, + OpRayQueryConfirmIntersectionKHR = 4476, + OpRayQueryProceedKHR = 4477, + OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, + OpBitCastArrayQCOM = 4497, + OpImageBlockMatchWindowSSDQCOM = 4500, + OpImageBlockMatchWindowSADQCOM = 4501, + OpImageBlockMatchGatherSSDQCOM = 4502, + OpImageBlockMatchGatherSADQCOM = 4503, + OpCompositeConstructCoopMatQCOM = 4540, + OpCompositeExtractCoopMatQCOM = 4541, + OpExtractSubArrayQCOM = 4542, + OpGroupIAddNonUniformAMD = 5000, + OpGroupFAddNonUniformAMD = 5001, + OpGroupFMinNonUniformAMD = 5002, + OpGroupUMinNonUniformAMD = 5003, + OpGroupSMinNonUniformAMD = 5004, + OpGroupFMaxNonUniformAMD = 5005, + OpGroupUMaxNonUniformAMD = 5006, + OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpReadClockKHR = 5056, + OpAllocateNodePayloadsAMDX = 5074, + OpEnqueueNodePayloadsAMDX = 5075, + OpTypeNodePayloadArrayAMDX = 5076, + OpFinishWritingNodePayloadAMDX = 5078, + OpNodePayloadArrayLengthAMDX = 5090, + OpIsNodePayloadValidAMDX = 5101, + OpConstantStringAMDX = 5103, + OpSpecConstantStringAMDX = 5104, + OpGroupNonUniformQuadAllKHR = 5110, + OpGroupNonUniformQuadAnyKHR = 5111, + OpTypeBufferEXT = 5115, + OpBufferPointerEXT = 5119, + OpAbortKHR = 5121, + OpUntypedImageTexelPointerEXT = 5126, + OpMemberDecorateIdEXT = 5127, + OpConstantSizeOfEXT = 5129, + OpConstantDataKHR = 5147, + OpSpecConstantDataKHR = 5148, + OpPoisonKHR = 5158, + OpFreezeKHR = 5159, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, + OpImageSampleFootprintNV = 5283, + OpTypeCooperativeVectorNV = 5288, + OpTypeVectorIdEXT = 5288, + OpCooperativeVectorMatrixMulNV = 5289, + OpCooperativeVectorOuterProductAccumulateNV = 5290, + OpCooperativeVectorReduceSumAccumulateNV = 5291, + OpCooperativeVectorMatrixMulAddNV = 5292, + OpCooperativeMatrixConvertNV = 5293, + OpEmitMeshTasksEXT = 5294, + OpSetMeshOutputsEXT = 5295, + OpGroupNonUniformPartitionEXT = 5296, + OpGroupNonUniformPartitionNV = 5296, + OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, + OpCooperativeVectorLoadNV = 5302, + OpCooperativeVectorStoreNV = 5303, + OpHitObjectRecordFromQueryEXT = 5304, + OpHitObjectRecordMissEXT = 5305, + OpHitObjectRecordMissMotionEXT = 5306, + OpHitObjectGetIntersectionTriangleVertexPositionsEXT = 5307, + OpHitObjectGetRayFlagsEXT = 5308, + OpHitObjectSetShaderBindingTableRecordIndexEXT = 5309, + OpHitObjectReorderExecuteShaderEXT = 5310, + OpHitObjectTraceReorderExecuteEXT = 5311, + OpHitObjectTraceMotionReorderExecuteEXT = 5312, + OpTypeHitObjectEXT = 5313, + OpReorderThreadWithHintEXT = 5314, + OpReorderThreadWithHitObjectEXT = 5315, + OpHitObjectTraceRayEXT = 5316, + OpHitObjectTraceRayMotionEXT = 5317, + OpHitObjectRecordEmptyEXT = 5318, + OpHitObjectExecuteShaderEXT = 5319, + OpHitObjectGetCurrentTimeEXT = 5320, + OpHitObjectGetAttributesEXT = 5321, + OpHitObjectGetHitKindEXT = 5322, + OpHitObjectGetPrimitiveIndexEXT = 5323, + OpHitObjectGetGeometryIndexEXT = 5324, + OpHitObjectGetInstanceIdEXT = 5325, + OpHitObjectGetInstanceCustomIndexEXT = 5326, + OpHitObjectGetObjectRayOriginEXT = 5327, + OpHitObjectGetObjectRayDirectionEXT = 5328, + OpHitObjectGetWorldRayDirectionEXT = 5329, + OpHitObjectGetWorldRayOriginEXT = 5330, + OpHitObjectGetObjectToWorldEXT = 5331, + OpHitObjectGetWorldToObjectEXT = 5332, + OpHitObjectGetRayTMaxEXT = 5333, + OpReportIntersectionKHR = 5334, + OpReportIntersectionNV = 5334, + OpIgnoreIntersectionNV = 5335, + OpTerminateRayNV = 5336, + OpTraceNV = 5337, + OpTraceMotionNV = 5338, + OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, + OpTypeAccelerationStructureKHR = 5341, + OpTypeAccelerationStructureNV = 5341, + OpExecuteCallableNV = 5344, + OpRayQueryGetClusterIdNV = 5345, + OpRayQueryGetIntersectionClusterIdNV = 5345, + OpHitObjectGetClusterIdNV = 5346, + OpHitObjectGetRayTMinEXT = 5347, + OpHitObjectGetShaderBindingTableRecordIndexEXT = 5348, + OpHitObjectGetShaderRecordBufferHandleEXT = 5349, + OpHitObjectIsEmptyEXT = 5350, + OpHitObjectIsHitEXT = 5351, + OpHitObjectIsMissEXT = 5352, + OpTypeCooperativeMatrixNV = 5358, + OpCooperativeMatrixLoadNV = 5359, + OpCooperativeMatrixStoreNV = 5360, + OpCooperativeMatrixMulAddNV = 5361, + OpCooperativeMatrixLengthNV = 5362, + OpBeginInvocationInterlockEXT = 5364, + OpEndInvocationInterlockEXT = 5365, + OpCooperativeMatrixReduceNV = 5366, + OpCooperativeMatrixLoadTensorNV = 5367, + OpCooperativeMatrixStoreTensorNV = 5368, + OpCooperativeMatrixPerElementOpNV = 5369, + OpTypeTensorLayoutNV = 5370, + OpTypeTensorViewNV = 5371, + OpCreateTensorLayoutNV = 5372, + OpTensorLayoutSetDimensionNV = 5373, + OpTensorLayoutSetStrideNV = 5374, + OpTensorLayoutSliceNV = 5375, + OpTensorLayoutSetClampValueNV = 5376, + OpCreateTensorViewNV = 5377, + OpTensorViewSetDimensionNV = 5378, + OpTensorViewSetStrideNV = 5379, + OpDemoteToHelperInvocation = 5380, + OpDemoteToHelperInvocationEXT = 5380, + OpIsHelperInvocationEXT = 5381, + OpTensorViewSetClipNV = 5382, + OpTensorLayoutSetBlockSizeNV = 5384, + OpCooperativeMatrixTransposeNV = 5390, + OpConvertUToImageNV = 5391, + OpConvertUToSamplerNV = 5392, + OpConvertImageToUNV = 5393, + OpConvertSamplerToUNV = 5394, + OpConvertUToSampledImageNV = 5395, + OpConvertSampledImageToUNV = 5396, + OpSamplerImageAddressingModeNV = 5397, + OpRawAccessChainNV = 5398, + OpRayQueryGetIntersectionSpherePositionNV = 5427, + OpRayQueryGetIntersectionSphereRadiusNV = 5428, + OpRayQueryGetIntersectionLSSPositionsNV = 5429, + OpRayQueryGetIntersectionLSSRadiiNV = 5430, + OpRayQueryGetIntersectionLSSHitValueNV = 5431, + OpHitObjectGetSpherePositionNV = 5432, + OpHitObjectGetSphereRadiusNV = 5433, + OpHitObjectGetLSSPositionsNV = 5434, + OpHitObjectGetLSSRadiiNV = 5435, + OpHitObjectIsSphereHitNV = 5436, + OpHitObjectIsLSSHitNV = 5437, + OpRayQueryIsSphereHitNV = 5438, + OpRayQueryIsLSSHitNV = 5439, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, + OpSubgroupImageMediaBlockReadINTEL = 5580, + OpSubgroupImageMediaBlockWriteINTEL = 5581, + OpUCountLeadingZerosINTEL = 5585, + OpUCountTrailingZerosINTEL = 5586, + OpAbsISubINTEL = 5587, + OpAbsUSubINTEL = 5588, + OpIAddSatINTEL = 5589, + OpUAddSatINTEL = 5590, + OpIAverageINTEL = 5591, + OpUAverageINTEL = 5592, + OpIAverageRoundedINTEL = 5593, + OpUAverageRoundedINTEL = 5594, + OpISubSatINTEL = 5595, + OpUSubSatINTEL = 5596, + OpIMul32x16INTEL = 5597, + OpUMul32x16INTEL = 5598, + OpConstantFunctionPointerINTEL = 5600, + OpFunctionPointerCallINTEL = 5601, + OpAsmTargetINTEL = 5609, + OpAsmINTEL = 5610, + OpAsmCallINTEL = 5611, + OpAtomicFMinEXT = 5614, + OpAtomicFMaxEXT = 5615, + OpAssumeTrueKHR = 5630, + OpExpectKHR = 5631, + OpDecorateString = 5632, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateString = 5633, + OpMemberDecorateStringGOOGLE = 5633, + OpVmeImageINTEL = 5699, + OpTypeVmeImageINTEL = 5700, + OpTypeAvcImePayloadINTEL = 5701, + OpTypeAvcRefPayloadINTEL = 5702, + OpTypeAvcSicPayloadINTEL = 5703, + OpTypeAvcMcePayloadINTEL = 5704, + OpTypeAvcMceResultINTEL = 5705, + OpTypeAvcImeResultINTEL = 5706, + OpTypeAvcImeResultSingleReferenceStreamoutINTEL = 5707, + OpTypeAvcImeResultDualReferenceStreamoutINTEL = 5708, + OpTypeAvcImeSingleReferenceStreaminINTEL = 5709, + OpTypeAvcImeDualReferenceStreaminINTEL = 5710, + OpTypeAvcRefResultINTEL = 5711, + OpTypeAvcSicResultINTEL = 5712, + OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL = 5713, + OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL = 5714, + OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL = 5715, + OpSubgroupAvcMceSetInterShapePenaltyINTEL = 5716, + OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL = 5717, + OpSubgroupAvcMceSetInterDirectionPenaltyINTEL = 5718, + OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL = 5719, + OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL = 5720, + OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL = 5721, + OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL = 5722, + OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL = 5723, + OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL = 5724, + OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL = 5725, + OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL = 5726, + OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL = 5727, + OpSubgroupAvcMceSetAcOnlyHaarINTEL = 5728, + OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL = 5729, + OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL = 5730, + OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL = 5731, + OpSubgroupAvcMceConvertToImePayloadINTEL = 5732, + OpSubgroupAvcMceConvertToImeResultINTEL = 5733, + OpSubgroupAvcMceConvertToRefPayloadINTEL = 5734, + OpSubgroupAvcMceConvertToRefResultINTEL = 5735, + OpSubgroupAvcMceConvertToSicPayloadINTEL = 5736, + OpSubgroupAvcMceConvertToSicResultINTEL = 5737, + OpSubgroupAvcMceGetMotionVectorsINTEL = 5738, + OpSubgroupAvcMceGetInterDistortionsINTEL = 5739, + OpSubgroupAvcMceGetBestInterDistortionsINTEL = 5740, + OpSubgroupAvcMceGetInterMajorShapeINTEL = 5741, + OpSubgroupAvcMceGetInterMinorShapeINTEL = 5742, + OpSubgroupAvcMceGetInterDirectionsINTEL = 5743, + OpSubgroupAvcMceGetInterMotionVectorCountINTEL = 5744, + OpSubgroupAvcMceGetInterReferenceIdsINTEL = 5745, + OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL = 5746, + OpSubgroupAvcImeInitializeINTEL = 5747, + OpSubgroupAvcImeSetSingleReferenceINTEL = 5748, + OpSubgroupAvcImeSetDualReferenceINTEL = 5749, + OpSubgroupAvcImeRefWindowSizeINTEL = 5750, + OpSubgroupAvcImeAdjustRefOffsetINTEL = 5751, + OpSubgroupAvcImeConvertToMcePayloadINTEL = 5752, + OpSubgroupAvcImeSetMaxMotionVectorCountINTEL = 5753, + OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL = 5754, + OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL = 5755, + OpSubgroupAvcImeSetWeightedSadINTEL = 5756, + OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL = 5757, + OpSubgroupAvcImeEvaluateWithDualReferenceINTEL = 5758, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL = 5759, + OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL = 5760, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL = 5761, + OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL = 5762, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL = 5763, + OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL = 5764, + OpSubgroupAvcImeConvertToMceResultINTEL = 5765, + OpSubgroupAvcImeGetSingleReferenceStreaminINTEL = 5766, + OpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767, + OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768, + OpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775, + OpSubgroupAvcImeGetBorderReachedINTEL = 5776, + OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777, + OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778, + OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL = 5779, + OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL = 5780, + OpSubgroupAvcFmeInitializeINTEL = 5781, + OpSubgroupAvcBmeInitializeINTEL = 5782, + OpSubgroupAvcRefConvertToMcePayloadINTEL = 5783, + OpSubgroupAvcRefSetBidirectionalMixDisableINTEL = 5784, + OpSubgroupAvcRefSetBilinearFilterEnableINTEL = 5785, + OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL = 5786, + OpSubgroupAvcRefEvaluateWithDualReferenceINTEL = 5787, + OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL = 5788, + OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL = 5789, + OpSubgroupAvcRefConvertToMceResultINTEL = 5790, + OpSubgroupAvcSicInitializeINTEL = 5791, + OpSubgroupAvcSicConfigureSkcINTEL = 5792, + OpSubgroupAvcSicConfigureIpeLumaINTEL = 5793, + OpSubgroupAvcSicConfigureIpeLumaChromaINTEL = 5794, + OpSubgroupAvcSicGetMotionVectorMaskINTEL = 5795, + OpSubgroupAvcSicConvertToMcePayloadINTEL = 5796, + OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL = 5797, + OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL = 5798, + OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL = 5799, + OpSubgroupAvcSicSetBilinearFilterEnableINTEL = 5800, + OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL = 5801, + OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL = 5802, + OpSubgroupAvcSicEvaluateIpeINTEL = 5803, + OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL = 5804, + OpSubgroupAvcSicEvaluateWithDualReferenceINTEL = 5805, + OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL = 5806, + OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL = 5807, + OpSubgroupAvcSicConvertToMceResultINTEL = 5808, + OpSubgroupAvcSicGetIpeLumaShapeINTEL = 5809, + OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL = 5810, + OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL = 5811, + OpSubgroupAvcSicGetPackedIpeLumaModesINTEL = 5812, + OpSubgroupAvcSicGetIpeChromaModeINTEL = 5813, + OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814, + OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815, + OpSubgroupAvcSicGetInterRawSadsINTEL = 5816, + OpVariableLengthArrayINTEL = 5818, + OpSaveMemoryINTEL = 5819, + OpRestoreMemoryINTEL = 5820, + OpArbitraryFloatSinCosPiALTERA = 5840, + OpArbitraryFloatSinCosPiINTEL = 5840, + OpArbitraryFloatCastALTERA = 5841, + OpArbitraryFloatCastINTEL = 5841, + OpArbitraryFloatCastFromIntALTERA = 5842, + OpArbitraryFloatCastFromIntINTEL = 5842, + OpArbitraryFloatCastToIntALTERA = 5843, + OpArbitraryFloatCastToIntINTEL = 5843, + OpArbitraryFloatAddALTERA = 5846, + OpArbitraryFloatAddINTEL = 5846, + OpArbitraryFloatSubALTERA = 5847, + OpArbitraryFloatSubINTEL = 5847, + OpArbitraryFloatMulALTERA = 5848, + OpArbitraryFloatMulINTEL = 5848, + OpArbitraryFloatDivALTERA = 5849, + OpArbitraryFloatDivINTEL = 5849, + OpArbitraryFloatGTALTERA = 5850, + OpArbitraryFloatGTINTEL = 5850, + OpArbitraryFloatGEALTERA = 5851, + OpArbitraryFloatGEINTEL = 5851, + OpArbitraryFloatLTALTERA = 5852, + OpArbitraryFloatLTINTEL = 5852, + OpArbitraryFloatLEALTERA = 5853, + OpArbitraryFloatLEINTEL = 5853, + OpArbitraryFloatEQALTERA = 5854, + OpArbitraryFloatEQINTEL = 5854, + OpArbitraryFloatRecipALTERA = 5855, + OpArbitraryFloatRecipINTEL = 5855, + OpArbitraryFloatRSqrtALTERA = 5856, + OpArbitraryFloatRSqrtINTEL = 5856, + OpArbitraryFloatCbrtALTERA = 5857, + OpArbitraryFloatCbrtINTEL = 5857, + OpArbitraryFloatHypotALTERA = 5858, + OpArbitraryFloatHypotINTEL = 5858, + OpArbitraryFloatSqrtALTERA = 5859, + OpArbitraryFloatSqrtINTEL = 5859, + OpArbitraryFloatLogINTEL = 5860, + OpArbitraryFloatLog2INTEL = 5861, + OpArbitraryFloatLog10INTEL = 5862, + OpArbitraryFloatLog1pINTEL = 5863, + OpArbitraryFloatExpINTEL = 5864, + OpArbitraryFloatExp2INTEL = 5865, + OpArbitraryFloatExp10INTEL = 5866, + OpArbitraryFloatExpm1INTEL = 5867, + OpArbitraryFloatSinINTEL = 5868, + OpArbitraryFloatCosINTEL = 5869, + OpArbitraryFloatSinCosINTEL = 5870, + OpArbitraryFloatSinPiINTEL = 5871, + OpArbitraryFloatCosPiINTEL = 5872, + OpArbitraryFloatASinINTEL = 5873, + OpArbitraryFloatASinPiINTEL = 5874, + OpArbitraryFloatACosINTEL = 5875, + OpArbitraryFloatACosPiINTEL = 5876, + OpArbitraryFloatATanINTEL = 5877, + OpArbitraryFloatATanPiINTEL = 5878, + OpArbitraryFloatATan2INTEL = 5879, + OpArbitraryFloatPowINTEL = 5880, + OpArbitraryFloatPowRINTEL = 5881, + OpArbitraryFloatPowNINTEL = 5882, + OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, + OpFixedSqrtALTERA = 5923, + OpFixedSqrtINTEL = 5923, + OpFixedRecipALTERA = 5924, + OpFixedRecipINTEL = 5924, + OpFixedRsqrtALTERA = 5925, + OpFixedRsqrtINTEL = 5925, + OpFixedSinALTERA = 5926, + OpFixedSinINTEL = 5926, + OpFixedCosALTERA = 5927, + OpFixedCosINTEL = 5927, + OpFixedSinCosALTERA = 5928, + OpFixedSinCosINTEL = 5928, + OpFixedSinPiALTERA = 5929, + OpFixedSinPiINTEL = 5929, + OpFixedCosPiALTERA = 5930, + OpFixedCosPiINTEL = 5930, + OpFixedSinCosPiALTERA = 5931, + OpFixedSinCosPiINTEL = 5931, + OpFixedLogALTERA = 5932, + OpFixedLogINTEL = 5932, + OpFixedExpALTERA = 5933, + OpFixedExpINTEL = 5933, + OpPtrCastToCrossWorkgroupALTERA = 5934, + OpPtrCastToCrossWorkgroupINTEL = 5934, + OpCrossWorkgroupCastToPtrALTERA = 5938, + OpCrossWorkgroupCastToPtrINTEL = 5938, + OpReadPipeBlockingALTERA = 5946, + OpReadPipeBlockingINTEL = 5946, + OpWritePipeBlockingALTERA = 5947, + OpWritePipeBlockingINTEL = 5947, + OpFPGARegALTERA = 5949, + OpFPGARegINTEL = 5949, + OpRayQueryGetRayTMinKHR = 6016, + OpRayQueryGetRayFlagsKHR = 6017, + OpRayQueryGetIntersectionTKHR = 6018, + OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019, + OpRayQueryGetIntersectionInstanceIdKHR = 6020, + OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021, + OpRayQueryGetIntersectionGeometryIndexKHR = 6022, + OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023, + OpRayQueryGetIntersectionBarycentricsKHR = 6024, + OpRayQueryGetIntersectionFrontFaceKHR = 6025, + OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026, + OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027, + OpRayQueryGetIntersectionObjectRayOriginKHR = 6028, + OpRayQueryGetWorldRayDirectionKHR = 6029, + OpRayQueryGetWorldRayOriginKHR = 6030, + OpRayQueryGetIntersectionObjectToWorldKHR = 6031, + OpRayQueryGetIntersectionWorldToObjectKHR = 6032, + OpAtomicFAddEXT = 6035, + OpTypeBufferSurfaceINTEL = 6086, + OpTypeStructContinuedINTEL = 6090, + OpConstantCompositeContinuedINTEL = 6091, + OpSpecConstantCompositeContinuedINTEL = 6092, + OpCompositeConstructContinuedINTEL = 6096, + OpConvertFToBF16INTEL = 6116, + OpConvertBF16ToFINTEL = 6117, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpArithmeticFenceEXT = 6145, + OpTaskSequenceCreateALTERA = 6163, + OpTaskSequenceCreateINTEL = 6163, + OpTaskSequenceAsyncALTERA = 6164, + OpTaskSequenceAsyncINTEL = 6164, + OpTaskSequenceGetALTERA = 6165, + OpTaskSequenceGetINTEL = 6165, + OpTaskSequenceReleaseALTERA = 6166, + OpTaskSequenceReleaseINTEL = 6166, + OpTypeTaskSequenceALTERA = 6199, + OpTypeTaskSequenceINTEL = 6199, + OpSubgroupBlockPrefetchINTEL = 6221, + OpSubgroup2DBlockLoadINTEL = 6231, + OpSubgroup2DBlockLoadTransformINTEL = 6232, + OpSubgroup2DBlockLoadTransposeINTEL = 6233, + OpSubgroup2DBlockPrefetchINTEL = 6234, + OpSubgroup2DBlockStoreINTEL = 6235, + OpSubgroupMatrixMultiplyAccumulateINTEL = 6237, + OpBitwiseFunctionINTEL = 6242, + OpUntypedVariableLengthArrayINTEL = 6244, + OpConditionalExtensionINTEL = 6248, + OpConditionalEntryPointINTEL = 6249, + OpConditionalCapabilityINTEL = 6250, + OpSpecConstantTargetINTEL = 6251, + OpSpecConstantArchitectureINTEL = 6252, + OpSpecConstantCapabilitiesINTEL = 6253, + OpConditionalCopyObjectINTEL = 6254, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, + OpRoundFToTF32INTEL = 6426, + OpMaskedGatherINTEL = 6428, + OpMaskedScatterINTEL = 6429, + OpConvertHandleToImageINTEL = 6529, + OpConvertHandleToSamplerINTEL = 6530, + OpConvertHandleToSampledImageINTEL = 6531, + OpFDot2MixAcc32VALVE = 6916, + OpFDot2MixAcc16VALVE = 6917, + OpFDot4MixAcc32VALVE = 6918, + OpMax = 0x7fffffff, +} + + + + + + + + + /* unknown opcode */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/* SPV_ENABLE_UTILITY_CODE */ + + diff --git a/src/SpirVCross.bf b/src/SpirVCross.bf new file mode 100644 index 0000000..49e0bac --- /dev/null +++ b/src/SpirVCross.bf @@ -0,0 +1,1101 @@ +// This file was generated by Cpp2Beef + +using System; +using System.Interop; + +namespace SpirVCross; + +static +{ +/* + * Copyright 2019-2021 Hans-Kristian Arntzen + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * At your option, you may choose to accept this material under either: + * 1. The Apache License, Version 2.0, found at , or + * 2. The MIT License, found at . + */ + + + + + + + +/* + * C89-compatible wrapper for SPIRV-Cross' API. + * Documentation here is sparse unless the behavior does not map 1:1 with C++ API. + * It is recommended to look at the canonical C++ API for more detailed information. + */ + + + + + +/* Bumped if ABI or API breaks backwards compatibility. */ +public const let SPVC_C_API_VERSION_MAJOR = 0; +/* Bumped if APIs or enumerations are added in a backwards compatible way. */ +public const let SPVC_C_API_VERSION_MINOR = 68; +/* Bumped if internal implementation details change. */ +public const let SPVC_C_API_VERSION_PATCH = 0; + + + +/* Exports symbols. Standard C calling convention is used. */ + + + + + + + + + + + + +/* + * Gets the SPVC_C_API_VERSION_* used to build this library. + * Can be used to check for ABI mismatch if so-versioning did not catch it. + */ +[CLink] public static extern void spvc_get_version(c_uint* major, c_uint* minor, c_uint* patch); + +/* Gets a human readable version string to identify which commit a particular binary was created from. */ +[CLink] public static extern c_char* spvc_get_commit_revision_and_timestamp(); +} + +/* These types are opaque to the user. */ +public struct SpvcContext : int {} +public struct SpvcParsedIr : int {} +public struct SpvcCompiler : int {} +public struct SpvcCompilerOptions : int {} +public struct SpvcResources : int {} + +public struct SpvcType : int {} +public struct SpvcConstant : int {} + +public struct SpvcSet : int {} + +/* + * Shallow typedefs. All SPIR-V IDs are plain 32-bit numbers, but this helps communicate which data is used. + * Maps to a SPIRType. + */ +public typealias SpvcTypeId = SpvId; +/* Maps to a SPIRVariable. */ +public typealias SpvcVariableId = SpvId; +/* Maps to a SPIRConstant. */ +public typealias SpvcConstantId = SpvId; + +/* See C++ API. */ +[CRepr] public struct SpvcReflectedResource +{ + public SpvcVariableId id; + public SpvcTypeId base_type_id; + public SpvcTypeId type_id; + public c_char* name; +} + +[CRepr] public struct SpvcReflectedBuiltinResource +{ + public SpvBuiltIn builtin; + public SpvcTypeId value_type_id; + public SpvcReflectedResource resource; +} + +/* See C++ API. */ +[CRepr] public struct SpvcEntryPoint +{ + public SpvExecutionModel execution_model; + public c_char* name; +} + +/* See C++ API. */ +[CRepr] public struct SpvcCombinedImageSampler +{ + public SpvcVariableId combined_id; + public SpvcVariableId image_id; + public SpvcVariableId sampler_id; +} + +/* See C++ API. */ +[CRepr] public struct SpvcSpecializationConstant +{ + public SpvcConstantId id; + public c_uint constant_id; +} + +/* See C++ API. */ +[CRepr] public struct SpvcBufferRange +{ + public c_uint index; + public c_size offset; + public c_size range; +} + +/* See C++ API. */ +[CRepr] public struct SpvcHlslRootConstants +{ + public c_uint start; + public c_uint end; + public c_uint binding; + public c_uint space; +} + +/* See C++ API. */ +[CRepr] public struct SpvcHlslVertexAttributeRemap +{ + public c_uint location; + public c_char* semantic; +} + +static +{ +/* + * Be compatible with non-C99 compilers, which do not have stdbool. + * Only recent MSVC compilers supports this for example, and ideally SPIRV-Cross should be linkable + * from a wide range of compilers in its C wrapper. + */ + +public const let SPVC_TRUE = ((SpvcBool)1); +public const let SPVC_FALSE = ((SpvcBool)0); +} + + + +[AllowDuplicates] public enum SpvcResult : c_int +{ + /* Success. */ + SPVC_SUCCESS = 0, + + /* The SPIR-V is invalid. Should have been caught by validation ideally. */ + SPVC_ERROR_INVALID_SPIRV = -1, + + /* The SPIR-V might be valid or invalid, but SPIRV-Cross currently cannot correctly translate this to your target language. */ + SPVC_ERROR_UNSUPPORTED_SPIRV = -2, + + /* If for some reason we hit this, new or malloc failed. */ + SPVC_ERROR_OUT_OF_MEMORY = -3, + + /* Invalid API argument. */ + SPVC_ERROR_INVALID_ARGUMENT = -4, + + //SPVC_ERROR_INT_MAX = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvcCaptureMode : c_int +{ + /* The Parsed IR payload will be copied, and the handle can be reused to create other compiler instances. */ + Copy = 0, + + /* + * The payload will now be owned by the compiler. + * parsed_ir should now be considered a dead blob and must not be used further. + * This is optimal for performance and should be the go-to option. + */ + TakeOwnership = 1, + + //IntMax = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvcBackend : c_int +{ + /* This backend can only perform reflection, no compiler options are supported. Maps to spirv_cross::Compiler. */ + None = 0, + Glsl = 1, /* spirv_cross::CompilerGLSL */ + Hlsl = 2, /* CompilerHLSL */ + Msl = 3, /* CompilerMSL */ + Cpp = 4, /* CompilerCPP */ + Json = 5, /* CompilerReflection w/ JSON backend */ + //IntMax = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcResourceType : c_int +{ + Unknown = 0, + UniformBuffer = 1, + StorageBuffer = 2, + StageInput = 3, + StageOutput = 4, + SubpassInput = 5, + StorageImage = 6, + SampledImage = 7, + AtomicCounter = 8, + PushConstant = 9, + SeparateImage = 10, + SeparateSamplers = 11, + AccelerationStructure = 12, + RayQuery = 13, + ShaderRecordBuffer = 14, + GlPlainUniform = 15, + Tensor = 16, + //IntMax = 0x7fffffff, +} + +[AllowDuplicates] public enum SpvcBuiltinResourceType : c_int +{ + Unknown = 0, + StageInput = 1, + StageOutput = 2, + //IntMax = 0x7fffffff, +} + +/* Maps to spirv_cross::SPIRType::BaseType. */ +[AllowDuplicates] public enum SpvcBasetype : c_int +{ + Unknown = 0, + Void = 1, + Boolean = 2, + Int8 = 3, + Uint8 = 4, + Int16 = 5, + Uint16 = 6, + Int32 = 7, + Uint32 = 8, + Int64 = 9, + Uint64 = 10, + AtomicCounter = 11, + Fp16 = 12, + Fp32 = 13, + Fp64 = 14, + Struct = 15, + Image = 16, + SampledImage = 17, + Sampler = 18, + AccelerationStructure = 19, + + //IntMax = 0x7fffffff, +} + +static +{ +public const let SPVC_COMPILER_OPTION_COMMON_BIT = 0x01000000; +public const let SPVC_COMPILER_OPTION_GLSL_BIT = 0x02000000; +public const let SPVC_COMPILER_OPTION_HLSL_BIT = 0x04000000; +public const let SPVC_COMPILER_OPTION_MSL_BIT = 0x08000000; +public const let SPVC_COMPILER_OPTION_LANG_BITS = 0x0f000000; +public const let SPVC_COMPILER_OPTION_ENUM_BITS = 0xffffff; + + +} + + + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslPlatform : c_int +{ + Ios = 0, + Macos = 1, + //MaxInt = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslIndexType : c_int +{ + None = 0, + Uint16 = 1, + Uint32 = 2, + //MaxInt = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslShaderVariableFormat : c_int +{ + Other = 0, + Uint8 = 1, + Uint16 = 2, + Any16 = 3, + Any32 = 4, + + /* Deprecated names. */ + SPVC_MSL_VERTEX_FORMAT_OTHER = Other, + SPVC_MSL_VERTEX_FORMAT_UINT8 = Uint8, + SPVC_MSL_VERTEX_FORMAT_UINT16 = Uint16, + SPVC_MSL_SHADER_INPUT_FORMAT_OTHER = Other, + SPVC_MSL_SHADER_INPUT_FORMAT_UINT8 = Uint8, + SPVC_MSL_SHADER_INPUT_FORMAT_UINT16 = Uint16, + SPVC_MSL_SHADER_INPUT_FORMAT_ANY16 = Any16, + SPVC_MSL_SHADER_INPUT_FORMAT_ANY32 = Any32, + + + //SPVC_MSL_SHADER_INPUT_FORMAT_INT_MAX = 0x7fffffff, +} public typealias SpvcMslShaderInputFormat = SpvcMslShaderVariableFormat; public typealias SpvcMslVertexFormat = SpvcMslShaderVariableFormat; + +/* Maps to C++ API. Deprecated; use spvc_msl_shader_interface_var. */ +[CRepr] public struct SpvcMslVertexAttribute +{ + public c_uint location; + + /* Obsolete, do not use. Only lingers on for ABI compatibility. */ + public c_uint msl_buffer; + /* Obsolete, do not use. Only lingers on for ABI compatibility. */ + public c_uint msl_offset; + /* Obsolete, do not use. Only lingers on for ABI compatibility. */ + public c_uint msl_stride; + /* Obsolete, do not use. Only lingers on for ABI compatibility. */ + public SpvcBool per_instance; + + public SpvcMslVertexFormat format; + public SpvBuiltIn builtin; +} + +static +{ +/* + * Initializes the vertex attribute struct. + */ +[CLink] public static extern void spvc_msl_vertex_attribute_init(SpvcMslVertexAttribute* attr); +} + +/* Maps to C++ API. Deprecated; use spvc_msl_shader_interface_var_2. */ +[CRepr] public struct SpvcMslShaderInterfaceVar +{ + public c_uint location; + public SpvcMslVertexFormat format; + public SpvBuiltIn builtin; + public c_uint vecsize; +} public typealias SpvcMslShaderInput = SpvcMslShaderInterfaceVar; + +static +{ +/* + * Initializes the shader input struct. + * Deprecated. Use spvc_msl_shader_interface_var_init_2(). + */ +[CLink] public static extern void spvc_msl_shader_interface_var_init(SpvcMslShaderInterfaceVar* @var); +/* + * Deprecated. Use spvc_msl_shader_interface_var_init_2(). + */ +[CLink] public static extern void spvc_msl_shader_input_init(SpvcMslShaderInput* input); +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslShaderVariableRate : c_int +{ + PerVertex = 0, + PerPrimitive = 1, + PerPatch = 2, + + //IntMax = 0x7fffffff, +} + +/* Maps to C++ API. */ +[CRepr] public struct SpvcMslShaderInterfaceVar2 +{ + public c_uint location; + public SpvcMslShaderVariableFormat format; + public SpvBuiltIn builtin; + public c_uint vecsize; + public SpvcMslShaderVariableRate rate; +} + +static +{ +/* + * Initializes the shader interface variable struct. + */ +[CLink] public static extern void spvc_msl_shader_interface_var_init_2(SpvcMslShaderInterfaceVar2* @var); +} + +/* Maps to C++ API. + * Deprecated. Use spvc_msl_resource_binding_2. */ +[CRepr] public struct SpvcMslResourceBinding +{ + public SpvExecutionModel stage; + public c_uint desc_set; + public c_uint binding; + public c_uint msl_buffer; + public c_uint msl_texture; + public c_uint msl_sampler; +} + +[CRepr] public struct SpvcMslResourceBinding2 +{ + public SpvExecutionModel stage; + public c_uint desc_set; + public c_uint binding; + public c_uint count; + public c_uint msl_buffer; + public c_uint msl_texture; + public c_uint msl_sampler; +} + +static +{ +/* + * Initializes the resource binding struct. + * The defaults are non-zero. + * Deprecated: Use spvc_msl_resource_binding_init_2. + */ +[CLink] public static extern void spvc_msl_resource_binding_init(SpvcMslResourceBinding* binding); +[CLink] public static extern void spvc_msl_resource_binding_init_2(SpvcMslResourceBinding2* binding); + +public const let SPVC_MSL_PUSH_CONSTANT_DESC_SET = (~(0u)); +public const let SPVC_MSL_PUSH_CONSTANT_BINDING = (0); +public const let SPVC_MSL_SWIZZLE_BUFFER_BINDING = (~(1u)); +public const let SPVC_MSL_BUFFER_SIZE_BUFFER_BINDING = (~(2u)); +public const let SPVC_MSL_ARGUMENT_BUFFER_BINDING = (~(3u)); + +/* Obsolete. Sticks around for backwards compatibility. */ +public const let SPVC_MSL_AUX_BUFFER_STRUCT_VERSION = 1; + +/* Runtime check for incompatibility. Obsolete. */ +[CLink] public static extern c_uint spvc_msl_get_aux_buffer_struct_version(); +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslSamplerCoord : c_int +{ + Normalized = 0, + Pixel = 1, + //SPVC_MSL_SAMPLER_INT_MAX = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslSamplerFilter : c_int +{ + Nearest = 0, + Linear = 1, + //IntMax = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslSamplerMipFilter : c_int +{ + None = 0, + Nearest = 1, + Linear = 2, + //IntMax = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslSamplerAddress : c_int +{ + ClampToZero = 0, + ClampToEdge = 1, + ClampToBorder = 2, + Repeat = 3, + MirroredRepeat = 4, + //IntMax = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslSamplerCompareFunc : c_int +{ + Never = 0, + Less = 1, + LessEqual = 2, + Greater = 3, + GreaterEqual = 4, + Equal = 5, + NotEqual = 6, + Always = 7, + //IntMax = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslSamplerBorderColor : c_int +{ + TransparentBlack = 0, + OpaqueBlack = 1, + OpaqueWhite = 2, + //IntMax = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslFormatResolution : c_int +{ + _444 = 0, + _422, + _420, + //IntMax = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslChromaLocation : c_int +{ + CositedEven = 0, + Midpoint, + //IntMax = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslComponentSwizzle : c_int +{ + Identity = 0, + Zero, + One, + R, + G, + B, + A, + //IntMax = 0x7fffffff, +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcMslSamplerYcbcrModelConversion : c_int +{ + RgbIdentity = 0, + YcbcrIdentity, + YcbcrBt709, + YcbcrBt601, + YcbcrBt2020, + //IntMax = 0x7fffffff, +} + +/* Maps to C+ API. */ +[AllowDuplicates] public enum SpvcMslSamplerYcbcrRange : c_int +{ + ItuFull = 0, + ItuNarrow, + //IntMax = 0x7fffffff, +} + +/* Maps to C++ API. */ +[CRepr] public struct SpvcMslConstexprSampler +{ + public SpvcMslSamplerCoord coord; + public SpvcMslSamplerFilter min_filter; + public SpvcMslSamplerFilter mag_filter; + public SpvcMslSamplerMipFilter mip_filter; + public SpvcMslSamplerAddress s_address; + public SpvcMslSamplerAddress t_address; + public SpvcMslSamplerAddress r_address; + public SpvcMslSamplerCompareFunc compare_func; + public SpvcMslSamplerBorderColor border_color; + public float lod_clamp_min; + public float lod_clamp_max; + public c_int max_anisotropy; + + public SpvcBool compare_enable; + public SpvcBool lod_clamp_enable; + public SpvcBool anisotropy_enable; +} + +static +{ +/* + * Initializes the constexpr sampler struct. + * The defaults are non-zero. + */ +[CLink] public static extern void spvc_msl_constexpr_sampler_init(SpvcMslConstexprSampler* sampler); +} + +/* Maps to the sampler Y'CbCr conversion-related portions of MSLConstexprSampler. See C++ API for defaults and details. */ +[CRepr] public struct SpvcMslSamplerYcbcrConversion +{ + public c_uint planes; + public SpvcMslFormatResolution resolution; + public SpvcMslSamplerFilter chroma_filter; + public SpvcMslChromaLocation x_chroma_offset; + public SpvcMslChromaLocation y_chroma_offset; + public SpvcMslComponentSwizzle[4] swizzle; + public SpvcMslSamplerYcbcrModelConversion ycbcr_model; + public SpvcMslSamplerYcbcrRange ycbcr_range; + public c_uint bpc; +} + +static +{ +/* + * Initializes the constexpr sampler struct. + * The defaults are non-zero. + */ +[CLink] public static extern void spvc_msl_sampler_ycbcr_conversion_init(SpvcMslSamplerYcbcrConversion* conv); +} + +/* Maps to C++ API. */ +[AllowDuplicates] public enum SpvcHlslBindingFlagBits : c_int +{ + AutoNone = 0, + AutoPushConstant = 1 << 0, + AutoCbv = 1 << 1, + AutoSrv = 1 << 2, + AutoUav = 1 << 3, + AutoSampler = 1 << 4, + AutoAll = 0x7fffffff, +} +public typealias SpvcHlslBindingFlags = SpvcHlslBindingFlagBits; + +static +{ +public const let SPVC_HLSL_PUSH_CONSTANT_DESC_SET = (~(0u)); +public const let SPVC_HLSL_PUSH_CONSTANT_BINDING = (0); +} + + + +/* Maps to C++ API. */ +[CRepr] public struct SpvcHlslResourceBindingMapping +{ + public c_uint register_space; + public c_uint register_binding; +} + +[CRepr] public struct SpvcHlslResourceBinding +{ + public SpvExecutionModel stage; + public c_uint desc_set; + public c_uint binding; + + public SpvcHlslResourceBindingMapping cbv; public SpvcHlslResourceBindingMapping uav; public SpvcHlslResourceBindingMapping srv; public SpvcHlslResourceBindingMapping sampler; +} + +static +{ +/* + * Initializes the resource binding struct. + * The defaults are non-zero. + */ +[CLink] public static extern void spvc_hlsl_resource_binding_init(SpvcHlslResourceBinding* binding); +} + +/* Maps to the various spirv_cross::Compiler*::Option structures. See C++ API for defaults and details. */ +[AllowDuplicates] public enum SpvcCompilerOption : c_int +{ + Unknown = 0, + + ForceTemporary = 1 | SPVC_COMPILER_OPTION_COMMON_BIT, + FlattenMultidimensionalArrays = 2 | SPVC_COMPILER_OPTION_COMMON_BIT, + FixupDepthConvention = 3 | SPVC_COMPILER_OPTION_COMMON_BIT, + FlipVertexY = 4 | SPVC_COMPILER_OPTION_COMMON_BIT, + + GlslSupportNonzeroBaseInstance = 5 | SPVC_COMPILER_OPTION_GLSL_BIT, + GlslSeparateShaderObjects = 6 | SPVC_COMPILER_OPTION_GLSL_BIT, + GlslEnable420packExtension = 7 | SPVC_COMPILER_OPTION_GLSL_BIT, + GlslVersion = 8 | SPVC_COMPILER_OPTION_GLSL_BIT, + GlslEs = 9 | SPVC_COMPILER_OPTION_GLSL_BIT, + GlslVulkanSemantics = 10 | SPVC_COMPILER_OPTION_GLSL_BIT, + GlslEsDefaultFloatPrecisionHighp = 11 | SPVC_COMPILER_OPTION_GLSL_BIT, + GlslEsDefaultIntPrecisionHighp = 12 | SPVC_COMPILER_OPTION_GLSL_BIT, + + HlslShaderModel = 13 | SPVC_COMPILER_OPTION_HLSL_BIT, + HlslPointSizeCompat = 14 | SPVC_COMPILER_OPTION_HLSL_BIT, + HlslPointCoordCompat = 15 | SPVC_COMPILER_OPTION_HLSL_BIT, + HlslSupportNonzeroBaseVertexBaseInstance = 16 | SPVC_COMPILER_OPTION_HLSL_BIT, + + MslVersion = 17 | SPVC_COMPILER_OPTION_MSL_BIT, + MslTexelBufferTextureWidth = 18 | SPVC_COMPILER_OPTION_MSL_BIT, + + /* Obsolete, use SWIZZLE_BUFFER_INDEX instead. */ + MslAuxBufferIndex = 19 | SPVC_COMPILER_OPTION_MSL_BIT, + MslSwizzleBufferIndex = 19 | SPVC_COMPILER_OPTION_MSL_BIT, + + MslIndirectParamsBufferIndex = 20 | SPVC_COMPILER_OPTION_MSL_BIT, + MslShaderOutputBufferIndex = 21 | SPVC_COMPILER_OPTION_MSL_BIT, + MslShaderPatchOutputBufferIndex = 22 | SPVC_COMPILER_OPTION_MSL_BIT, + MslShaderTessFactorOutputBufferIndex = 23 | SPVC_COMPILER_OPTION_MSL_BIT, + MslShaderInputWorkgroupIndex = 24 | SPVC_COMPILER_OPTION_MSL_BIT, + MslEnablePointSizeBuiltin = 25 | SPVC_COMPILER_OPTION_MSL_BIT, + MslDisableRasterization = 26 | SPVC_COMPILER_OPTION_MSL_BIT, + MslCaptureOutputToBuffer = 27 | SPVC_COMPILER_OPTION_MSL_BIT, + MslSwizzleTextureSamples = 28 | SPVC_COMPILER_OPTION_MSL_BIT, + MslPadFragmentOutputComponents = 29 | SPVC_COMPILER_OPTION_MSL_BIT, + MslTessDomainOriginLowerLeft = 30 | SPVC_COMPILER_OPTION_MSL_BIT, + MslPlatform = 31 | SPVC_COMPILER_OPTION_MSL_BIT, + MslArgumentBuffers = 32 | SPVC_COMPILER_OPTION_MSL_BIT, + + GlslEmitPushConstantAsUniformBuffer = 33 | SPVC_COMPILER_OPTION_GLSL_BIT, + + MslTextureBufferNative = 34 | SPVC_COMPILER_OPTION_MSL_BIT, + + GlslEmitUniformBufferAsPlainUniforms = 35 | SPVC_COMPILER_OPTION_GLSL_BIT, + + MslBufferSizeBufferIndex = 36 | SPVC_COMPILER_OPTION_MSL_BIT, + + EmitLineDirectives = 37 | SPVC_COMPILER_OPTION_COMMON_BIT, + + MslMultiview = 38 | SPVC_COMPILER_OPTION_MSL_BIT, + MslViewMaskBufferIndex = 39 | SPVC_COMPILER_OPTION_MSL_BIT, + MslDeviceIndex = 40 | SPVC_COMPILER_OPTION_MSL_BIT, + MslViewIndexFromDeviceIndex = 41 | SPVC_COMPILER_OPTION_MSL_BIT, + MslDispatchBase = 42 | SPVC_COMPILER_OPTION_MSL_BIT, + MslDynamicOffsetsBufferIndex = 43 | SPVC_COMPILER_OPTION_MSL_BIT, + MslTexture1dAs2d = 44 | SPVC_COMPILER_OPTION_MSL_BIT, + MslEnableBaseIndexZero = 45 | SPVC_COMPILER_OPTION_MSL_BIT, + + /* Obsolete. Use MSL_FRAMEBUFFER_FETCH_SUBPASS instead. */ + MslIosFramebufferFetchSubpass = 46 | SPVC_COMPILER_OPTION_MSL_BIT, + MslFramebufferFetchSubpass = 46 | SPVC_COMPILER_OPTION_MSL_BIT, + + MslInvariantFpMath = 47 | SPVC_COMPILER_OPTION_MSL_BIT, + MslEmulateCubemapArray = 48 | SPVC_COMPILER_OPTION_MSL_BIT, + MslEnableDecorationBinding = 49 | SPVC_COMPILER_OPTION_MSL_BIT, + MslForceActiveArgumentBufferResources = 50 | SPVC_COMPILER_OPTION_MSL_BIT, + MslForceNativeArrays = 51 | SPVC_COMPILER_OPTION_MSL_BIT, + + EnableStorageImageQualifierDeduction = 52 | SPVC_COMPILER_OPTION_COMMON_BIT, + + HlslForceStorageBufferAsUav = 53 | SPVC_COMPILER_OPTION_HLSL_BIT, + + ForceZeroInitializedVariables = 54 | SPVC_COMPILER_OPTION_COMMON_BIT, + + HlslNonwritableUavTextureAsSrv = 55 | SPVC_COMPILER_OPTION_HLSL_BIT, + + MslEnableFragOutputMask = 56 | SPVC_COMPILER_OPTION_MSL_BIT, + MslEnableFragDepthBuiltin = 57 | SPVC_COMPILER_OPTION_MSL_BIT, + MslEnableFragStencilRefBuiltin = 58 | SPVC_COMPILER_OPTION_MSL_BIT, + MslEnableClipDistanceUserVarying = 59 | SPVC_COMPILER_OPTION_MSL_BIT, + + HlslEnable16bitTypes = 60 | SPVC_COMPILER_OPTION_HLSL_BIT, + + MslMultiPatchWorkgroup = 61 | SPVC_COMPILER_OPTION_MSL_BIT, + MslShaderInputBufferIndex = 62 | SPVC_COMPILER_OPTION_MSL_BIT, + MslShaderIndexBufferIndex = 63 | SPVC_COMPILER_OPTION_MSL_BIT, + MslVertexForTessellation = 64 | SPVC_COMPILER_OPTION_MSL_BIT, + MslVertexIndexType = 65 | SPVC_COMPILER_OPTION_MSL_BIT, + + GlslForceFlattenedIoBlocks = 66 | SPVC_COMPILER_OPTION_GLSL_BIT, + + MslMultiviewLayeredRendering = 67 | SPVC_COMPILER_OPTION_MSL_BIT, + MslArrayedSubpassInput = 68 | SPVC_COMPILER_OPTION_MSL_BIT, + MslR32uiLinearTextureAlignment = 69 | SPVC_COMPILER_OPTION_MSL_BIT, + MslR32uiAlignmentConstantId = 70 | SPVC_COMPILER_OPTION_MSL_BIT, + + HlslFlattenMatrixVertexInputSemantics = 71 | SPVC_COMPILER_OPTION_HLSL_BIT, + + MslIosUseSimdgroupFunctions = 72 | SPVC_COMPILER_OPTION_MSL_BIT, + MslEmulateSubgroups = 73 | SPVC_COMPILER_OPTION_MSL_BIT, + MslFixedSubgroupSize = 74 | SPVC_COMPILER_OPTION_MSL_BIT, + MslForceSampleRateShading = 75 | SPVC_COMPILER_OPTION_MSL_BIT, + MslIosSupportBaseVertexInstance = 76 | SPVC_COMPILER_OPTION_MSL_BIT, + + GlslOvrMultiviewViewCount = 77 | SPVC_COMPILER_OPTION_GLSL_BIT, + + RelaxNanChecks = 78 | SPVC_COMPILER_OPTION_COMMON_BIT, + + MslRawBufferTeseInput = 79 | SPVC_COMPILER_OPTION_MSL_BIT, + MslShaderPatchInputBufferIndex = 80 | SPVC_COMPILER_OPTION_MSL_BIT, + MslManualHelperInvocationUpdates = 81 | SPVC_COMPILER_OPTION_MSL_BIT, + MslCheckDiscardedFragStores = 82 | SPVC_COMPILER_OPTION_MSL_BIT, + + GlslEnableRowMajorLoadWorkaround = 83 | SPVC_COMPILER_OPTION_GLSL_BIT, + + MslArgumentBuffersTier = 84 | SPVC_COMPILER_OPTION_MSL_BIT, + MslSampleDrefLodArrayAsGrad = 85 | SPVC_COMPILER_OPTION_MSL_BIT, + MslReadwriteTextureFences = 86 | SPVC_COMPILER_OPTION_MSL_BIT, + MslReplaceRecursiveInputs = 87 | SPVC_COMPILER_OPTION_MSL_BIT, + MslAgxManualCubeGradFixup = 88 | SPVC_COMPILER_OPTION_MSL_BIT, + MslForceFragmentWithSideEffectsExecution = 89 | SPVC_COMPILER_OPTION_MSL_BIT, + + HlslUseEntryPointName = 90 | SPVC_COMPILER_OPTION_HLSL_BIT, + HlslPreserveStructuredBuffers = 91 | SPVC_COMPILER_OPTION_HLSL_BIT, + + MslAutoDisableRasterization = 92 | SPVC_COMPILER_OPTION_MSL_BIT, + + MslEnablePointSizeDefault = 93 | SPVC_COMPILER_OPTION_MSL_BIT, + + HlslUserSemantic = 94 | SPVC_COMPILER_OPTION_HLSL_BIT, + + //IntMax = 0x7fffffff, +} + +static +{ +/* + * Context is the highest-level API construct. + * The context owns all memory allocations made by its child object hierarchy, including various non-opaque structs and strings. + * This means that the API user only has to care about one "destroy" call ever when using the C API. + * All pointers handed out by the APIs are only valid as long as the context + * is alive and spvc_context_release_allocations has not been called. + */ +[CLink] public static extern SpvcResult spvc_context_create(out SpvcContext context); + +/* Frees all memory allocations and objects associated with the context and its child objects. */ +[LinkName("spvc_context_destroy")] public static extern void Destroy(this SpvcContext context); + +/* Frees all memory allocations and objects associated with the context and its child objects, but keeps the context alive. */ +[LinkName("spvc_context_release_allocations")] public static extern void ReleaseAllocations(this SpvcContext context); + +/* Get the string for the last error which was logged. */ +[LinkName("spvc_context_get_last_error_string")] public static extern c_char* GetLastErrorString(this SpvcContext context); +} + +/* Get notified in a callback when an error triggers. Useful for debugging. */ +public function void SpvcErrorCallback(void* userdata, c_char* error); +static +{ +[LinkName("spvc_context_set_error_callback")] public static extern void SetErrorCallback(this SpvcContext context, SpvcErrorCallback cb, void* userdata); + +/* SPIR-V parsing interface. Maps to Parser which then creates a ParsedIR, and that IR is extracted into the handle. */ +[LinkName("spvc_context_parse_spirv")] public static extern SpvcResult ParseSpirv(this SpvcContext context, SpvId* spirv, c_size word_count, out SpvcParsedIr parsed_ir); + +/* + * Create a compiler backend. Capture mode controls if we construct by copy or move semantics. + * It is always recommended to use SPVC_CAPTURE_MODE_TAKE_OWNERSHIP if you only intend to cross-compile the IR once. + */ +[LinkName("spvc_context_create_compiler")] public static extern SpvcResult CreateCompiler(this SpvcContext context, SpvcBackend backend, SpvcParsedIr parsed_ir, SpvcCaptureMode mode, out SpvcCompiler compiler); + +/* Maps directly to C++ API. */ +[LinkName("spvc_compiler_get_current_id_bound")] public static extern c_uint GetCurrentIdBound(this SpvcCompiler compiler); + +/* Create compiler options, which will initialize defaults. */ +[LinkName("spvc_compiler_create_compiler_options")] public static extern SpvcResult CreateCompilerOptions(this SpvcCompiler compiler, out SpvcCompilerOptions options); +/* Override options. Will return error if e.g. MSL options are used for the HLSL backend, etc. */ +[LinkName("spvc_compiler_options_set_bool")] public static extern SpvcResult SetBool(this SpvcCompilerOptions options, SpvcCompilerOption option, SpvcBool value); +[LinkName("spvc_compiler_options_set_uint")] public static extern SpvcResult SetUint(this SpvcCompilerOptions options, SpvcCompilerOption option, c_uint value); +/* Set compiler options. */ +[LinkName("spvc_compiler_install_compiler_options")] public static extern SpvcResult InstallCompilerOptions(this SpvcCompiler compiler, SpvcCompilerOptions options); + +/* Compile IR into a string. *source is owned by the context, and caller must not free it themselves. */ +[LinkName("spvc_compiler_compile")] public static extern SpvcResult Compile(this SpvcCompiler compiler, c_char** source); + +/* Maps to C++ API. */ +[LinkName("spvc_compiler_add_header_line")] public static extern SpvcResult AddHeaderLine(this SpvcCompiler compiler, c_char* line); +[LinkName("spvc_compiler_require_extension")] public static extern SpvcResult RequireExtension(this SpvcCompiler compiler, c_char* ext); +[LinkName("spvc_compiler_get_num_required_extensions")] public static extern c_size GetNumRequiredExtensions(this SpvcCompiler compiler); +[LinkName("spvc_compiler_get_required_extension")] public static extern c_char* GetRequiredExtension(this SpvcCompiler compiler, c_size index); +[LinkName("spvc_compiler_flatten_buffer_block")] public static extern SpvcResult FlattenBufferBlock(this SpvcCompiler compiler, SpvcVariableId id); + +[LinkName("spvc_compiler_variable_is_depth_or_compare")] public static extern SpvcBool VariableIsDepthOrCompare(this SpvcCompiler compiler, SpvcVariableId id); + +[LinkName("spvc_compiler_mask_stage_output_by_location")] public static extern SpvcResult MaskStageOutputByLocation(this SpvcCompiler compiler, c_uint location, c_uint component); +[LinkName("spvc_compiler_mask_stage_output_by_builtin")] public static extern SpvcResult MaskStageOutputByBuiltin(this SpvcCompiler compiler, SpvBuiltIn builtin); + +/* + * HLSL specifics. + * Maps to C++ API. + */ +[LinkName("spvc_compiler_hlsl_set_root_constants_layout")] public static extern SpvcResult HlslSetRootConstantsLayout(this SpvcCompiler compiler, SpvcHlslRootConstants* constant_info, c_size count); +[LinkName("spvc_compiler_hlsl_add_vertex_attribute_remap")] public static extern SpvcResult HlslAddVertexAttributeRemap(this SpvcCompiler compiler, SpvcHlslVertexAttributeRemap* remap, c_size remaps); +[LinkName("spvc_compiler_hlsl_remap_num_workgroups_builtin")] public static extern SpvcVariableId HlslRemapNumWorkgroupsBuiltin(this SpvcCompiler compiler); + +[LinkName("spvc_compiler_hlsl_set_resource_binding_flags")] public static extern SpvcResult HlslSetResourceBindingFlags(this SpvcCompiler compiler, SpvcHlslBindingFlags flags); + +[LinkName("spvc_compiler_hlsl_add_resource_binding")] public static extern SpvcResult HlslAddResourceBinding(this SpvcCompiler compiler, SpvcHlslResourceBinding* binding); +[LinkName("spvc_compiler_hlsl_is_resource_used")] public static extern SpvcBool HlslIsResourceUsed(this SpvcCompiler compiler, SpvExecutionModel model, c_uint set, c_uint binding); + +/* + * MSL specifics. + * Maps to C++ API. + */ +[LinkName("spvc_compiler_msl_is_rasterization_disabled")] public static extern SpvcBool MslIsRasterizationDisabled(this SpvcCompiler compiler); + +/* Obsolete. Renamed to needs_swizzle_buffer. */ +[LinkName("spvc_compiler_msl_needs_aux_buffer")] public static extern SpvcBool MslNeedsAuxBuffer(this SpvcCompiler compiler); +[LinkName("spvc_compiler_msl_needs_swizzle_buffer")] public static extern SpvcBool MslNeedsSwizzleBuffer(this SpvcCompiler compiler); +[LinkName("spvc_compiler_msl_needs_buffer_size_buffer")] public static extern SpvcBool MslNeedsBufferSizeBuffer(this SpvcCompiler compiler); + +[LinkName("spvc_compiler_msl_needs_output_buffer")] public static extern SpvcBool MslNeedsOutputBuffer(this SpvcCompiler compiler); +[LinkName("spvc_compiler_msl_needs_patch_output_buffer")] public static extern SpvcBool MslNeedsPatchOutputBuffer(this SpvcCompiler compiler); +[LinkName("spvc_compiler_msl_needs_input_threadgroup_mem")] public static extern SpvcBool MslNeedsInputThreadgroupMem(this SpvcCompiler compiler); +[LinkName("spvc_compiler_msl_add_vertex_attribute")] public static extern SpvcResult MslAddVertexAttribute(this SpvcCompiler compiler, SpvcMslVertexAttribute* attrs); +/* Deprecated; use spvc_compiler_msl_add_resource_binding_2(). */ +[LinkName("spvc_compiler_msl_add_resource_binding")] public static extern SpvcResult MslAddResourceBinding(this SpvcCompiler compiler, SpvcMslResourceBinding* binding); +[LinkName("spvc_compiler_msl_add_resource_binding_2")] public static extern SpvcResult MslAddResourceBinding2(this SpvcCompiler compiler, SpvcMslResourceBinding2* binding); +/* Deprecated; use spvc_compiler_msl_add_shader_input_2(). */ +[LinkName("spvc_compiler_msl_add_shader_input")] public static extern SpvcResult MslAddShaderInput(this SpvcCompiler compiler, SpvcMslShaderInterfaceVar* input); +[LinkName("spvc_compiler_msl_add_shader_input_2")] public static extern SpvcResult MslAddShaderInput2(this SpvcCompiler compiler, SpvcMslShaderInterfaceVar2* input); +/* Deprecated; use spvc_compiler_msl_add_shader_output_2(). */ +[LinkName("spvc_compiler_msl_add_shader_output")] public static extern SpvcResult MslAddShaderOutput(this SpvcCompiler compiler, SpvcMslShaderInterfaceVar* output); +[LinkName("spvc_compiler_msl_add_shader_output_2")] public static extern SpvcResult MslAddShaderOutput2(this SpvcCompiler compiler, SpvcMslShaderInterfaceVar2* output); +[LinkName("spvc_compiler_msl_add_discrete_descriptor_set")] public static extern SpvcResult MslAddDiscreteDescriptorSet(this SpvcCompiler compiler, c_uint desc_set); +[LinkName("spvc_compiler_msl_set_argument_buffer_device_address_space")] public static extern SpvcResult MslSetArgumentBufferDeviceAddressSpace(this SpvcCompiler compiler, c_uint desc_set, SpvcBool device_address); + +/* Obsolete, use is_shader_input_used. */ +[LinkName("spvc_compiler_msl_is_vertex_attribute_used")] public static extern SpvcBool MslIsVertexAttributeUsed(this SpvcCompiler compiler, c_uint location); +[LinkName("spvc_compiler_msl_is_shader_input_used")] public static extern SpvcBool MslIsShaderInputUsed(this SpvcCompiler compiler, c_uint location); +[LinkName("spvc_compiler_msl_is_shader_output_used")] public static extern SpvcBool MslIsShaderOutputUsed(this SpvcCompiler compiler, c_uint location); + +[LinkName("spvc_compiler_msl_is_resource_used")] public static extern SpvcBool MslIsResourceUsed(this SpvcCompiler compiler, SpvExecutionModel model, c_uint set, c_uint binding); +[LinkName("spvc_compiler_msl_remap_constexpr_sampler")] public static extern SpvcResult MslRemapConstexprSampler(this SpvcCompiler compiler, SpvcVariableId id, SpvcMslConstexprSampler* sampler); +[LinkName("spvc_compiler_msl_remap_constexpr_sampler_by_binding")] public static extern SpvcResult MslRemapConstexprSamplerByBinding(this SpvcCompiler compiler, c_uint desc_set, c_uint binding, SpvcMslConstexprSampler* sampler); +[LinkName("spvc_compiler_msl_remap_constexpr_sampler_ycbcr")] public static extern SpvcResult MslRemapConstexprSamplerYcbcr(this SpvcCompiler compiler, SpvcVariableId id, SpvcMslConstexprSampler* sampler, SpvcMslSamplerYcbcrConversion* conv); +[LinkName("spvc_compiler_msl_remap_constexpr_sampler_by_binding_ycbcr")] public static extern SpvcResult MslRemapConstexprSamplerByBindingYcbcr(this SpvcCompiler compiler, c_uint desc_set, c_uint binding, SpvcMslConstexprSampler* sampler, SpvcMslSamplerYcbcrConversion* conv); +[LinkName("spvc_compiler_msl_set_fragment_output_components")] public static extern SpvcResult MslSetFragmentOutputComponents(this SpvcCompiler compiler, c_uint location, c_uint components); + +[LinkName("spvc_compiler_msl_get_automatic_resource_binding")] public static extern c_uint MslGetAutomaticResourceBinding(this SpvcCompiler compiler, SpvcVariableId id); +[LinkName("spvc_compiler_msl_get_automatic_resource_binding_secondary")] public static extern c_uint MslGetAutomaticResourceBindingSecondary(this SpvcCompiler compiler, SpvcVariableId id); + +[LinkName("spvc_compiler_msl_add_dynamic_buffer")] public static extern SpvcResult MslAddDynamicBuffer(this SpvcCompiler compiler, c_uint desc_set, c_uint binding, c_uint index); + +[LinkName("spvc_compiler_msl_add_inline_uniform_block")] public static extern SpvcResult MslAddInlineUniformBlock(this SpvcCompiler compiler, c_uint desc_set, c_uint binding); + +[LinkName("spvc_compiler_msl_set_combined_sampler_suffix")] public static extern SpvcResult MslSetCombinedSamplerSuffix(this SpvcCompiler compiler, c_char* suffix); +[LinkName("spvc_compiler_msl_get_combined_sampler_suffix")] public static extern c_char* MslGetCombinedSamplerSuffix(this SpvcCompiler compiler); + +/* + * Reflect resources. + * Maps almost 1:1 to C++ API. + */ +[LinkName("spvc_compiler_get_active_interface_variables")] public static extern SpvcResult GetActiveInterfaceVariables(this SpvcCompiler compiler, out SpvcSet set); +[LinkName("spvc_compiler_set_enabled_interface_variables")] public static extern SpvcResult SetEnabledInterfaceVariables(this SpvcCompiler compiler, SpvcSet set); +[LinkName("spvc_compiler_create_shader_resources")] public static extern SpvcResult CreateShaderResources(this SpvcCompiler compiler, out SpvcResources resources); +[LinkName("spvc_compiler_create_shader_resources_for_active_variables")] public static extern SpvcResult CreateShaderResourcesForActiveVariables(this SpvcCompiler compiler, out SpvcResources resources, SpvcSet active); +[LinkName("spvc_resources_get_resource_list_for_type")] public static extern SpvcResult GetResourceListForType(this SpvcResources resources, SpvcResourceType type, SpvcReflectedResource** resource_list, c_size* resource_size); + +[LinkName("spvc_resources_get_builtin_resource_list_for_type")] public static extern SpvcResult GetBuiltinResourceListForType(this SpvcResources resources, SpvcBuiltinResourceType type, SpvcReflectedBuiltinResource** resource_list, c_size* resource_size); + +/* + * Decorations. + * Maps to C++ API. + */ +[LinkName("spvc_compiler_set_decoration")] public static extern void SetDecoration(this SpvcCompiler compiler, SpvId id, SpvDecoration decoration, c_uint argument); +[LinkName("spvc_compiler_set_decoration_string")] public static extern void SetDecorationString(this SpvcCompiler compiler, SpvId id, SpvDecoration decoration, c_char* argument); +[LinkName("spvc_compiler_set_name")] public static extern void SetName(this SpvcCompiler compiler, SpvId id, c_char* argument); +[LinkName("spvc_compiler_set_member_decoration")] public static extern void SetMemberDecoration(this SpvcCompiler compiler, SpvcTypeId id, c_uint member_index, SpvDecoration decoration, c_uint argument); +[LinkName("spvc_compiler_set_member_decoration_string")] public static extern void SetMemberDecorationString(this SpvcCompiler compiler, SpvcTypeId id, c_uint member_index, SpvDecoration decoration, c_char* argument); +[LinkName("spvc_compiler_set_member_name")] public static extern void SetMemberName(this SpvcCompiler compiler, SpvcTypeId id, c_uint member_index, c_char* argument); +[LinkName("spvc_compiler_unset_decoration")] public static extern void UnsetDecoration(this SpvcCompiler compiler, SpvId id, SpvDecoration decoration); +[LinkName("spvc_compiler_unset_member_decoration")] public static extern void UnsetMemberDecoration(this SpvcCompiler compiler, SpvcTypeId id, c_uint member_index, SpvDecoration decoration); + +[LinkName("spvc_compiler_has_decoration")] public static extern SpvcBool HasDecoration(this SpvcCompiler compiler, SpvId id, SpvDecoration decoration); +[LinkName("spvc_compiler_has_member_decoration")] public static extern SpvcBool HasMemberDecoration(this SpvcCompiler compiler, SpvcTypeId id, c_uint member_index, SpvDecoration decoration); +[LinkName("spvc_compiler_get_name")] public static extern c_char* GetName(this SpvcCompiler compiler, SpvId id); +[LinkName("spvc_compiler_get_decoration")] public static extern c_uint GetDecoration(this SpvcCompiler compiler, SpvId id, SpvDecoration decoration); +[LinkName("spvc_compiler_get_decoration_string")] public static extern c_char* GetDecorationString(this SpvcCompiler compiler, SpvId id, SpvDecoration decoration); +[LinkName("spvc_compiler_get_member_decoration")] public static extern c_uint GetMemberDecoration(this SpvcCompiler compiler, SpvcTypeId id, c_uint member_index, SpvDecoration decoration); +[LinkName("spvc_compiler_get_member_decoration_string")] public static extern c_char* GetMemberDecorationString(this SpvcCompiler compiler, SpvcTypeId id, c_uint member_index, SpvDecoration decoration); +[LinkName("spvc_compiler_get_member_name")] public static extern c_char* GetMemberName(this SpvcCompiler compiler, SpvcTypeId id, c_uint member_index); + +/* + * Entry points. + * Maps to C++ API. + */ +[LinkName("spvc_compiler_get_entry_points")] public static extern SpvcResult GetEntryPoints(this SpvcCompiler compiler, SpvcEntryPoint** entry_points, c_size* num_entry_points); +[LinkName("spvc_compiler_set_entry_point")] public static extern SpvcResult SetEntryPoint(this SpvcCompiler compiler, c_char* name, SpvExecutionModel model); +[LinkName("spvc_compiler_rename_entry_point")] public static extern SpvcResult RenameEntryPoint(this SpvcCompiler compiler, c_char* old_name, c_char* new_name, SpvExecutionModel model); +[LinkName("spvc_compiler_get_cleansed_entry_point_name")] public static extern c_char* GetCleansedEntryPointName(this SpvcCompiler compiler, c_char* name, SpvExecutionModel model); +[LinkName("spvc_compiler_set_execution_mode")] public static extern void SetExecutionMode(this SpvcCompiler compiler, SpvExecutionMode mode); +[LinkName("spvc_compiler_unset_execution_mode")] public static extern void UnsetExecutionMode(this SpvcCompiler compiler, SpvExecutionMode mode); +[LinkName("spvc_compiler_set_execution_mode_with_arguments")] public static extern void SetExecutionModeWithArguments(this SpvcCompiler compiler, SpvExecutionMode mode, c_uint arg0, c_uint arg1, c_uint arg2); +[LinkName("spvc_compiler_get_execution_modes")] public static extern SpvcResult GetExecutionModes(this SpvcCompiler compiler, SpvExecutionMode** modes, c_size* num_modes); +[LinkName("spvc_compiler_get_execution_mode_argument")] public static extern c_uint GetExecutionModeArgument(this SpvcCompiler compiler, SpvExecutionMode mode); +[LinkName("spvc_compiler_get_execution_mode_argument_by_index")] public static extern c_uint GetExecutionModeArgumentByIndex(this SpvcCompiler compiler, SpvExecutionMode mode, c_uint index); +[LinkName("spvc_compiler_get_execution_model")] public static extern SpvExecutionModel GetExecutionModel(this SpvcCompiler compiler); +[LinkName("spvc_compiler_update_active_builtins")] public static extern void UpdateActiveBuiltins(this SpvcCompiler compiler); +[LinkName("spvc_compiler_has_active_builtin")] public static extern SpvcBool HasActiveBuiltin(this SpvcCompiler compiler, SpvBuiltIn builtin, SpvStorageClass storage); + +/* + * Type query interface. + * Maps to C++ API, except it's read-only. + */ +[LinkName("spvc_compiler_get_type_handle")] public static extern SpvcType GetTypeHandle(this SpvcCompiler compiler, SpvcTypeId id); + +/* Pulls out SPIRType::self. This effectively gives the type ID without array or pointer qualifiers. + * This is necessary when reflecting decoration/name information on members of a struct, + * which are placed in the base type, not the qualified type. + * This is similar to spvc_reflected_resource::base_type_id. */ +[LinkName("spvc_type_get_base_type_id")] public static extern SpvcTypeId GetBaseTypeId(this SpvcType type); + +[LinkName("spvc_type_get_basetype")] public static extern SpvcBasetype GetBasetype(this SpvcType type); +[LinkName("spvc_type_get_bit_width")] public static extern c_uint GetBitWidth(this SpvcType type); +[LinkName("spvc_type_get_vector_size")] public static extern c_uint GetVectorSize(this SpvcType type); +[LinkName("spvc_type_get_columns")] public static extern c_uint GetColumns(this SpvcType type); +[LinkName("spvc_type_get_num_array_dimensions")] public static extern c_uint GetNumArrayDimensions(this SpvcType type); +[LinkName("spvc_type_array_dimension_is_literal")] public static extern SpvcBool ArrayDimensionIsLiteral(this SpvcType type, c_uint dimension); +[LinkName("spvc_type_get_array_dimension")] public static extern SpvId GetArrayDimension(this SpvcType type, c_uint dimension); +[LinkName("spvc_type_get_num_member_types")] public static extern c_uint GetNumMemberTypes(this SpvcType type); +[LinkName("spvc_type_get_member_type")] public static extern SpvcTypeId GetMemberType(this SpvcType type, c_uint index); +[LinkName("spvc_type_get_storage_class")] public static extern SpvStorageClass GetStorageClass(this SpvcType type); + +/* Image type query. */ +[LinkName("spvc_type_get_image_sampled_type")] public static extern SpvcTypeId GetImageSampledType(this SpvcType type); +[LinkName("spvc_type_get_image_dimension")] public static extern SpvDim GetImageDimension(this SpvcType type); +[LinkName("spvc_type_get_image_is_depth")] public static extern SpvcBool GetImageIsDepth(this SpvcType type); +[LinkName("spvc_type_get_image_arrayed")] public static extern SpvcBool GetImageArrayed(this SpvcType type); +[LinkName("spvc_type_get_image_multisampled")] public static extern SpvcBool GetImageMultisampled(this SpvcType type); +[LinkName("spvc_type_get_image_is_storage")] public static extern SpvcBool GetImageIsStorage(this SpvcType type); +[LinkName("spvc_type_get_image_storage_format")] public static extern SpvImageFormat GetImageStorageFormat(this SpvcType type); +[LinkName("spvc_type_get_image_access_qualifier")] public static extern SpvAccessQualifier GetImageAccessQualifier(this SpvcType type); + +/* + * Buffer layout query. + * Maps to C++ API. + */ +[LinkName("spvc_compiler_get_declared_struct_size")] public static extern SpvcResult GetDeclaredStructSize(this SpvcCompiler compiler, SpvcType struct_type, c_size* size); +[LinkName("spvc_compiler_get_declared_struct_size_runtime_array")] public static extern SpvcResult GetDeclaredStructSizeRuntimeArray(this SpvcCompiler compiler, SpvcType struct_type, c_size array_size, c_size* size); +[LinkName("spvc_compiler_get_declared_struct_member_size")] public static extern SpvcResult GetDeclaredStructMemberSize(this SpvcCompiler compiler, SpvcType type, c_uint index, c_size* size); + +[LinkName("spvc_compiler_type_struct_member_offset")] public static extern SpvcResult TypeStructMemberOffset(this SpvcCompiler compiler, SpvcType type, c_uint index, c_uint* offset); +[LinkName("spvc_compiler_type_struct_member_array_stride")] public static extern SpvcResult TypeStructMemberArrayStride(this SpvcCompiler compiler, SpvcType type, c_uint index, c_uint* stride); +[LinkName("spvc_compiler_type_struct_member_matrix_stride")] public static extern SpvcResult TypeStructMemberMatrixStride(this SpvcCompiler compiler, SpvcType type, c_uint index, c_uint* stride); + +/* + * Workaround helper functions. + * Maps to C++ API. + */ +[LinkName("spvc_compiler_build_dummy_sampler_for_combined_images")] public static extern SpvcResult BuildDummySamplerForCombinedImages(this SpvcCompiler compiler, SpvcVariableId* id); +[LinkName("spvc_compiler_build_combined_image_samplers")] public static extern SpvcResult BuildCombinedImageSamplers(this SpvcCompiler compiler); +[LinkName("spvc_compiler_get_combined_image_samplers")] public static extern SpvcResult GetCombinedImageSamplers(this SpvcCompiler compiler, SpvcCombinedImageSampler** samplers, c_size* num_samplers); + +/* + * Constants + * Maps to C++ API. + */ +[LinkName("spvc_compiler_get_specialization_constants")] public static extern SpvcResult GetSpecializationConstants(this SpvcCompiler compiler, SpvcSpecializationConstant** constants, c_size* num_constants); +[LinkName("spvc_compiler_get_constant_handle")] public static extern SpvcConstant GetConstantHandle(this SpvcCompiler compiler, SpvcConstantId id); + +[LinkName("spvc_compiler_get_work_group_size_specialization_constants")] public static extern SpvcConstantId GetWorkGroupSizeSpecializationConstants(this SpvcCompiler compiler, SpvcSpecializationConstant* x, SpvcSpecializationConstant* y, SpvcSpecializationConstant* z); + +/* + * Buffer ranges + * Maps to C++ API. + */ +[LinkName("spvc_compiler_get_active_buffer_ranges")] public static extern SpvcResult GetActiveBufferRanges(this SpvcCompiler compiler, SpvcVariableId id, SpvcBufferRange** ranges, c_size* num_ranges); + +/* + * No stdint.h until C99, sigh :( + * For smaller types, the result is sign or zero-extended as appropriate. + * Maps to C++ API. + * TODO: The SPIRConstant query interface and modification interface is not quite complete. + */ +[LinkName("spvc_constant_get_scalar_fp16")] public static extern float GetScalarFp16(this SpvcConstant constant, c_uint column, c_uint row); +[LinkName("spvc_constant_get_scalar_fp32")] public static extern float GetScalarFp32(this SpvcConstant constant, c_uint column, c_uint row); +[LinkName("spvc_constant_get_scalar_fp64")] public static extern double GetScalarFp64(this SpvcConstant constant, c_uint column, c_uint row); +[LinkName("spvc_constant_get_scalar_u32")] public static extern c_uint GetScalarU32(this SpvcConstant constant, c_uint column, c_uint row); +[LinkName("spvc_constant_get_scalar_i32")] public static extern c_int GetScalarI32(this SpvcConstant constant, c_uint column, c_uint row); +[LinkName("spvc_constant_get_scalar_u16")] public static extern c_uint GetScalarU16(this SpvcConstant constant, c_uint column, c_uint row); +[LinkName("spvc_constant_get_scalar_i16")] public static extern c_int GetScalarI16(this SpvcConstant constant, c_uint column, c_uint row); +[LinkName("spvc_constant_get_scalar_u8")] public static extern c_uint GetScalarU8(this SpvcConstant constant, c_uint column, c_uint row); +[LinkName("spvc_constant_get_scalar_i8")] public static extern c_int GetScalarI8(this SpvcConstant constant, c_uint column, c_uint row); +[LinkName("spvc_constant_get_subconstants")] public static extern void GetSubconstants(this SpvcConstant constant, SpvcConstantId** constituents, c_size* count); +[LinkName("spvc_constant_get_scalar_u64")] public static extern c_ulonglong GetScalarU64(this SpvcConstant constant, c_uint column, c_uint row); +[LinkName("spvc_constant_get_scalar_i64")] public static extern c_longlong GetScalarI64(this SpvcConstant constant, c_uint column, c_uint row); +[LinkName("spvc_constant_get_type")] public static extern SpvcTypeId GetType(this SpvcConstant constant); + +/* + * C implementation of the C++ api. + */ +[LinkName("spvc_constant_set_scalar_fp16")] public static extern void SetScalarFp16(this SpvcConstant constant, c_uint column, c_uint row, c_ushort value); +[LinkName("spvc_constant_set_scalar_fp32")] public static extern void SetScalarFp32(this SpvcConstant constant, c_uint column, c_uint row, float value); +[LinkName("spvc_constant_set_scalar_fp64")] public static extern void SetScalarFp64(this SpvcConstant constant, c_uint column, c_uint row, double value); +[LinkName("spvc_constant_set_scalar_u32")] public static extern void SetScalarU32(this SpvcConstant constant, c_uint column, c_uint row, c_uint value); +[LinkName("spvc_constant_set_scalar_i32")] public static extern void SetScalarI32(this SpvcConstant constant, c_uint column, c_uint row, c_int value); +[LinkName("spvc_constant_set_scalar_u64")] public static extern void SetScalarU64(this SpvcConstant constant, c_uint column, c_uint row, c_ulonglong value); +[LinkName("spvc_constant_set_scalar_i64")] public static extern void SetScalarI64(this SpvcConstant constant, c_uint column, c_uint row, c_longlong value); +[LinkName("spvc_constant_set_scalar_u16")] public static extern void SetScalarU16(this SpvcConstant constant, c_uint column, c_uint row, c_ushort value); +[LinkName("spvc_constant_set_scalar_i16")] public static extern void SetScalarI16(this SpvcConstant constant, c_uint column, c_uint row, c_short value); +[LinkName("spvc_constant_set_scalar_u8")] public static extern void SetScalarU8(this SpvcConstant constant, c_uint column, c_uint row, c_uchar value); +[LinkName("spvc_constant_set_scalar_i8")] public static extern void SetScalarI8(this SpvcConstant constant, c_uint column, c_uint row, c_char value); + +/* + * Misc reflection + * Maps to C++ API. + */ +[LinkName("spvc_compiler_get_binary_offset_for_decoration")] public static extern SpvcBool GetBinaryOffsetForDecoration(this SpvcCompiler compiler, SpvcVariableId id, SpvDecoration decoration, c_uint* word_offset); + +[LinkName("spvc_compiler_buffer_is_hlsl_counter_buffer")] public static extern SpvcBool BufferIsHlslCounterBuffer(this SpvcCompiler compiler, SpvcVariableId id); +[LinkName("spvc_compiler_buffer_get_hlsl_counter_buffer")] public static extern SpvcBool BufferGetHlslCounterBuffer(this SpvcCompiler compiler, SpvcVariableId id, SpvcVariableId* counter_id); + +[LinkName("spvc_compiler_get_declared_capabilities")] public static extern SpvcResult GetDeclaredCapabilities(this SpvcCompiler compiler, SpvCapability** capabilities, c_size* num_capabilities); +[LinkName("spvc_compiler_get_declared_extensions")] public static extern SpvcResult GetDeclaredExtensions(this SpvcCompiler compiler, c_char*** extensions, c_size* num_extensions); + +[LinkName("spvc_compiler_get_remapped_declared_block_name")] public static extern c_char* GetRemappedDeclaredBlockName(this SpvcCompiler compiler, SpvcVariableId id); +[LinkName("spvc_compiler_get_buffer_block_decorations")] public static extern SpvcResult GetBufferBlockDecorations(this SpvcCompiler compiler, SpvcVariableId id, SpvDecoration** decorations, c_size* num_decorations); +} +