From 615dfba810964bed1caad8ecb87850c8eb1544b4 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 27 Jan 2021 10:02:44 -0800 Subject: Make own a slang session. (#1678) --- tools/gfx/render-graphics-common.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/gfx/render-graphics-common.cpp') diff --git a/tools/gfx/render-graphics-common.cpp b/tools/gfx/render-graphics-common.cpp index 593d4708c..adc943d1d 100644 --- a/tools/gfx/render-graphics-common.cpp +++ b/tools/gfx/render-graphics-common.cpp @@ -1372,6 +1372,13 @@ SLANG_NO_THROW bool SLANG_MCALL gfx::GraphicsAPIRenderer::hasFeature(const char* return m_features.findFirstIndex([&](Slang::String x) { return x == featureName; }) != -1; } +SLANG_NO_THROW Result SLANG_MCALL gfx::GraphicsAPIRenderer::getSlangSession(slang::ISession** outSlangSession) +{ + *outSlangSession = slangContext.session.get(); + slangContext.session->addRef(); + return SLANG_OK; +} + GraphicsCommonShaderProgram::~GraphicsCommonShaderProgram() { // Note: It might not seem like this destructor is needed at all, since -- cgit v1.2.3