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.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/gfx/render-graphics-common.h') diff --git a/tools/gfx/render-graphics-common.h b/tools/gfx/render-graphics-common.h index 3a07f2993..f4d9567e3 100644 --- a/tools/gfx/render-graphics-common.h +++ b/tools/gfx/render-graphics-common.h @@ -2,9 +2,11 @@ #include "tools/gfx/render.h" #include "core/slang-basic.h" +#include "tools/gfx/slang-context.h" namespace gfx { + class GraphicsCommonProgramLayout; class GraphicsCommonShaderProgram : public IShaderProgram, public Slang::RefObject @@ -32,6 +34,8 @@ public: virtual SLANG_NO_THROW Result SLANG_MCALL getFeatures( const char** outFeatures, UInt bufferSize, UInt* outFeatureCount) SLANG_OVERRIDE; virtual SLANG_NO_THROW bool SLANG_MCALL hasFeature(const char* featureName) SLANG_OVERRIDE; + virtual SLANG_NO_THROW Result SLANG_MCALL getSlangSession(slang::ISession** outSlangSession) SLANG_OVERRIDE; + virtual SLANG_NO_THROW Result SLANG_MCALL createShaderObjectLayout( slang::TypeLayoutReflection* typeLayout, IShaderObjectLayout** outLayout) SLANG_OVERRIDE; virtual SLANG_NO_THROW Result SLANG_MCALL @@ -51,6 +55,7 @@ public: protected: Slang::List m_features; + SlangContext slangContext; }; struct GfxGUID -- cgit v1.2.3