Skipped library loading fixup in publish mode

このコミットが含まれているのは:
Sergio Pedri committed 2020-12-29 16:50:25 +01:00
1 親 6b50fe2261
コミット fa2c74f7db
1ファイル変更
+14 -4
+14 -4
ファイルの表示
@@ -62,13 +62,23 @@ namespace ComputeSharp.Shaders.Translation
/// </summary>
private static void InitializeDxcLibrariesLoading()
{
FX.ResolveLibrary += ResolveLibrary;
string
dxcompilerPath = Path.GetFullPath(@$"runtimes\win-x64\native\dxcompiler.dll"),
dxilPath = Path.GetFullPath(@$"runtimes\win-x64\native\dxil.dll");
fixed (char* p = @"runtimes\win-x64\native")
if (File.Exists(dxcompilerPath))
{
int result = FX.SetDllDirectoryW((ushort*)p);
FX.ResolveLibrary += ResolveLibrary;
}
if (result == 0) ThrowHelper.ThrowWin32Exception();
if (File.Exists(dxilPath))
{
fixed (char* p = @"runtimes\win-x64\native")
{
int result = FX.SetDllDirectoryW((ushort*)p);
if (result == 0) ThrowHelper.ThrowWin32Exception();
}
}
}