diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj b/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj index 387b445b..2ac45341 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj +++ b/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj @@ -78,7 +78,7 @@ - + diff --git a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj index f69d908e..7dc48379 100644 --- a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj +++ b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj @@ -58,7 +58,7 @@ - + diff --git a/src/ComputeSharp.SourceGenerators/Dxc/DxcShaderCompiler.cs b/src/ComputeSharp.SourceGenerators/Dxc/DxcShaderCompiler.cs index 875d1a7d..ca67c5bd 100644 --- a/src/ComputeSharp.SourceGenerators/Dxc/DxcShaderCompiler.cs +++ b/src/ComputeSharp.SourceGenerators/Dxc/DxcShaderCompiler.cs @@ -42,15 +42,23 @@ internal sealed unsafe class DxcShaderCompiler using ComPtr dxcCompiler = default; using ComPtr dxcUtils = default; - DirectX.DxcCreateInstance( - DirectX.CLSID_DxcCompiler, - IDxcCompiler3.IID_Guid, - out *(void**)dxcCompiler.GetAddressOf()).Assert(); + fixed (Guid* pDxcCompiler = &DirectX.CLSID_DxcCompiler) + fixed (Guid* pDxcCompiler3 = &IDxcCompiler3.IID_Guid) + { + DirectX.DxcCreateInstance( + pDxcCompiler, + pDxcCompiler3, + (void**)dxcCompiler.GetAddressOf()).Assert(); + } - DirectX.DxcCreateInstance( - DirectX.CLSID_DxcLibrary, - IDxcUtils.IID_Guid, - out *(void**)dxcUtils.GetAddressOf()).Assert(); + fixed (Guid* pDxcLibrary = &DirectX.CLSID_DxcLibrary) + fixed (Guid* pDxcUtils = &IDxcUtils.IID_Guid) + { + DirectX.DxcCreateInstance( + pDxcLibrary, + pDxcUtils, + (void**)dxcUtils.GetAddressOf()).Assert(); + } this.dxcCompiler3 = new ComPtr(dxcCompiler.Get()); this.dxcUtils = new ComPtr(dxcUtils.Get()); diff --git a/src/ComputeSharp.SourceGenerators/NativeMethods.json b/src/ComputeSharp.SourceGenerators/NativeMethods.json index f491f43c..b327dc15 100644 --- a/src/ComputeSharp.SourceGenerators/NativeMethods.json +++ b/src/ComputeSharp.SourceGenerators/NativeMethods.json @@ -6,5 +6,8 @@ "preserveSigMethods": [ "*" ] + }, + "friendlyOverloads": { + "enabled": false } } \ No newline at end of file diff --git a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj index a50184ce..4ebf5d63 100644 --- a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj +++ b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj @@ -7,7 +7,7 @@ - + diff --git a/tests/ComputeSharp.D2D1.Tests.SourceGenerators/ComputeSharp.D2D1.Tests.SourceGenerators.csproj b/tests/ComputeSharp.D2D1.Tests.SourceGenerators/ComputeSharp.D2D1.Tests.SourceGenerators.csproj index 9ce602f0..72d1d033 100644 --- a/tests/ComputeSharp.D2D1.Tests.SourceGenerators/ComputeSharp.D2D1.Tests.SourceGenerators.csproj +++ b/tests/ComputeSharp.D2D1.Tests.SourceGenerators/ComputeSharp.D2D1.Tests.SourceGenerators.csproj @@ -9,7 +9,7 @@ - + diff --git a/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj b/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj index 3687a391..adc98958 100644 --- a/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj +++ b/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj @@ -8,7 +8,7 @@ - +