From c9655a6749434bb463d615754cbb910c7183c49e Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 5 May 2019 10:15:10 -0700 Subject: Added safe check that same PSO is being bound --- Graphics/GraphicsEngine/include/DeviceObjectBase.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/include/DeviceObjectBase.h b/Graphics/GraphicsEngine/include/DeviceObjectBase.h index 7d83d025..8f301d6a 100644 --- a/Graphics/GraphicsEngine/include/DeviceObjectBase.h +++ b/Graphics/GraphicsEngine/include/DeviceObjectBase.h @@ -146,6 +146,13 @@ public: return m_UniqueID.GetID(); } + static bool IsSameObject(DeviceObjectBase* pObj1, DeviceObjectBase* pObj2) + { + UniqueIdentifier Id1 = (pObj1 != nullptr) ? pObj1->GetUniqueID() : 0; + UniqueIdentifier Id2 = (pObj2 != nullptr) ? pObj2->GetUniqueID() : 0; + return Id1 == Id2; + } + RenderDeviceImplType* GetDevice()const{return m_pDevice;} protected: -- cgit v1.2.3