From 3b3bd37f93791d4be825905c3ae5d475fa8505d3 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Tue, 21 Sep 2021 09:51:43 +0100 Subject: [PATCH] vkd3d: Avoid tracking + ending render passes when calling ResolveQueryData with 0 queries Signed-off-by: Joshua Ashton --- libs/vkd3d/command.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 7e283836..f503b03f 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -8492,6 +8492,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveQueryData(d3d12_command_ iface, heap, type, start_index, query_count, dst_buffer, aligned_dst_buffer_offset); + /* Some games call this with a query_count of 0. + * Avoid ending the render pass and doing worthless tracking. */ + if (!query_count) + return; + if (!d3d12_resource_is_buffer(buffer)) { WARN("Destination resource is not a buffer.\n");