diff options
| author | Yong He <yonghe@outlook.com> | 2021-01-27 10:02:44 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-27 10:02:44 -0800 |
| commit | 615dfba810964bed1caad8ecb87850c8eb1544b4 (patch) | |
| tree | 3fefe8c801a15213ca16eb947ce305a5ed69c6fa /tools/gfx/render-graphics-common.cpp | |
| parent | a90c850735664e2928e4cc961442a126c6859b97 (diff) | |
Make own a slang session. (#1678)
Diffstat (limited to 'tools/gfx/render-graphics-common.cpp')
| -rw-r--r-- | tools/gfx/render-graphics-common.cpp | 7 |
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 |
