wined3d: Don't try to reset query pools if we don't have a command buffer.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51419
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jan Sikorski 2021-08-04 17:25:00 +02:00 committed by Alexandre Julliard
parent b4da140357
commit 9b9f07ca84
1 changed files with 8 additions and 5 deletions

View File

@ -1314,12 +1314,15 @@ void wined3d_context_vk_end_current_render_pass(struct wined3d_context_vk *conte
context_vk->vk_framebuffer = VK_NULL_HANDLE;
}
LIST_FOR_EACH_ENTRY_SAFE(pool_vk, pool_vk_next, &context_vk->completed_query_pools,
struct wined3d_query_pool_vk, completed_entry)
if (vk_command_buffer)
{
list_remove(&pool_vk->completed_entry);
list_init(&pool_vk->completed_entry);
wined3d_query_pool_vk_reset(pool_vk, context_vk, vk_command_buffer);
LIST_FOR_EACH_ENTRY_SAFE(pool_vk, pool_vk_next, &context_vk->completed_query_pools,
struct wined3d_query_pool_vk, completed_entry)
{
list_remove(&pool_vk->completed_entry);
list_init(&pool_vk->completed_entry);
wined3d_query_pool_vk_reset(pool_vk, context_vk, vk_command_buffer);
}
}
}