diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-05-05 17:15:10 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-05-05 17:15:10 +0000 |
| commit | c9655a6749434bb463d615754cbb910c7183c49e (patch) | |
| tree | d856b68ba47521b1389147627468626cc8960298 /Graphics/GraphicsEngine | |
| parent | Fixed overload of WindowsStoreFile::Read() function (diff) | |
| download | DiligentCore-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.h | 7 |
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: |
