From f2d461ab5bbe376a25c4ae68eb0b3387bf0281a3 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 16 Sep 2019 12:18:39 +0200 Subject: [PATCH] [d3d11] Prevent log spam from repeated Get/SetResourceMinLOD calls --- src/d3d11/d3d11_context.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 210fee957..cef6210f9 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -1255,12 +1255,19 @@ namespace dxvk { void STDMETHODCALLTYPE D3D11DeviceContext::SetResourceMinLOD( ID3D11Resource* pResource, FLOAT MinLOD) { - Logger::err("D3D11DeviceContext::SetResourceMinLOD: Not implemented"); + bool s_errorShown = false; + + if (std::exchange(s_errorShown, true)) + Logger::err("D3D11DeviceContext::SetResourceMinLOD: Not implemented"); } FLOAT STDMETHODCALLTYPE D3D11DeviceContext::GetResourceMinLOD(ID3D11Resource* pResource) { - Logger::err("D3D11DeviceContext::GetResourceMinLOD: Not implemented"); + bool s_errorShown = false; + + if (std::exchange(s_errorShown, true)) + Logger::err("D3D11DeviceContext::GetResourceMinLOD: Not implemented"); + return 0.0f; }