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. --- source/slangc/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/slangc/main.cpp') diff --git a/source/slangc/main.cpp b/source/slangc/main.cpp index 2090b0412..718de6968 100644 --- a/source/slangc/main.cpp +++ b/source/slangc/main.cpp @@ -100,7 +100,9 @@ SLANG_TEST_TOOL_API SlangResult innerMain( else if (!session) { // Just create the global session in the regular way if there isn't one set - SLANG_RETURN_ON_FAIL(slang_createGlobalSession(SLANG_API_VERSION, session.writeRef())); + SlangGlobalSessionDesc desc = {}; + desc.enableGLSL = true; + SLANG_RETURN_ON_FAIL(slang_createGlobalSession2(&desc, session.writeRef())); } if (!shouldEmbedPrelude(argv, argc)) -- cgit v1.2.3