summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp b/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp
index 85c3fcd1..68d4aa8a 100644
--- a/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp
+++ b/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp
@@ -87,6 +87,12 @@ public:
// Shader variable manager implementation type (ShaderVariableManagerD3D12, ShaderVariableManagerVk, etc.)
using ShaderVariableManagerImplType = typename EngineImplTraits::ShaderVariableManagerImplType;
+ // Shader resource binding implementation type (ShaderResourceBindingD3D12Impl, ShaderResourceBindingVkImpl, etc.)
+ using ShaderResourceBindingImplType = typename EngineImplTraits::ShaderResourceBindingImplType;
+
+ // Pipeline resource signature implementation type (PipelineResourceSignatureD3D12Impl, PipelineResourceSignatureVkImpl, etc.)
+ using PipelineResourceSignatureImplType = typename EngineImplTraits::PipelineResourceSignatureImplType;
+
using TDeviceObjectBase = DeviceObjectBase<BaseInterface, RenderDeviceImplType, PipelineResourceSignatureDesc>;
/// \param pRefCounters - Reference counters object that controls the lifetime of this resource signature.
@@ -522,6 +528,17 @@ protected:
pSRB->SetStaticResourcesInitialized();
}
+ void CreateShaderResourceBindingImpl(IShaderResourceBinding** ppShaderResourceBinding,
+ bool InitStaticResources)
+ {
+ auto* pThisImpl{static_cast<PipelineResourceSignatureImplType*>(this)};
+ auto& SRBAllocator{pThisImpl->m_pDevice->GetSRBAllocator()};
+ auto* pResBindingImpl{NEW_RC_OBJ(SRBAllocator, "ShaderResourceBinding instance", ShaderResourceBindingImplType)(pThisImpl)};
+ if (InitStaticResources)
+ pThisImpl->InitializeStaticSRBResources(pResBindingImpl);
+ pResBindingImpl->QueryInterface(IID_ShaderResourceBinding, reinterpret_cast<IObject**>(ppShaderResourceBinding));
+ }
+
// Finds a sampler that is assigned to texture Tex, when combined texture samplers are used.
// Returns an index of the sampler in m_Desc.Resources array, or InvalidSamplerValue if there is
// no such sampler, or if combined samplers are not used.