1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 01:54:16 +01:00

[d3d11] Fix log spam when an application uses DiscardView

We don't support this method, but we should only issue the warning
once to prevent poor performance.
This commit is contained in:
Philip Rebohle 2018-07-08 15:53:30 +02:00
parent 4d1a70bd89
commit c8c6f24b63
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -62,18 +62,27 @@ namespace dxvk {
}
void STDMETHODCALLTYPE D3D11DeviceContext::DiscardResource(ID3D11Resource * pResource) {
Logger::err("D3D11DeviceContext::DiscardResource: Not implemented");
static bool s_errorShown = false;
if (!std::exchange(s_errorShown, true))
Logger::err("D3D11DeviceContext::DiscardResource: Not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::DiscardView(ID3D11View * pResourceView) {
Logger::err("D3D11DeviceContext::DiscardView: Not implemented");
static bool s_errorShown = false;
if (!std::exchange(s_errorShown, true))
Logger::err("D3D11DeviceContext::DiscardView: Not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::DiscardView1(
ID3D11View* pResourceView,
const D3D11_RECT* pRects,
UINT NumRects) {
Logger::err("D3D11DeviceContext::DiscardView1: Not implemented");
static bool s_errorShown = false;
if (!std::exchange(s_errorShown, true))
Logger::err("D3D11DeviceContext::DiscardView1: Not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::SwapDeviceContextState(