diff options
| author | Yong He <yonghe@outlook.com> | 2020-12-10 09:43:09 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-10 09:43:09 -0800 |
| commit | e4a8251749cf1fbf005b045e26e25f3ef7cccb8b (patch) | |
| tree | 209bb9617acb91c9cc1a9cc14f9aab5e92ca9871 /tools/gfx/render-graphics-common.h | |
| parent | b8e1f62fb9cc66481b35231149448e47f096d257 (diff) | |
Move ShaderObject to be under renderer interface. (#1633)
* Move ShaderObject to be under renderer interface.
* Make `create*PipelineState` take `const PipelineStateDesc&`.
* Move ShaderCursor implementation to a cpp file
Diffstat (limited to 'tools/gfx/render-graphics-common.h')
| -rw-r--r-- | tools/gfx/render-graphics-common.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/gfx/render-graphics-common.h b/tools/gfx/render-graphics-common.h new file mode 100644 index 000000000..5bb4cb59e --- /dev/null +++ b/tools/gfx/render-graphics-common.h @@ -0,0 +1,22 @@ +#pragma once + +#include "tools/gfx/render.h" + +namespace gfx +{ + +class GraphicsAPIRenderer : public Renderer +{ +public: + virtual Result createShaderObjectLayout( + slang::TypeLayoutReflection* typeLayout, ShaderObjectLayout** outLayout) SLANG_OVERRIDE; + virtual Result createRootShaderObjectLayout( + slang::ProgramLayout* programLayout, ShaderObjectLayout** outLayout) SLANG_OVERRIDE; + virtual Result createShaderObject(ShaderObjectLayout* layout, ShaderObject** outObject) SLANG_OVERRIDE; + virtual Result createRootShaderObject(ShaderObjectLayout* rootLayout, ShaderObject** outObject) SLANG_OVERRIDE; + virtual Result bindRootShaderObject(PipelineType pipelineType, ShaderObject* object) SLANG_OVERRIDE; + void preparePipelineDesc(GraphicsPipelineStateDesc& desc); + void preparePipelineDesc(ComputePipelineStateDesc& desc); +}; + +} |
