From 90c56caa809cccccdec4cde3d1705fc4bb94de15 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 25 Jul 2018 01:39:16 -0700 Subject: Few improvements to RefCntAutoPtr & DeviceContextBase::SetPipelineState --- Graphics/GraphicsEngine/include/DeviceContextBase.h | 9 ++++----- Graphics/GraphicsEngine/include/DeviceObjectBase.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'Graphics/GraphicsEngine') 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 -inline void DeviceContextBase :: SetPipelineState(IPipelineState* pPipelineState) +inline void DeviceContextBase :: SetPipelineState(PipelineStateImplType* pPipelineState, int /*Dummy*/) { - m_pPipelineState = ValidatedCast(pPipelineState); + m_pPipelineState = pPipelineState; } template 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 -- cgit v1.2.3