From 4fc07614d6407e49a0c34e7483d410153c0b269a Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 6 Sep 2019 13:04:50 -0400 Subject: Use d3dcompiler_47.dll from slang-binaries on windows. (#1047) * Use dxcompiler_47.dll from slang-binaries on windows. * make https for git module slang-binaries --- .gitmodules | 3 +++ external/slang-binaries | 1 + premake5.lua | 2 +- tools/copy-hlsl-libs.bat | 4 +++- tools/render-test/render-test-tool.vcxproj | 8 ++++---- 5 files changed, 12 insertions(+), 6 deletions(-) create mode 160000 external/slang-binaries diff --git a/.gitmodules b/.gitmodules index 0c12afa2b..271125664 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "external/imgui"] path = external/imgui url = https://github.com/ocornut/imgui.git +[submodule "external/slang-binaries"] + path = external/slang-binaries + url = https://github.com/shader-slang/slang-binaries diff --git a/external/slang-binaries b/external/slang-binaries new file mode 160000 index 000000000..e82eaa4c7 --- /dev/null +++ b/external/slang-binaries @@ -0,0 +1 @@ +Subproject commit e82eaa4c7afc3550490e82eff60df349d93e1890 diff --git a/premake5.lua b/premake5.lua index 9924d8c2c..1f75b50c0 100644 --- a/premake5.lua +++ b/premake5.lua @@ -513,7 +513,7 @@ if isTargetWindows then -- For Windows targets, we want to copy d3dcompiler_47.dll, -- dxcompiler.dll, and dxil.dll from the Windows SDK redistributable -- directory into the output directory. - postbuildcommands { '"$(SolutionDir)tools\\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/%{cfg.platform:lower()}/" "%{cfg.targetdir}/"'} + postbuildcommands { '"$(SolutionDir)tools\\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/%{cfg.platform:lower()}/" "%{cfg.targetdir}/" "windows-%{cfg.platform:lower()}"'} end diff --git a/tools/copy-hlsl-libs.bat b/tools/copy-hlsl-libs.bat index 91d5be852..2cd309aca 100644 --- a/tools/copy-hlsl-libs.bat +++ b/tools/copy-hlsl-libs.bat @@ -3,8 +3,10 @@ setlocal set SOURCE_DIR=%~1 set TARGET_DIR=%~2 +set PLATFORM=%~3 + +robocopy "../../external/slang-binaries/bin/%PLATFORM%" "%TARGET_DIR%" d3dcompiler_47.dll /r:0 >nul -robocopy "%SOURCE_DIR%" "%TARGET_DIR%" d3dcompiler_47.dll /r:0 >nul robocopy "%SOURCE_DIR%" "%TARGET_DIR%" dxcompiler.dll /r:0 >nul robocopy "%SOURCE_DIR%" "%TARGET_DIR%" dxil.dll /r:0 >nul diff --git a/tools/render-test/render-test-tool.vcxproj b/tools/render-test/render-test-tool.vcxproj index 8ab5d9859..0399d67e0 100644 --- a/tools/render-test/render-test-tool.vcxproj +++ b/tools/render-test/render-test-tool.vcxproj @@ -110,7 +110,7 @@ ..\..\bin\windows-x86\debug\render-test-tool.lib - "$(SolutionDir)tools\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/x86/" "../../bin/windows-x86/debug/" + "$(SolutionDir)tools\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/x86/" "../../bin/windows-x86/debug/" "windows-x86" @@ -129,7 +129,7 @@ ..\..\bin\windows-x64\debug\render-test-tool.lib - "$(SolutionDir)tools\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/x64/" "../../bin/windows-x64/debug/" + "$(SolutionDir)tools\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/x64/" "../../bin/windows-x64/debug/" "windows-x64" @@ -152,7 +152,7 @@ ..\..\bin\windows-x86\release\render-test-tool.lib - "$(SolutionDir)tools\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/x86/" "../../bin/windows-x86/release/" + "$(SolutionDir)tools\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/x86/" "../../bin/windows-x86/release/" "windows-x86" @@ -175,7 +175,7 @@ ..\..\bin\windows-x64\release\render-test-tool.lib - "$(SolutionDir)tools\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/x64/" "../../bin/windows-x64/release/" + "$(SolutionDir)tools\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/x64/" "../../bin/windows-x64/release/" "windows-x64" -- cgit v1.2.3