Skip to content

Commit

Permalink
[dxgi] Only log QueryInterface errors once
Browse files Browse the repository at this point in the history
  • Loading branch information
doitsujin committed Mar 1, 2023
1 parent 4c78964 commit 55e7cb1
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 12 deletions.
7 changes: 5 additions & 2 deletions src/dxgi/dxgi_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ namespace dxvk {
return S_OK;
}

Logger::warn("DxgiAdapter::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
if (logQueryInterfaceError(__uuidof(IDXGIAdapter), riid)) {
Logger::warn("DxgiAdapter::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
}

return E_NOINTERFACE;
}

Expand Down
7 changes: 5 additions & 2 deletions src/dxgi/dxgi_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,11 @@ namespace dxvk {
return S_OK;
}

Logger::warn("DxgiFactory::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
if (logQueryInterfaceError(__uuidof(IDXGIFactory), riid)) {
Logger::warn("DxgiFactory::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
}

return E_NOINTERFACE;
}

Expand Down
7 changes: 5 additions & 2 deletions src/dxgi/dxgi_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,11 @@ namespace dxvk {
return S_OK;
}

Logger::warn("DxgiOutput::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
if (logQueryInterfaceError(__uuidof(IDXGIOutput), riid)) {
Logger::warn("DxgiOutput::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
}

return E_NOINTERFACE;
}

Expand Down
7 changes: 5 additions & 2 deletions src/dxgi/dxgi_surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ namespace dxvk {
return S_OK;
}

Logger::warn("DxgiSurfaceFactory::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
if (logQueryInterfaceError(__uuidof(IDXGIVkSurfaceFactory), riid)) {
Logger::warn("DxgiSurfaceFactory::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
}

return E_NOINTERFACE;
}

Expand Down
7 changes: 5 additions & 2 deletions src/dxgi/dxgi_swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ namespace dxvk {
return S_OK;
}

Logger::warn("DxgiSwapChain::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
if (logQueryInterfaceError(__uuidof(IDXGISwapChain), riid)) {
Logger::warn("DxgiSwapChain::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
}

return E_NOINTERFACE;
}

Expand Down
7 changes: 5 additions & 2 deletions src/dxgi/dxgi_swapchain_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ namespace dxvk {
return S_OK;
}

Logger::warn("DxgiSwapChainDispatcher::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
if (logQueryInterfaceError(__uuidof(IDXGISwapChain), riid)) {
Logger::warn("DxgiSwapChainDispatcher::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
}

return m_dispatch->QueryInterface(riid, ppvObject);
}

Expand Down

0 comments on commit 55e7cb1

Please sign in to comment.