summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-05-05 17:15:10 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-05-05 17:15:10 +0000
commitc9655a6749434bb463d615754cbb910c7183c49e (patch)
treed856b68ba47521b1389147627468626cc8960298 /Graphics/GraphicsEngine
parentFixed overload of WindowsStoreFile::Read() function (diff)
downloadDiligentCore-c9655a6749434bb463d615754cbb910c7183c49e.tar.gz
DiligentCore-c9655a6749434bb463d615754cbb910c7183c49e.zip
Added safe check that same PSO is being bound
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/DeviceObjectBase.h7
1 files changed, 7 insertions, 0 deletions
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: