summaryrefslogtreecommitdiffstats
path: root/tools/gfx-unit-test
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-02-12 14:58:00 -0800
committerGitHub <noreply@github.com>2025-02-12 14:58:00 -0800
commit74852ceb6b3bcc018042aba3e30933b7b6fc09ef (patch)
treeb77dd62f0e74510fae0d2af8b7afa260ce9d49b8 /tools/gfx-unit-test
parent3f102afe1038882f336dc052a9954811150fa700 (diff)
Allow LHS of `where` to be any type. (#6333)
* Allow LHS of `where` to be any type. * Register free-form extensions when loading precompiled module. * Fix test. * Fix. * Fix `as<IRType>`. * try fix precompiled module test.
Diffstat (limited to 'tools/gfx-unit-test')
-rw-r--r--tools/gfx-unit-test/precompiled-module-cache.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gfx-unit-test/precompiled-module-cache.cpp b/tools/gfx-unit-test/precompiled-module-cache.cpp
index 8c22a7c84..778c68a89 100644
--- a/tools/gfx-unit-test/precompiled-module-cache.cpp
+++ b/tools/gfx-unit-test/precompiled-module-cache.cpp
@@ -7,6 +7,7 @@
#include "slang-gfx.h"
#include "unit-test/slang-unit-test.h"
+#include <mutex>
using namespace gfx;
namespace gfx_test
@@ -15,6 +16,9 @@ namespace gfx_test
Slang::ComPtr<slang::ISession> createSession(gfx::IDevice* device, ISlangFileSystemExt* fileSys)
{
+ static std::mutex m;
+ std::lock_guard<std ::mutex> lock(m);
+
Slang::ComPtr<slang::ISession> slangSession;
device->getSlangSession(slangSession.writeRef());
slang::SessionDesc sessionDesc = {};