mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Handle querying for ID3D12Pageable on interfaces that support it
This commit is contained in:
@@ -129,14 +129,17 @@ public:
|
||||
AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
if(riid == __uuidof(NestedType))
|
||||
else if(riid == __uuidof(NestedType))
|
||||
{
|
||||
*ppvObject = (NestedType *)this;
|
||||
AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
if(riid == __uuidof(NestedType1) && m_pReal)
|
||||
else if(riid == __uuidof(NestedType1))
|
||||
{
|
||||
if(!m_pReal)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
// check that the real interface supports this
|
||||
NestedType1 *dummy = NULL;
|
||||
HRESULT check = m_pReal->QueryInterface(riid, (void **)&dummy);
|
||||
@@ -150,8 +153,11 @@ public:
|
||||
AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
if(riid == __uuidof(NestedType2) && m_pReal)
|
||||
else if(riid == __uuidof(NestedType2))
|
||||
{
|
||||
if(!m_pReal)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
// check that the real interface supports this
|
||||
NestedType2 *dummy = NULL;
|
||||
HRESULT check = m_pReal->QueryInterface(riid, (void **)&dummy);
|
||||
@@ -165,13 +171,32 @@ public:
|
||||
AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
if(riid == __uuidof(ID3D12Object))
|
||||
else if(riid == __uuidof(ID3D12Pageable))
|
||||
{
|
||||
// not all child classes support this, so check it on the real interface
|
||||
if(!m_pReal)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
// check that the real interface supports this
|
||||
ID3D12Pageable *dummy = NULL;
|
||||
HRESULT check = m_pReal->QueryInterface(riid, (void **)&dummy);
|
||||
|
||||
SAFE_RELEASE(dummy);
|
||||
|
||||
if(FAILED(check))
|
||||
return check;
|
||||
|
||||
*ppvObject = (ID3D12Pageable *)this;
|
||||
AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
else if(riid == __uuidof(ID3D12Object))
|
||||
{
|
||||
*ppvObject = (ID3D12DeviceChild *)this;
|
||||
AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
if(riid == __uuidof(ID3D12DeviceChild))
|
||||
else if(riid == __uuidof(ID3D12DeviceChild))
|
||||
{
|
||||
*ppvObject = (ID3D12DeviceChild *)this;
|
||||
AddRef();
|
||||
|
||||
Reference in New Issue
Block a user