diff options
| author | Yong He <yonghe@outlook.com> | 2021-04-29 14:19:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-29 14:19:51 -0700 |
| commit | 2482271fffbe85efc1bd7efcf74a76f6ed436012 (patch) | |
| tree | 707da083c8eda527b7c548d636cb884cf53c53eb /tools/gfx/renderer-shared.h | |
| parent | ad6f3070251f25cf022c231b8567d78e98061127 (diff) | |
`gfx` DebugCallback and debug layer. (#1822)
* `gfx` DebugCallback and debug layer.
Diffstat (limited to 'tools/gfx/renderer-shared.h')
| -rw-r--r-- | tools/gfx/renderer-shared.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/gfx/renderer-shared.h b/tools/gfx/renderer-shared.h index ed045c617..9aedc8c74 100644 --- a/tools/gfx/renderer-shared.h +++ b/tools/gfx/renderer-shared.h @@ -25,7 +25,7 @@ struct GfxGUID static const Slang::Guid IID_IBufferResource; static const Slang::Guid IID_ITextureResource; static const Slang::Guid IID_IInputLayout; - static const Slang::Guid IID_IRenderer; + static const Slang::Guid IID_IDevice; static const Slang::Guid IID_IShaderObjectLayout; static const Slang::Guid IID_IShaderObject; static const Slang::Guid IID_IRenderPassLayout; @@ -606,4 +606,18 @@ public: Slang::Dictionary<slang::TypeReflection*, Slang::RefPtr<ShaderObjectLayoutBase>> m_shaderObjectLayoutCache; }; +IDebugCallback*& _getDebugCallback(); +IDebugCallback* _getNullDebugCallback(); +inline IDebugCallback* getDebugCallback() +{ + auto rs = _getDebugCallback(); + if (rs) + { + return rs; + } + else + { + return _getNullDebugCallback(); + } +} } |
