summaryrefslogtreecommitdiffstats
path: root/tools/gfx/renderer-shared.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-02-05 14:36:07 -0800
committerGitHub <noreply@github.com>2021-02-05 14:36:07 -0800
commitdf7548ef62c02b9ab1cc5addecaa6b6c150f2750 (patch)
tree17081a8d5de3fd3292043aae6761d0c8960e6783 /tools/gfx/renderer-shared.h
parent5fbaccfc1d4ac7d17d528de894d1f276e41d9ce1 (diff)
Shader-Object example (#1694)
Diffstat (limited to 'tools/gfx/renderer-shared.h')
-rw-r--r--tools/gfx/renderer-shared.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/tools/gfx/renderer-shared.h b/tools/gfx/renderer-shared.h
index c4a000e87..26ed5b040 100644
--- a/tools/gfx/renderer-shared.h
+++ b/tools/gfx/renderer-shared.h
@@ -161,9 +161,6 @@ protected:
// The shader object layout used to create this shader object.
Slang::RefPtr<ShaderObjectLayoutBase> m_layout = nullptr;
- // Indicates whether all bindings have been finalized.
- bool m_bindingFinalized = false;
-
// The specialized shader object type.
ExtendedShaderObjectType shaderObjectType = { nullptr, kInvalidComponentID };
public:
@@ -201,8 +198,6 @@ public:
return m_layout->getElementTypeLayout();
}
- SLANG_NO_THROW Result SLANG_MCALL finalizeBindings() SLANG_OVERRIDE;
-
virtual Result collectSpecializationArgs(ExtendedShaderObjectTypeList& args) = 0;
};
@@ -338,20 +333,21 @@ public:
void init(ISlangFileSystem* cacheFileSystem);
void writeToFileSystem(ISlangMutableFileSystem* outputFileSystem);
- Slang::RefPtr<PipelineStateBase> getSpecializedPipelineState(PipelineKey programKey)
+ Slang::ComPtr<IPipelineState> getSpecializedPipelineState(PipelineKey programKey)
{
- Slang::RefPtr<PipelineStateBase> result;
+ Slang::ComPtr<IPipelineState> result;
if (specializedPipelines.TryGetValue(programKey, result))
return result;
return nullptr;
}
Slang::RefPtr<ShaderBinary> tryLoadShaderBinary(ShaderComponentID componentId);
void addShaderBinary(ShaderComponentID componentId, ShaderBinary* binary);
- void addSpecializedPipeline(PipelineKey key, Slang::RefPtr<PipelineStateBase> specializedPipeline);
+ void addSpecializedPipeline(PipelineKey key, Slang::ComPtr<IPipelineState> specializedPipeline);
+
protected:
Slang::ComPtr<ISlangFileSystem> fileSystem;
Slang::OrderedDictionary<OwningComponentKey, ShaderComponentID> componentIds;
- Slang::OrderedDictionary<PipelineKey, Slang::RefPtr<PipelineStateBase>> specializedPipelines;
+ Slang::OrderedDictionary<PipelineKey, Slang::ComPtr<IPipelineState>> specializedPipelines;
Slang::OrderedDictionary<ShaderComponentID, Slang::RefPtr<ShaderBinary>> shaderBinaries;
};