added D3D11Device5 checks + fixed QueryInterface calls

This commit is contained in:
Florian Bagar
2019-09-30 09:30:02 +02:00
committed by Baldur Karlsson
parent 76622f65aa
commit d84136fe29
3 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -469,7 +469,7 @@ public:
{
if(iid == __uuidof(ID3D11Device) || iid == __uuidof(ID3D11Device1) ||
iid == __uuidof(ID3D11Device2) || iid == __uuidof(ID3D11Device3) ||
iid == __uuidof(ID3D11Device4))
iid == __uuidof(ID3D11Device4) || iid == __uuidof(ID3D11Device5))
return true;
return false;
@@ -486,6 +486,8 @@ public:
return (ID3D11Device3 *)this;
else if(iid == __uuidof(ID3D11Device4))
return (ID3D11Device4 *)this;
else if(iid == __uuidof(ID3D11Device5))
return (ID3D11Device5 *)this;
RDCERR("Requested unknown device interface %s", ToStr(iid).c_str());
@@ -873,4 +875,4 @@ public:
REFIID riid, void **ppFence);
virtual HRESULT STDMETHODCALLTYPE OpenSharedFence(HANDLE hFence, REFIID riid, void **ppFence);
};
};
+2 -2
View File
@@ -193,7 +193,7 @@ public:
riid == __uuidof(IDXGIResource1) || riid == __uuidof(IDXGISurface2))
{
// ensure the real object has this interface
void *outObj;
void *outObj = NULL;
HRESULT hr = m_pReal->QueryInterface(riid, &outObj);
IUnknown *unk = (IUnknown *)outObj;
@@ -1495,4 +1495,4 @@ template <>
inline ResourceId GetIDForResource(ID3D11View *v)
{
return GetIDForDeviceChild(v);
}
}
+1 -1
View File
@@ -228,7 +228,7 @@ public:
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject)
{
// ensure the real object has this interface
void *outObj;
void *outObj = NULL;
HRESULT hr = m_pWrapped->QueryInterface(riid, &outObj);
IUnknown *unk = (IUnknown *)outObj;