diff --git a/ComputeSharp.sln b/ComputeSharp.sln index e3be080b..1a592848 100644 --- a/ComputeSharp.sln +++ b/ComputeSharp.sln @@ -495,10 +495,8 @@ Global src\ComputeSharp.Win32.D2D1\ComputeSharp.Win32.D2D1.projitems*{e44053bd-a761-47fb-aa78-087a599672ea}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{e7c9247d-016b-4819-af9f-0e9b3591e04b}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{e91f4d24-922a-4921-a8d7-9c45a143c45d}*SharedItemsImports = 5 - src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{eb52cb67-4162-4722-874b-44ea8da5450e}*SharedItemsImports = 5 src\ComputeSharp.SourceGeneration.Hlsl\ComputeSharp.SourceGeneration.Hlsl.projitems*{eb52cb67-4162-4722-874b-44ea8da5450e}*SharedItemsImports = 5 src\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems*{eb52cb67-4162-4722-874b-44ea8da5450e}*SharedItemsImports = 5 - src\ComputeSharp.Win32.D3D12\ComputeSharp.Win32.D3D12.projitems*{eb52cb67-4162-4722-874b-44ea8da5450e}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.projitems*{f8bf7666-7ccf-4fe4-b055-2eba4bcd4564}*SharedItemsImports = 13 EndGlobalSection EndGlobal diff --git a/src/ComputeSharp.Core/Primitives/Internals/UndefinedData.cs b/src/ComputeSharp.Core/Primitives/Internals/UndefinedData.cs index 6e25e4ac..1659d4db 100644 --- a/src/ComputeSharp.Core/Primitives/Internals/UndefinedData.cs +++ b/src/ComputeSharp.Core/Primitives/Internals/UndefinedData.cs @@ -1,7 +1,5 @@ -#if NET6_0_OR_GREATER +#if !SOURCE_GENERATOR using System.Runtime.CompilerServices; -#else -using RuntimeHelpers = ComputeSharp.NetStandard.RuntimeHelpers; #endif namespace ComputeSharp; @@ -15,5 +13,10 @@ internal static class UndefinedData /// /// The shared memory with undefined data (has size of , as it's the maximum needed at once). /// - public static readonly unsafe void* Memory = (void*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(UndefinedData), sizeof(Double4)); + public static readonly unsafe void* Memory = +#if SOURCE_GENERATOR + null; +#else + (void*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(UndefinedData), sizeof(Double4)); +#endif } diff --git a/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs b/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs index 37c51870..e9b26bf9 100644 --- a/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs +++ b/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs @@ -4,6 +4,7 @@ using System; using System.ComponentModel; +using System.Globalization; using System.Runtime.CompilerServices; using System.Text; @@ -342,7 +343,7 @@ internal sealed class IndentedTextWriter : IDisposable { if (value is IFormattable) { - this.writer.Write(((IFormattable)value).ToString(format)); + this.writer.Write(((IFormattable)value).ToString(format, CultureInfo.InvariantCulture)); } else if (value is not null) { diff --git a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj index 66666ac9..63332f06 100644 --- a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj +++ b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj @@ -70,6 +70,7 @@ + @@ -88,12 +89,6 @@ - - - - - - diff --git a/src/ComputeSharp.SourceGenerators/Dxc/DxcShaderCompiler.cs b/src/ComputeSharp.SourceGenerators/Dxc/DxcShaderCompiler.cs index 9360ef72..37636a9e 100644 --- a/src/ComputeSharp.SourceGenerators/Dxc/DxcShaderCompiler.cs +++ b/src/ComputeSharp.SourceGenerators/Dxc/DxcShaderCompiler.cs @@ -1,10 +1,11 @@ using System; +using System.Buffers; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Threading; -using TerraFX.Interop.DirectX; -using TerraFX.Interop.Windows; +using Windows.Win32; +using Windows.Win32.Foundation; +using Windows.Win32.Graphics.Direct3D.Dxc; namespace ComputeSharp.SourceGenerators.Dxc; @@ -42,19 +43,20 @@ internal sealed unsafe class DxcShaderCompiler { using ComPtr dxcCompiler = default; using ComPtr dxcLibrary = default; + + PInvoke.DxcCreateInstance( + PInvoke.CLSID_DxcCompiler, + IDxcCompiler.IID_Guid, + out *(void**)dxcCompiler.GetAddressOf()).Assert(); + + PInvoke.DxcCreateInstance( + PInvoke.CLSID_DxcLibrary, + IDxcLibrary.IID_Guid, + out *(void**)dxcLibrary.GetAddressOf()).Assert(); + using ComPtr dxcIncludeHandler = default; - Marshal.ThrowExceptionForHR(DirectX.DxcCreateInstance( - (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in CLSID.CLSID_DxcCompiler)), - Windows.__uuidof(), - (void**)dxcCompiler.GetAddressOf())); - - Marshal.ThrowExceptionForHR(DirectX.DxcCreateInstance( - (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in CLSID.CLSID_DxcLibrary)), - Windows.__uuidof(), - (void**)dxcLibrary.GetAddressOf())); - - Marshal.ThrowExceptionForHR(dxcLibrary.Get()->CreateIncludeHandler(dxcIncludeHandler.GetAddressOf())); + dxcLibrary.Get()->CreateIncludeHandler(dxcIncludeHandler.GetAddressOf()).Assert(); this.dxcCompiler = new ComPtr(dxcCompiler.Get()); this.dxcLibrary = new ComPtr(dxcLibrary.Get()); @@ -90,54 +92,58 @@ internal sealed unsafe class DxcShaderCompiler // Get the encoded blob from the source code fixed (char* p = source) { - int hresult = this.dxcLibrary.Get()->CreateBlobWithEncodingOnHeapCopy( - p, - (uint)source.Length * 2, - 1200, - dxcBlobEncoding.GetAddressOf()); - - Marshal.ThrowExceptionForHR(hresult); + this.dxcLibrary.Get()->CreateBlobWithEncodingOnHeapCopy( + pText: p, + size: (uint)source.Length * 2, + codePage: DXC_CP.DXC_CP_UTF16, + pBlobEncoding: dxcBlobEncoding.GetAddressOf()).Assert(); } token.ThrowIfCancellationRequested(); // Try to compile the new compute shader - fixed (char* shaderName = "") - fixed (char* entryPoint = nameof(IComputeShader.Execute)) - fixed (char* shaderProfile = "cs_6_0") fixed (char* optimization = "-O3") fixed (char* rowMajor = "-Zpr") fixed (char* warningsAsErrors = "-Werror") { - char** arguments = stackalloc char*[3] { optimization, rowMajor, warningsAsErrors }; + // We can't use stackalloc here, because the portable Span type has a bug that causes + // the constructor taking a pointer to throw if T is a type that contains a pointer field. + // So we can just rent a buffer from the pool and use that instead, at least for now. + PCWSTR[] arguments = ArrayPool.Shared.Rent(3); - int hresult = this.dxcCompiler.Get()->Compile( - (IDxcBlob*)dxcBlobEncoding.Get(), - (ushort*)shaderName, - (ushort*)entryPoint, - (ushort*)shaderProfile, - (ushort**)arguments, - 3, - null, - 0, - this.dxcIncludeHandler.Get(), - dxcOperationResult.GetAddressOf()); + arguments[0] = optimization; + arguments[1] = rowMajor; + arguments[2] = warningsAsErrors; - Marshal.ThrowExceptionForHR(hresult); + HRESULT hresult = this.dxcCompiler.Get()->Compile( + pSource: (IDxcBlob*)dxcBlobEncoding.Get(), + pSourceName: "", + pEntryPoint: "Execute", + pTargetProfile: "cs_6_0", + pArguments: arguments.AsSpan(0, 3), + pDefines: ReadOnlySpan.Empty, + pIncludeHandler: this.dxcIncludeHandler.Get(), + ppResult: dxcOperationResult.GetAddressOf()); + + ArrayPool.Shared.Return(arguments); + + // Only assert the HRESULT after returning the array from the pool. Since the method itself + // can return a failure but doesn't actually throw, there's no need to throw the buffer away. + hresult.Assert(); } token.ThrowIfCancellationRequested(); HRESULT status; - Marshal.ThrowExceptionForHR(dxcOperationResult.Get()->GetStatus(&status)); + dxcOperationResult.Get()->GetStatus(&status).Assert(); // The compilation was successful, so we can extract the shader bytecode if (status == 0) { using ComPtr dxcBlobBytecode = default; - Marshal.ThrowExceptionForHR(dxcOperationResult.Get()->GetResult(dxcBlobBytecode.GetAddressOf())); + dxcOperationResult.Get()->GetResult(dxcBlobBytecode.GetAddressOf()).Assert(); byte* buffer = (byte*)dxcBlobBytecode.Get()->GetBufferPointer(); int length = checked((int)dxcBlobBytecode.Get()->GetBufferSize()); @@ -158,7 +164,7 @@ internal sealed unsafe class DxcShaderCompiler { using ComPtr dxcBlobEncodingError = default; - Marshal.ThrowExceptionForHR(dxcOperationResult->GetErrorBuffer(dxcBlobEncodingError.GetAddressOf())); + dxcOperationResult->GetErrorBuffer(dxcBlobEncodingError.GetAddressOf()).Assert(); string message = new((sbyte*)dxcBlobEncodingError.Get()->GetBufferPointer()); diff --git a/src/ComputeSharp.SourceGenerators/Dxc/Windows.Win32/ComPtr{T}.cs b/src/ComputeSharp.SourceGenerators/Dxc/Windows.Win32/ComPtr{T}.cs new file mode 100644 index 00000000..7f6fbfc1 --- /dev/null +++ b/src/ComputeSharp.SourceGenerators/Dxc/Windows.Win32/ComPtr{T}.cs @@ -0,0 +1,62 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/wrl/client.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using Windows.Win32.System.Com; + +namespace Windows.Win32; + +/// A type that allows working with pointers to COM objects more securely. +/// The type to wrap in the current instance. +internal unsafe struct ComPtr : IDisposable + where T : unmanaged +{ + /// The raw pointer to a COM object, if existing. + private T* ptr; + + /// Creates a new instance from a raw pointer and increments the ref count. + /// The raw pointer to wrap. + public ComPtr(T* other) + { + this.ptr = other; + + if (other is not null) + { + _ = ((IUnknown*)other)->AddRef(); + } + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Dispose() + { + T* pointer = this.ptr; + + if (pointer is not null) + { + this.ptr = null; + + _ = ((IUnknown*)pointer)->Release(); + } + } + + /// Gets the currently wrapped raw pointer to a COM object. + /// The raw pointer wrapped by the current instance. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly T* Get() + { + return this.ptr; + } + + /// Gets the address of the current instance as a raw double pointer. This method is only valid when the current instance is on the stack or pinned. + /// + /// The raw pointer to the current instance. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly T** GetAddressOf() + { + return (T**)Unsafe.AsPointer(ref Unsafe.AsRef(in this)); + } +} \ No newline at end of file diff --git a/src/ComputeSharp.SourceGenerators/Dxc/Windows.Win32/HRESULT.cs b/src/ComputeSharp.SourceGenerators/Dxc/Windows.Win32/HRESULT.cs new file mode 100644 index 00000000..357f1cf0 --- /dev/null +++ b/src/ComputeSharp.SourceGenerators/Dxc/Windows.Win32/HRESULT.cs @@ -0,0 +1,21 @@ +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace Windows.Win32.Foundation; + +/// +partial struct HRESULT +{ + /// + /// Throws a if the current value represents an error. + /// + /// Thrown if the current value represents an error. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public readonly void Assert() + { + if (Failed) + { + throw new Win32Exception(this.Value); + } + } +} \ No newline at end of file diff --git a/src/ComputeSharp.SourceGenerators/NativeMethods.json b/src/ComputeSharp.SourceGenerators/NativeMethods.json new file mode 100644 index 00000000..f491f43c --- /dev/null +++ b/src/ComputeSharp.SourceGenerators/NativeMethods.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://aka.ms/CsWin32.schema.json", + "allowMarshaling": false, + "useSafeHandles": false, + "comInterop": { + "preserveSigMethods": [ + "*" + ] + } +} \ No newline at end of file diff --git a/src/ComputeSharp.SourceGenerators/NativeMethods.txt b/src/ComputeSharp.SourceGenerators/NativeMethods.txt new file mode 100644 index 00000000..396fba96 --- /dev/null +++ b/src/ComputeSharp.SourceGenerators/NativeMethods.txt @@ -0,0 +1,7 @@ +CLSID_DxcCompiler +CLSID_DxcLibrary +DxcCreateInstance +IDxcCompiler +IDxcLibrary +IDxcIncludeHandler +IUnknown \ No newline at end of file diff --git a/src/ComputeSharp.Win32.D3D12/ComputeSharp.Win32.D3D12.projitems b/src/ComputeSharp.Win32.D3D12/ComputeSharp.Win32.D3D12.projitems index c4f97da4..8c3cebd6 100644 --- a/src/ComputeSharp.Win32.D3D12/ComputeSharp.Win32.D3D12.projitems +++ b/src/ComputeSharp.Win32.D3D12/ComputeSharp.Win32.D3D12.projitems @@ -208,17 +208,6 @@ - - - - - - - - - - - diff --git a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/CLSID.cs b/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/CLSID.cs deleted file mode 100644 index 754391c8..00000000 --- a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/CLSID.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.Windows; - -internal static partial class CLSID -{ - [NativeTypeName("const CLSID")] - public static ref readonly Guid CLSID_DxcCompiler - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x93, 0x2D, 0xE2, 0x73, - 0xCE, 0xE6, - 0xF3, 0x47, - 0xB5, - 0xBF, - 0xF0, - 0x66, - 0x4F, - 0x39, - 0xC1, - 0xB0 - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - - [NativeTypeName("const GUID")] - public static ref readonly Guid CLSID_DxcLibrary - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0xAF, 0xD6, 0x45, 0x62, - 0xE0, 0x66, - 0xFD, 0x48, - 0x80, - 0xB4, - 0x4D, - 0x27, - 0x17, - 0x96, - 0x74, - 0x8C - }; - - Debug.Assert(data.Length == Unsafe.SizeOf()); - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } -} \ No newline at end of file diff --git a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/DirectX.cs b/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/DirectX.cs deleted file mode 100644 index 7da23460..00000000 --- a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/DirectX.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX; - -internal static unsafe partial class DirectX -{ - [DllImport("dxcompiler", ExactSpelling = true)] - public static extern HRESULT DxcCreateInstance([NativeTypeName("const IID &")] Guid* rclsid, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LPVOID *")] void** ppv); -} \ No newline at end of file diff --git a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/DxcBuffer.cs b/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/DxcBuffer.cs deleted file mode 100644 index 6cd7b2b5..00000000 --- a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/DxcBuffer.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -namespace TerraFX.Interop.DirectX; - -internal unsafe partial struct DxcBuffer -{ - [NativeTypeName("LPCVOID")] - public void* Ptr; - - [NativeTypeName("SIZE_T")] - public nuint Size; - - public uint Encoding; -} \ No newline at end of file diff --git a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/DxcDefine.cs b/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/DxcDefine.cs deleted file mode 100644 index f2c9b9fb..00000000 --- a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/DxcDefine.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -namespace TerraFX.Interop.DirectX; - -internal unsafe partial struct DxcDefine -{ - [NativeTypeName("LPCWSTR")] - public ushort* Name; - - [NativeTypeName("LPCWSTR")] - public ushort* Value; -} \ No newline at end of file diff --git a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcBlob.cs b/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcBlob.cs deleted file mode 100644 index b3f8a455..00000000 --- a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcBlob.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX; - -[Guid("8BA5FB08-5195-40E2-AC58-0D989C3A0102")] -[NativeTypeName("struct IDxcBlob : IUnknown")] -[NativeInheritance("IUnknown")] -internal unsafe partial struct IDxcBlob -{ - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDxcBlob*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDxcBlob*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDxcBlob*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - [return: NativeTypeName("LPVOID")] - public void* GetBufferPointer() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDxcBlob*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("SIZE_T")] - public nuint GetBufferSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDxcBlob*)Unsafe.AsPointer(ref this)); - } -} \ No newline at end of file diff --git a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcBlobEncoding.cs b/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcBlobEncoding.cs deleted file mode 100644 index 6c9a9df2..00000000 --- a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcBlobEncoding.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX; - -[Guid("7241D424-2646-4191-97C0-98E96E42FC68")] -[NativeTypeName("struct IDxcBlobEncoding : IDxcBlob")] -[NativeInheritance("IDxcBlob")] -internal unsafe partial struct IDxcBlobEncoding -{ - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDxcBlobEncoding*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDxcBlobEncoding*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDxcBlobEncoding*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - [return: NativeTypeName("LPVOID")] - public void* GetBufferPointer() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDxcBlobEncoding*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - [return: NativeTypeName("SIZE_T")] - public nuint GetBufferSize() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDxcBlobEncoding*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetEncoding(BOOL* pKnown, [NativeTypeName("UINT32 *")] uint* pCodePage) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDxcBlobEncoding*)Unsafe.AsPointer(ref this), pKnown, pCodePage); - } -} \ No newline at end of file diff --git a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcCompiler.cs b/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcCompiler.cs deleted file mode 100644 index 996c51e9..00000000 --- a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcCompiler.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX; - -[Guid("8C210BF3-011F-4422-8D70-6F9ACB8DB617")] -[NativeTypeName("struct IDxcCompiler : IUnknown")] -[NativeInheritance("IUnknown")] -internal unsafe partial struct IDxcCompiler -{ - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDxcCompiler*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDxcCompiler*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDxcCompiler*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT Compile(IDxcBlob* pSource, [NativeTypeName("LPCWSTR")] ushort* pSourceName, [NativeTypeName("LPCWSTR")] ushort* pEntryPoint, [NativeTypeName("LPCWSTR")] ushort* pTargetProfile, [NativeTypeName("LPCWSTR *")] ushort** pArguments, [NativeTypeName("UINT32")] uint argCount, [NativeTypeName("const DxcDefine *")] DxcDefine* pDefines, [NativeTypeName("UINT32")] uint defineCount, IDxcIncludeHandler* pIncludeHandler, IDxcOperationResult** ppResult) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDxcCompiler*)Unsafe.AsPointer(ref this), pSource, pSourceName, pEntryPoint, pTargetProfile, pArguments, argCount, pDefines, defineCount, pIncludeHandler, ppResult); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT Preprocess(IDxcBlob* pSource, [NativeTypeName("LPCWSTR")] ushort* pSourceName, [NativeTypeName("LPCWSTR *")] ushort** pArguments, [NativeTypeName("UINT32")] uint argCount, [NativeTypeName("const DxcDefine *")] DxcDefine* pDefines, [NativeTypeName("UINT32")] uint defineCount, IDxcIncludeHandler* pIncludeHandler, IDxcOperationResult** ppResult) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDxcCompiler*)Unsafe.AsPointer(ref this), pSource, pSourceName, pArguments, argCount, pDefines, defineCount, pIncludeHandler, ppResult); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT Disassemble(IDxcBlob* pSource, IDxcBlobEncoding** ppDisassembly) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDxcCompiler*)Unsafe.AsPointer(ref this), pSource, ppDisassembly); - } -} \ No newline at end of file diff --git a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcIncludeHandler.cs b/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcIncludeHandler.cs deleted file mode 100644 index fcf8edd2..00000000 --- a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcIncludeHandler.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX; - -[Guid("7F61FC7D-950D-467F-B3E3-3C02FB49187C")] -[NativeTypeName("struct IDxcIncludeHandler : IUnknown")] -[NativeInheritance("IUnknown")] -internal unsafe partial struct IDxcIncludeHandler -{ - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDxcIncludeHandler*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDxcIncludeHandler*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDxcIncludeHandler*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT LoadSource([NativeTypeName("LPCWSTR")] ushort* pFilename, IDxcBlob** ppIncludeSource) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDxcIncludeHandler*)Unsafe.AsPointer(ref this), pFilename, ppIncludeSource); - } -} \ No newline at end of file diff --git a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcLibrary.cs b/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcLibrary.cs deleted file mode 100644 index b59b9ead..00000000 --- a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcLibrary.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX; - -[Guid("E5204DC7-D18C-4C3C-BDFB-851673980FE7")] -[NativeTypeName("struct IDxcLibrary : IUnknown")] -[NativeInheritance("IUnknown")] -internal unsafe partial struct IDxcLibrary -{ - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDxcLibrary*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDxcLibrary*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDxcLibrary*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT CreateBlobFromBlob(IDxcBlob* pBlob, [NativeTypeName("UINT32")] uint offset, [NativeTypeName("UINT32")] uint length, IDxcBlob** ppResult) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDxcLibrary*)Unsafe.AsPointer(ref this), pBlob, offset, length, ppResult); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT CreateBlobFromFile([NativeTypeName("LPCWSTR")] ushort* pFileName, [NativeTypeName("UINT32 *")] uint* codePage, IDxcBlobEncoding** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDxcLibrary*)Unsafe.AsPointer(ref this), pFileName, codePage, pBlobEncoding); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CreateBlobWithEncodingFromPinned([NativeTypeName("LPCVOID")] void* pText, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDxcLibrary*)Unsafe.AsPointer(ref this), pText, size, codePage, pBlobEncoding); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT CreateBlobWithEncodingOnHeapCopy([NativeTypeName("LPCVOID")] void* pText, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDxcLibrary*)Unsafe.AsPointer(ref this), pText, size, codePage, pBlobEncoding); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT CreateIncludeHandler(IDxcIncludeHandler** ppResult) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDxcLibrary*)Unsafe.AsPointer(ref this), ppResult); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(10)] - public HRESULT CreateStreamFromBlobReadOnly(IDxcBlob* pBlob, IStream** ppStream) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IDxcLibrary*)Unsafe.AsPointer(ref this), pBlob, ppStream); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(11)] - public HRESULT GetBlobAsUtf8(IDxcBlob* pBlob, IDxcBlobEncoding** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IDxcLibrary*)Unsafe.AsPointer(ref this), pBlob, pBlobEncoding); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT GetBlobAsUtf16(IDxcBlob* pBlob, IDxcBlobEncoding** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDxcLibrary*)Unsafe.AsPointer(ref this), pBlob, pBlobEncoding); - } -} \ No newline at end of file diff --git a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcOperationResult.cs b/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcOperationResult.cs deleted file mode 100644 index 2a65379a..00000000 --- a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcOperationResult.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX; - -[Guid("CEDB484A-D4E9-445A-B991-CA21CA157DC2")] -[NativeTypeName("struct IDxcOperationResult : IUnknown")] -[NativeInheritance("IUnknown")] -internal unsafe partial struct IDxcOperationResult -{ - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDxcOperationResult*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDxcOperationResult*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDxcOperationResult*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT GetStatus(HRESULT* pStatus) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDxcOperationResult*)Unsafe.AsPointer(ref this), pStatus); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT GetResult(IDxcBlob** ppResult) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDxcOperationResult*)Unsafe.AsPointer(ref this), ppResult); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(5)] - public HRESULT GetErrorBuffer(IDxcBlobEncoding** ppErrors) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IDxcOperationResult*)Unsafe.AsPointer(ref this), ppErrors); - } -} \ No newline at end of file diff --git a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcUtils.cs b/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcUtils.cs deleted file mode 100644 index 111d7be7..00000000 --- a/src/ComputeSharp.Win32.D3D12/DirectX/um/dxcapi/IDxcUtils.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. Licensed under the University of Illinois Open Source License. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.DirectX; - -[Guid("4605C4CB-2019-492A-ADA4-65F20BB7D67F")] -[NativeTypeName("struct IDxcUtils : IUnknown")] -[NativeInheritance("IUnknown")] -internal unsafe partial struct IDxcUtils -{ - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(0)] - public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IDxcUtils*)Unsafe.AsPointer(ref this), riid, ppvObject); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(1)] - [return: NativeTypeName("ULONG")] - public uint AddRef() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IDxcUtils*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(2)] - [return: NativeTypeName("ULONG")] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IDxcUtils*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(3)] - public HRESULT CreateBlobFromBlob(IDxcBlob* pBlob, [NativeTypeName("UINT32")] uint offset, [NativeTypeName("UINT32")] uint length, IDxcBlob** ppResult) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IDxcUtils*)Unsafe.AsPointer(ref this), pBlob, offset, length, ppResult); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(4)] - public HRESULT CreateBlobFromPinned([NativeTypeName("LPCVOID")] void* pData, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IDxcUtils*)Unsafe.AsPointer(ref this), pData, size, codePage, pBlobEncoding); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(6)] - public HRESULT CreateBlob([NativeTypeName("LPCVOID")] void* pData, [NativeTypeName("UINT32")] uint size, [NativeTypeName("UINT32")] uint codePage, IDxcBlobEncoding** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IDxcUtils*)Unsafe.AsPointer(ref this), pData, size, codePage, pBlobEncoding); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(7)] - public HRESULT LoadFile([NativeTypeName("LPCWSTR")] ushort* pFileName, [NativeTypeName("UINT32 *")] uint* pCodePage, IDxcBlobEncoding** pBlobEncoding) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IDxcUtils*)Unsafe.AsPointer(ref this), pFileName, pCodePage, pBlobEncoding); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(8)] - public HRESULT CreateReadOnlyStreamFromBlob(IDxcBlob* pBlob, IStream** ppStream) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IDxcUtils*)Unsafe.AsPointer(ref this), pBlob, ppStream); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(9)] - public HRESULT CreateDefaultIncludeHandler(IDxcIncludeHandler** ppResult) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IDxcUtils*)Unsafe.AsPointer(ref this), ppResult); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(12)] - public HRESULT GetDxilContainerPart([NativeTypeName("const DxcBuffer *")] DxcBuffer* pShader, [NativeTypeName("UINT32")] uint DxcPart, void** ppPartData, [NativeTypeName("UINT32 *")] uint* pPartSizeInBytes) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IDxcUtils*)Unsafe.AsPointer(ref this), pShader, DxcPart, ppPartData, pPartSizeInBytes); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(13)] - public HRESULT CreateReflection([NativeTypeName("const DxcBuffer *")] DxcBuffer* pData, [NativeTypeName("const IID &")] Guid* iid, void** ppvReflection) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDxcUtils*)Unsafe.AsPointer(ref this), pData, iid, ppvReflection); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - [VtblIndex(15)] - public HRESULT GetPDBContents(IDxcBlob* pPDBBlob, IDxcBlob** ppHash, IDxcBlob** ppContainer) - { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IDxcUtils*)Unsafe.AsPointer(ref this), pPDBBlob, ppHash, ppContainer); - } -} \ No newline at end of file