Disable tiled resources for d3d12 check feature

Renderdoc doesn't support TiledResource, as WrappedID3D12Device::CreateReservedResource returns E_NOINTERFACE. This commit reflects the lack of support in WrappedID3D12Device::CheckFeatureSupport.

This allows the application to behave as if the gpu doesn't support
tiled resources.
This commit is contained in:
Calvin Hsu
2020-03-30 21:47:00 +01:00
committed by Baldur Karlsson
parent 55437ee0f9
commit a59f922ef6
@@ -2789,6 +2789,25 @@ HRESULT WrappedID3D12Device::CheckFeatureSupport(D3D12_FEATURE Feature, void *pF
return hr;
}
if(Feature == D3D12_FEATURE_D3D12_OPTIONS)
{
HRESULT hr = m_pDevice->CheckFeatureSupport(Feature, pFeatureSupportData, FeatureSupportDataSize);
if(SUCCEEDED(hr))
{
D3D12_FEATURE_DATA_D3D12_OPTIONS *opts =
(D3D12_FEATURE_DATA_D3D12_OPTIONS *)pFeatureSupportData;
if(FeatureSupportDataSize != sizeof(D3D12_FEATURE_DATA_D3D12_OPTIONS))
return E_INVALIDARG;
// renderdoc doesn't support tiled resources (calls to CreateReservedResource will fail), so don't report it as supported
opts->TiledResourcesTier = D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED;
return S_OK;
}
return hr;
}
return m_pDevice->CheckFeatureSupport(Feature, pFeatureSupportData, FeatureSupportDataSize);
}