From e34833843c7c4b18a38bc6e8d63b538130661ad7 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 13 Dec 2018 12:53:46 +0000 Subject: [PATCH] Explicitly disable RT feature query & D3D12.3 (?) interfaces --- renderdoc/driver/d3d12/d3d12_commands.cpp | 5 +++++ renderdoc/driver/d3d12/d3d12_device.cpp | 5 +++++ renderdoc/driver/d3d12/d3d12_device_wrap.cpp | 12 ++++++++++++ 3 files changed, 22 insertions(+) diff --git a/renderdoc/driver/d3d12/d3d12_commands.cpp b/renderdoc/driver/d3d12/d3d12_commands.cpp index 9af378ff3..df89a415e 100644 --- a/renderdoc/driver/d3d12/d3d12_commands.cpp +++ b/renderdoc/driver/d3d12/d3d12_commands.cpp @@ -994,6 +994,11 @@ HRESULT STDMETHODCALLTYPE WrappedID3D12GraphicsCommandList2::QueryInterface(REFI AddRef(); return S_OK; } + else if(riid == __uuidof(ID3D12GraphicsCommandList3)) + { + RDCERR("ID3D12GraphicsCommandList3 not supported"); + return E_NOINTERFACE; + } else if(riid == __uuidof(ID3D12CommandList)) { *ppvObject = (ID3D12CommandList *)this; diff --git a/renderdoc/driver/d3d12/d3d12_device.cpp b/renderdoc/driver/d3d12/d3d12_device.cpp index 69f1eb3c9..3b2998b47 100644 --- a/renderdoc/driver/d3d12/d3d12_device.cpp +++ b/renderdoc/driver/d3d12/d3d12_device.cpp @@ -576,6 +576,11 @@ HRESULT WrappedID3D12Device::QueryInterface(REFIID riid, void **ppvObject) return E_NOINTERFACE; } } + else if(riid == __uuidof(ID3D12Device4)) + { + RDCERR("ID3D12Device4 not supported"); + return E_NOINTERFACE; + } else if(riid == __uuidof(ID3D12InfoQueue)) { RDCWARN( diff --git a/renderdoc/driver/d3d12/d3d12_device_wrap.cpp b/renderdoc/driver/d3d12/d3d12_device_wrap.cpp index 0fa8a6dea..ce491d862 100644 --- a/renderdoc/driver/d3d12/d3d12_device_wrap.cpp +++ b/renderdoc/driver/d3d12/d3d12_device_wrap.cpp @@ -2432,6 +2432,18 @@ HRESULT WrappedID3D12Device::CheckFeatureSupport(D3D12_FEATURE Feature, void *pF return S_OK; } + if(Feature == D3D12_FEATURE_D3D12_OPTIONS5) + { + D3D12_FEATURE_DATA_D3D12_OPTIONS5 *opts = + (D3D12_FEATURE_DATA_D3D12_OPTIONS5 *)pFeatureSupportData; + if(FeatureSupportDataSize != sizeof(D3D12_FEATURE_DATA_D3D12_OPTIONS5)) + return E_INVALIDARG; + + // don't support raytracing + opts->RaytracingTier = D3D12_RAYTRACING_TIER_NOT_SUPPORTED; + + return S_OK; + } return m_pDevice->CheckFeatureSupport(Feature, pFeatureSupportData, FeatureSupportDataSize); }