diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-25 08:39:16 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-25 08:39:16 +0000 |
| commit | 90c56caa809cccccdec4cde3d1705fc4bb94de15 (patch) | |
| tree | 28c006bd7b74fd792577607dc020ae60a7a9bbcd /Graphics/GraphicsEngine | |
| parent | Removed unnecessary conversion from m_pPipelineState to target implementation... (diff) | |
| download | DiligentCore-90c56caa809cccccdec4cde3d1705fc4bb94de15.tar.gz DiligentCore-90c56caa809cccccdec4cde3d1705fc4bb94de15.zip | |
Few improvements to RefCntAutoPtr & DeviceContextBase::SetPipelineState
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/include/DeviceContextBase.h | 9 | ||||
| -rw-r--r-- | Graphics/GraphicsEngine/include/DeviceObjectBase.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.h b/Graphics/GraphicsEngine/include/DeviceContextBase.h index 037e6ba4..4a78a2e8 100644 --- a/Graphics/GraphicsEngine/include/DeviceContextBase.h +++ b/Graphics/GraphicsEngine/include/DeviceContextBase.h @@ -90,9 +90,6 @@ public: inline virtual void InvalidateState()override = 0; - /// Base implementation of IDeviceContext::SetPipelineState(); caches references to the pipeline state object. - inline virtual void SetPipelineState(IPipelineState* pPipelineState)override = 0; - /// Base implementation of IDeviceContext::CommitShaderResources(); validates parameters. inline bool CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, Uint32 Flags, int); @@ -139,6 +136,8 @@ protected: inline bool SetStencilRef(Uint32 StencilRef, int Dummy); + inline void SetPipelineState(PipelineStateImplType* pPipelineState, int /*Dummy*/); + /// Clears all cached resources inline void ClearStateCache(); @@ -257,9 +256,9 @@ inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType } template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType> -inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: SetPipelineState(IPipelineState* pPipelineState) +inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: SetPipelineState(PipelineStateImplType* pPipelineState, int /*Dummy*/) { - m_pPipelineState = ValidatedCast<PipelineStateImplType>(pPipelineState); + m_pPipelineState = pPipelineState; } template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType> diff --git a/Graphics/GraphicsEngine/include/DeviceObjectBase.h b/Graphics/GraphicsEngine/include/DeviceObjectBase.h index a0038e46..b7874487 100644 --- a/Graphics/GraphicsEngine/include/DeviceObjectBase.h +++ b/Graphics/GraphicsEngine/include/DeviceObjectBase.h @@ -85,7 +85,7 @@ public: { // Render device owns allocators for all types of device objects, // so it must be destroyed after all device objects are released. - // Consider the following scenario: an object A ownes last strong + // Consider the following scenario: an object A owns the last strong // reference to the device: // // 1. A::~A() completes |
