Skip to content

Commit

Permalink
Properly set D3D12SDKPath (#5993)
Browse files Browse the repository at this point in the history
* Properly set D3D12SDKPath

Closes #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.
  • Loading branch information
jkwak-work authored Jan 6, 2025
1 parent 7190c28 commit a448b7e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/slang-test/slang-test-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit a448b7e

Please sign in to comment.