From 9599613c63f7b415c102a03fc406b4152c4858ef Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 18 Sep 2020 13:57:37 -0700 Subject: Updated ShaderResourceBindingBase: using PSO implementation type for the pointers --- Graphics/GraphicsEngine/include/ShaderResourceBindingBase.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Graphics/GraphicsEngine') 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 +/// \tparam PipelineStateImplType - Type of the pipeline state implementation +/// (Diligent::PipelineStateD3D12Impl, Diligent::PipelineStateVkImpl, etc.) +template class ShaderResourceBindingBase : public ObjectBase { 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 m_spPSO; - IPipelineState* const m_pPSO; + RefCntAutoPtr m_spPSO; + PipelineStateImplType* const m_pPSO; }; } // namespace Diligent -- cgit v1.2.3