summaryrefslogtreecommitdiffstats
path: root/tools/gfx/renderer-shared.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-03-10 10:58:15 -0800
committerGitHub <noreply@github.com>2021-03-10 10:58:15 -0800
commit6ef4054f8a8aea4ec61481057fa7e16aaecde6d7 (patch)
tree66edcae112faff7276c2595865463698bde277fd /tools/gfx/renderer-shared.h
parent2765861cdc104e6104a31cf9e20800b8d1dfae26 (diff)
Swapchain resize and rename to `IDevice` (#1741)
* Swapchain resize * Fix.
Diffstat (limited to 'tools/gfx/renderer-shared.h')
-rw-r--r--tools/gfx/renderer-shared.h13
1 files changed, 8 insertions, 5 deletions
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;