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;