From 42c1ae07534506fb044e68baa1c26046935fedb3 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 15 Nov 2018 17:20:21 +0000 Subject: [PATCH] Block requests for ID3D12Device or ID3D11VideoDevice* on ID3D11Device --- renderdoc/driver/d3d11/d3d11_device.cpp | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/renderdoc/driver/d3d11/d3d11_device.cpp b/renderdoc/driver/d3d11/d3d11_device.cpp index fb8ab5e92..aa0ab7d95 100644 --- a/renderdoc/driver/d3d11/d3d11_device.cpp +++ b/renderdoc/driver/d3d11/d3d11_device.cpp @@ -398,6 +398,10 @@ HRESULT WrappedID3D11Device::QueryInterface(REFIID riid, void **ppvObject) static const GUID ID3D10Device_uuid = { 0x9b7e4c0f, 0x342c, 0x4106, {0xa1, 0x9f, 0x4f, 0x27, 0x04, 0xf6, 0x89, 0xf0}}; + // ID3D12Device UUID {189819f1-1db6-4b57-be54-1821339b85f7} + static const GUID ID3D12Device_uuid = { + 0x189819f1, 0x1db6, 0x4b57, {0xbe, 0x54, 0x18, 0x21, 0x33, 0x9b, 0x85, 0xf7}}; + // ID3D11ShaderTraceFactory UUID {1fbad429-66ab-41cc-9617-667ac10e4459} static const GUID ID3D11ShaderTraceFactory_uuid = { 0x1fbad429, 0x66ab, 0x41cc, {0x96, 0x17, 0x66, 0x7a, 0xc1, 0x0e, 0x44, 0x59}}; @@ -494,6 +498,12 @@ HRESULT WrappedID3D11Device::QueryInterface(REFIID riid, void **ppvObject) *ppvObject = NULL; return E_NOINTERFACE; } + else if(riid == ID3D12Device_uuid) + { + RDCWARN("Trying to get ID3D12Device - not supported."); + *ppvObject = NULL; + return E_NOINTERFACE; + } else if(riid == IDirect3DDevice9_uuid) { RDCWARN("Trying to get IDirect3DDevice9 - not supported."); @@ -640,6 +650,24 @@ HRESULT WrappedID3D11Device::QueryInterface(REFIID riid, void **ppvObject) *ppvObject = (IUnknown *)this; return S_OK; } + else if(riid == __uuidof(ID3D11VideoDevice)) + { + RDCWARN("Trying to get ID3D11VideoDevice - not supported."); + *ppvObject = NULL; + return E_NOINTERFACE; + } + else if(riid == __uuidof(ID3D11VideoDevice1)) + { + RDCWARN("Trying to get ID3D11VideoDevice - not supported."); + *ppvObject = NULL; + return E_NOINTERFACE; + } + else if(riid == __uuidof(ID3D11VideoDevice2)) + { + RDCWARN("Trying to get ID3D11VideoDevice - not supported."); + *ppvObject = NULL; + return E_NOINTERFACE; + } else { WarnUnknownGUID("ID3D11Device", riid);