diff --git a/src/gpgmm/d3d12/ResidencyManagerD3D12.cpp b/src/gpgmm/d3d12/ResidencyManagerD3D12.cpp index bdcb0cc60..d4fade91e 100644 --- a/src/gpgmm/d3d12/ResidencyManagerD3D12.cpp +++ b/src/gpgmm/d3d12/ResidencyManagerD3D12.cpp @@ -825,9 +825,10 @@ namespace gpgmm::d3d12 { // asynchronous MakeResident, called EnqueueMakeResident, instead first. Should // EnqueueMakeResident fail, fall-back to using synchronous MakeResident since we may be // able to continue after calling Evict again. - if (mDevice3 != nullptr) { + ComPtr device3; + if (SUCCEEDED(mDevice->QueryInterface(IID_PPV_ARGS(&device3)))) { ReturnIfFailed(EnsureResidencyFenceExists()); - ReturnIfSucceeded(mDevice3->EnqueueMakeResident( + ReturnIfSucceeded(device3->EnqueueMakeResident( D3D12_RESIDENCY_FLAG_NONE, numberOfObjectsToMakeResident, allocations, mResidencyFence->GetFence(), mResidencyFence->GetLastSignaledFence() + 1)); } diff --git a/src/gpgmm/d3d12/ResidencyManagerD3D12.h b/src/gpgmm/d3d12/ResidencyManagerD3D12.h index 625664f2a..6cba19364 100644 --- a/src/gpgmm/d3d12/ResidencyManagerD3D12.h +++ b/src/gpgmm/d3d12/ResidencyManagerD3D12.h @@ -121,7 +121,6 @@ namespace gpgmm::d3d12 { HRESULT EnsureResidencyFenceExists(); ID3D12Device* mDevice = nullptr; - ID3D12Device3* mDevice3 = nullptr; IDXGIAdapter3* mAdapter = nullptr; const float mMaxPctOfVideoMemoryToBudget;