mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-09 09:10:49 +00:00
Disallow querying for internal D3D interface. Closes #2923
* This interface does some undocumented things and then creates unwrapped resources, which can't be wrapped and hooked. Since the interface is not public it can't be wrapped safely, and must be blocked.
This commit is contained in:
@@ -575,6 +575,10 @@ HRESULT WrappedID3D11Device::QueryInterface(REFIID riid, void **ppvObject)
|
||||
static const GUID unwrappedID3D11InfoQueue__uuid = {
|
||||
0x3fc4e618, 0x3f70, 0x452a, {0x8b, 0x8f, 0xa7, 0x3a, 0xcc, 0xb5, 0x8e, 0x3d}};
|
||||
|
||||
// UUID for internal interface that breaks hooks {26C5DC23-E49C-4B0A-8F79-E7B1AC804D32}
|
||||
static const GUID D3DInternal_uuid = {
|
||||
0x26c5dc23, 0xe49c, 0x4b0a, {0x8f, 0x79, 0xe7, 0xb1, 0xac, 0x80, 0x4d, 0x32}};
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
if(riid == __uuidof(IUnknown))
|
||||
@@ -693,6 +697,12 @@ HRESULT WrappedID3D11Device::QueryInterface(REFIID riid, void **ppvObject)
|
||||
*ppvObject = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
else if(riid == D3DInternal_uuid)
|
||||
{
|
||||
RDCWARN("Trying to get internal unsupported D3D interface - not supported.");
|
||||
*ppvObject = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
else if(riid == __uuidof(ID3D11Device1))
|
||||
{
|
||||
if(m_pDevice1)
|
||||
|
||||
Reference in New Issue
Block a user