summaryrefslogtreecommitdiffstats
path: root/tools/gfx/render-graphics-common.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-01-27 10:02:44 -0800
committerGitHub <noreply@github.com>2021-01-27 10:02:44 -0800
commit615dfba810964bed1caad8ecb87850c8eb1544b4 (patch)
tree3fefe8c801a15213ca16eb947ce305a5ed69c6fa /tools/gfx/render-graphics-common.cpp
parenta90c850735664e2928e4cc961442a126c6859b97 (diff)
Make own a slang session. (#1678)
Diffstat (limited to 'tools/gfx/render-graphics-common.cpp')
-rw-r--r--tools/gfx/render-graphics-common.cpp7
1 files changed, 7 insertions, 0 deletions
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