From b73b91a5c99f08154ba77c4b57f51f53f0983ad8 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 27 Sep 2018 07:31:30 +0200 Subject: [PATCH] [dxgi] Implement slightly better QueryResourceResidency stub This now returns redidency values for all queried resources, but not the correct ons. May fix issues in Fallout 4? --- src/dxgi/dxgi_device.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/dxgi/dxgi_device.cpp b/src/dxgi/dxgi_device.cpp index a675198e..65ef0ec2 100644 --- a/src/dxgi/dxgi_device.cpp +++ b/src/dxgi/dxgi_device.cpp @@ -97,8 +97,18 @@ namespace dxvk { IUnknown* const* ppResources, DXGI_RESIDENCY* pResidencyStatus, UINT NumResources) { - Logger::err("DxgiDevice::QueryResourceResidency: Not implemented"); - return E_NOTIMPL; + static bool s_errorShown = false; + + if (!std::exchange(s_errorShown, true)) + Logger::err("DxgiDevice::QueryResourceResidency: Stub"); + + if (!ppResources || !pResidencyStatus) + return E_INVALIDARG; + + for (uint32_t i = 0; i < NumResources; i++) + pResidencyStatus[i] = DXGI_RESIDENCY_FULLY_RESIDENT; + + return S_OK; }