summaryrefslogtreecommitdiff
path: root/tools/gfx/render-graphics-common.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-12-10 09:43:09 -0800
committerGitHub <noreply@github.com>2020-12-10 09:43:09 -0800
commite4a8251749cf1fbf005b045e26e25f3ef7cccb8b (patch)
tree209bb9617acb91c9cc1a9cc14f9aab5e92ca9871 /tools/gfx/render-graphics-common.h
parentb8e1f62fb9cc66481b35231149448e47f096d257 (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.h22
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);
+};
+
+}