From 8000e0ede34e920cc7f37d69a335d74a472eff42 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 22 Jan 2025 09:40:15 -0800 Subject: Cache and reuse glsl module. (#6152) * Cache and reuse glsl module. * Fix. * Implement record/replay for the new api. * Fix record replay. * Fix test. --- tools/slang-unit-test/unit-test-glsl-compile.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/slang-unit-test/unit-test-glsl-compile.cpp') diff --git a/tools/slang-unit-test/unit-test-glsl-compile.cpp b/tools/slang-unit-test/unit-test-glsl-compile.cpp index 5a49da91b..288764295 100644 --- a/tools/slang-unit-test/unit-test-glsl-compile.cpp +++ b/tools/slang-unit-test/unit-test-glsl-compile.cpp @@ -26,7 +26,9 @@ SLANG_UNIT_TEST(glslCompile) } )"; ComPtr globalSession; - SLANG_CHECK(slang_createGlobalSession(SLANG_API_VERSION, globalSession.writeRef()) == SLANG_OK); + SlangGlobalSessionDesc globalDesc = {}; + globalDesc.enableGLSL = true; + SLANG_CHECK(slang_createGlobalSession2(&globalDesc, globalSession.writeRef()) == SLANG_OK); slang::TargetDesc targetDesc = {}; targetDesc.format = SLANG_SPIRV; targetDesc.profile = globalSession->findProfile("spirv_1_5"); -- cgit v1.2.3