summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-01-06 15:01:51 -0800
committerGitHub <noreply@github.com>2025-01-06 15:01:51 -0800
commita448b7ecd880c4cbe1c0504af3df4ec708f42d48 (patch)
tree99d4dd9b8ae9bb69a9e15cc588e6609b4cbb84a6
parent7190c28a10b4a9e7f9dd4dc523f734c066e50ec6 (diff)
Properly set D3D12SDKPath (#5993)
* Properly set D3D12SDKPath Closes https://github.com/shader-slang/slang/issues/5992 This commit have an effect on slang-test.exe and test-server.exe. When we run slang-test.exe, it uses D3D12Core.DLL located at `build/{Release,Debug}/bin/D3D12`, which is `D3D12` from where the executable file is located at. This has been working fine but we found a case where it doesn't work properly. This commit sets D3D12SDKPath value explicitly to avoid potential problems.
-rw-r--r--tools/slang-test/slang-test-main.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp
index 0987cbf80..a8127c3a8 100644
--- a/tools/slang-test/slang-test-main.cpp
+++ b/tools/slang-test/slang-test-main.cpp
@@ -47,6 +47,20 @@
using namespace Slang;
+#if defined(_WIN32)
+// https://devblogs.microsoft.com/directx/gettingstarted-dx12agility/#2.-set-agility-sdk-parameters
+
+extern "C"
+{
+ __declspec(dllexport) extern const uint32_t D3D12SDKVersion = 711;
+}
+
+extern "C"
+{
+ __declspec(dllexport) extern const char* D3D12SDKPath = u8".\\D3D12\\";
+}
+#endif
+
// Options for a particular test
struct TestOptions
{