From 6ef4054f8a8aea4ec61481057fa7e16aaecde6d7 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 10 Mar 2021 10:58:15 -0800 Subject: Swapchain resize and rename to `IDevice` (#1741) * Swapchain resize * Fix. --- tools/gfx/renderer-shared.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tools/gfx/renderer-shared.h') diff --git a/tools/gfx/renderer-shared.h b/tools/gfx/renderer-shared.h index 5846aad34..9fe9768f4 100644 --- a/tools/gfx/renderer-shared.h +++ b/tools/gfx/renderer-shared.h @@ -99,7 +99,10 @@ protected: Desc m_desc; }; -Result createProgramFromSlang(IRenderer* renderer, IShaderProgram::Desc const& desc, IShaderProgram** outProgram); +Result createProgramFromSlang( + IDevice* device, + IShaderProgram::Desc const& desc, + IShaderProgram** outProgram); class RendererBase; @@ -147,7 +150,7 @@ protected: ShaderComponentID m_componentID = 0; public: - RendererBase* getRenderer() { return m_renderer; } + RendererBase* getDevice() { return m_renderer; } slang::TypeLayoutReflection* getElementTypeLayout() { @@ -191,7 +194,7 @@ public: // this function will return a specialized type using the bound sub-objects' type as specialization argument. virtual Result getSpecializedShaderObjectType(ExtendedShaderObjectType* outType); - RendererBase* getRenderer() { return m_layout->getRenderer(); } + RendererBase* getRenderer() { return m_layout->getDevice(); } SLANG_NO_THROW UInt SLANG_MCALL getEntryPointCount() SLANG_OVERRIDE { return 0; } @@ -369,7 +372,7 @@ protected: // Renderer implementation shared by all platforms. // Responsible for shader compilation, specialization and caching. -class RendererBase : public Slang::RefObject, public IRenderer +class RendererBase : public Slang::RefObject, public IDevice { friend class ShaderObjectBase; public: @@ -379,7 +382,7 @@ public: 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; - IRenderer* getInterface(const Slang::Guid& guid); + IDevice* getInterface(const Slang::Guid& guid); virtual SLANG_NO_THROW Result SLANG_MCALL createShaderObject(slang::TypeReflection* type, IShaderObject** outObject) SLANG_OVERRIDE; -- cgit v1.2.3