summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-09-18 20:57:37 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-09-18 20:57:37 +0000
commit9599613c63f7b415c102a03fc406b4152c4858ef (patch)
treed6b9b7e1fb8d651c568a52aa1f3363a9d7e8ff02 /Graphics/GraphicsEngine
parentFixed gcc/clang error (diff)
downloadDiligentCore-9599613c63f7b415c102a03fc406b4152c4858ef.tar.gz
DiligentCore-9599613c63f7b415c102a03fc406b4152c4858ef.zip
Updated ShaderResourceBindingBase: using PSO implementation type for the pointers
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/ShaderResourceBindingBase.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngine/include/ShaderResourceBindingBase.hpp b/Graphics/GraphicsEngine/include/ShaderResourceBindingBase.hpp
index 30546842..f9adfe40 100644
--- a/Graphics/GraphicsEngine/include/ShaderResourceBindingBase.hpp
+++ b/Graphics/GraphicsEngine/include/ShaderResourceBindingBase.hpp
@@ -47,7 +47,9 @@ namespace Diligent
/// \tparam BaseInterface - base interface that this class will inheret
/// (Diligent::IShaderResourceBindingGL, Diligent::IShaderResourceBindingD3D11,
/// Diligent::IShaderResourceBindingD3D12 or Diligent::IShaderResourceBindingVk).
-template <class BaseInterface>
+/// \tparam PipelineStateImplType - Type of the pipeline state implementation
+/// (Diligent::PipelineStateD3D12Impl, Diligent::PipelineStateVkImpl, etc.)
+template <class BaseInterface, class PipelineStateImplType>
class ShaderResourceBindingBase : public ObjectBase<BaseInterface>
{
public:
@@ -57,7 +59,7 @@ public:
/// \param pPSO - pipeline state that this SRB belongs to.
/// \param IsInternal - flag indicating if the shader resource binding is an internal PSO object and
/// must not keep a strong reference to the PSO.
- ShaderResourceBindingBase(IReferenceCounters* pRefCounters, IPipelineState* pPSO, bool IsInternal = false) :
+ ShaderResourceBindingBase(IReferenceCounters* pRefCounters, PipelineStateImplType* pPSO, bool IsInternal = false) :
TObjectBase{pRefCounters},
m_spPSO{IsInternal ? nullptr : pPSO},
m_pPSO{pPSO}
@@ -150,8 +152,8 @@ protected:
/// Strong reference to PSO. We must use strong reference, because
/// shader resource binding uses PSO's memory allocator to allocate
/// memory for shader resource cache.
- RefCntAutoPtr<IPipelineState> m_spPSO;
- IPipelineState* const m_pPSO;
+ RefCntAutoPtr<PipelineStateImplType> m_spPSO;
+ PipelineStateImplType* const m_pPSO;
};
} // namespace Diligent