From 44c3cb9410dd3b388e4918d646f6a4238b79ac53 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sun, 7 Nov 2021 12:34:46 +0100 Subject: [PATCH] Removed duplicated library loading callback reegistration --- .../Shaders/Translation/ShaderCompiler.LibraryLoading.cs | 2 +- src/ComputeSharp/Shaders/Translation/ShaderCompiler.cs | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/ComputeSharp/Shaders/Translation/ShaderCompiler.LibraryLoading.cs b/src/ComputeSharp/Shaders/Translation/ShaderCompiler.LibraryLoading.cs index 2314c120..b0ee3aae 100644 --- a/src/ComputeSharp/Shaders/Translation/ShaderCompiler.LibraryLoading.cs +++ b/src/ComputeSharp/Shaders/Translation/ShaderCompiler.LibraryLoading.cs @@ -12,7 +12,7 @@ internal sealed unsafe partial class ShaderCompiler /// /// Initializes the DLL resolvers for the dxcompiler.dll and dxil.dll libraries. /// - private static void InitializeDxcLibrariesLoading() + static ShaderCompiler() { // Register a custom library resolver for the two DXC libraries. We need to either manually load the two // libraries from the NuGet directory, if an RID is not in use, or we need to ensure that dxil.dll is diff --git a/src/ComputeSharp/Shaders/Translation/ShaderCompiler.cs b/src/ComputeSharp/Shaders/Translation/ShaderCompiler.cs index 84989ae9..03d22b81 100644 --- a/src/ComputeSharp/Shaders/Translation/ShaderCompiler.cs +++ b/src/ComputeSharp/Shaders/Translation/ShaderCompiler.cs @@ -39,11 +39,6 @@ internal sealed unsafe partial class ShaderCompiler /// private ShaderCompiler() { - lock(this) - { - InitializeDxcLibrariesLoading(); - } - using ComPtr dxcCompiler = default; using ComPtr dxcLibrary = default; using ComPtr dxcIncludeHandler = default;