diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/slang-test/test-context.cpp | 5 | ||||
| -rw-r--r-- | tools/slang-unit-test/unit-test-glsl-compile.cpp | 4 | ||||
| -rw-r--r-- | tools/test-server/test-server-main.cpp | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/tools/slang-test/test-context.cpp b/tools/slang-test/test-context.cpp index bb9870dad..685ee1f2e 100644 --- a/tools/slang-test/test-context.cpp +++ b/tools/slang-test/test-context.cpp @@ -85,7 +85,10 @@ SlangResult TestContext::locateFileCheck() Result TestContext::init(const char* inExePath) { - m_session = spCreateSession(nullptr); + SlangGlobalSessionDesc desc = {}; + desc.enableGLSL = true; + slang_createGlobalSession2(&desc, &m_session); + if (!m_session) { return SLANG_FAIL; 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<slang::IGlobalSession> 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"); diff --git a/tools/test-server/test-server-main.cpp b/tools/test-server/test-server-main.cpp index 1f1fbd066..633a23d7e 100644 --- a/tools/test-server/test-server-main.cpp +++ b/tools/test-server/test-server-main.cpp @@ -220,7 +220,9 @@ slang::IGlobalSession* TestServer::getOrCreateGlobalSession() if (!m_session) { // Just create the global session in the regular way if there isn't one set - if (SLANG_FAILED(slang_createGlobalSession(SLANG_API_VERSION, m_session.writeRef()))) + SlangGlobalSessionDesc desc = {}; + desc.enableGLSL = true; + if (SLANG_FAILED(slang_createGlobalSession2(&desc, m_session.writeRef()))) { return nullptr; } |
