From 937891cc65efa6943f15f3758713439f25489da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Mon, 10 Jun 2019 11:56:39 +0200 Subject: [PATCH] dxgi: Improve tracing in dxgi_adapter_QueryVideoMemoryInfo(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/dxgi/adapter.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/dlls/dxgi/adapter.c b/dlls/dxgi/adapter.c index 859c24a105e..d2fc629c843 100644 --- a/dlls/dxgi/adapter.c +++ b/dlls/dxgi/adapter.c @@ -291,14 +291,18 @@ static void STDMETHODCALLTYPE dxgi_adapter_UnregisterHardwareContentProtectionTe } static HRESULT STDMETHODCALLTYPE dxgi_adapter_QueryVideoMemoryInfo(IWineDXGIAdapter *iface, - UINT node_index, DXGI_MEMORY_SEGMENT_GROUP segment_group, DXGI_QUERY_VIDEO_MEMORY_INFO *memory_info) + UINT node_index, DXGI_MEMORY_SEGMENT_GROUP segment_group, DXGI_QUERY_VIDEO_MEMORY_INFO *info) { struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface); struct wined3d_adapter_identifier adapter_id; + static unsigned int once; HRESULT hr; - FIXME("iface %p, node_index %u, segment_group %#x, memory_info %p partial stub!\n", - iface, node_index, segment_group, memory_info); + TRACE("iface %p, node_index %u, segment_group %#x, info %p.\n", + iface, node_index, segment_group, info); + + if (!once++) + FIXME("Returning fake video memory info.\n"); if (node_index) FIXME("Ignoring node index %u.\n", node_index); @@ -313,26 +317,30 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_QueryVideoMemoryInfo(IWineDXGIAdap switch (segment_group) { case DXGI_MEMORY_SEGMENT_GROUP_LOCAL: - memory_info->Budget = adapter_id.video_memory; - memory_info->CurrentUsage = 0; - memory_info->AvailableForReservation = adapter_id.video_memory / 2; - memory_info->CurrentReservation = 0; + info->Budget = adapter_id.video_memory; + info->CurrentUsage = 0; + info->AvailableForReservation = adapter_id.video_memory / 2; + info->CurrentReservation = 0; break; case DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL: - memset(memory_info, 0, sizeof(*memory_info)); + memset(info, 0, sizeof(*info)); break; default: WARN("Invalid memory segment group %#x.\n", segment_group); return E_INVALIDARG; } + TRACE("Budget 0x%s, usage 0x%s, available for reservation 0x%s, reservation 0x%s.\n", + wine_dbgstr_longlong(info->Budget), wine_dbgstr_longlong(info->CurrentUsage), + wine_dbgstr_longlong(info->AvailableForReservation), wine_dbgstr_longlong(info->CurrentReservation)); + return hr; } static HRESULT STDMETHODCALLTYPE dxgi_adapter_SetVideoMemoryReservation(IWineDXGIAdapter *iface, UINT node_index, DXGI_MEMORY_SEGMENT_GROUP segment_group, UINT64 reservation) { - FIXME("iface %p, node_index %u, segment_group %#x, reservation %s stub!\n", + FIXME("iface %p, node_index %u, segment_group %#x, reservation 0x%s stub!\n", iface, node_index, segment_group, wine_dbgstr_longlong(reservation)); return S_OK;