diff --git a/src/kosmickrisp/vulkan/kk_query_pool.c b/src/kosmickrisp/vulkan/kk_query_pool.c index ed52d26b99c..60d252c1573 100644 --- a/src/kosmickrisp/vulkan/kk_query_pool.c +++ b/src/kosmickrisp/vulkan/kk_query_pool.c @@ -254,10 +254,13 @@ kk_CmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, { VK_FROM_HANDLE(kk_cmd_buffer, cmd, commandBuffer); VK_FROM_HANDLE(kk_query_pool, pool, queryPool); + /* Need to flush other availabilities just in case there is a reset after it + * was made available but the writes have not propagated yet. Need to avoid + * data rances in the writes. This is save to do sice vkCmdResetQueryPool + * cannot be called when a render pass is active. */ + upload_queue_writes(cmd); emit_zero_queries(cmd, pool, firstQuery, queryCount, false); - /* If we are not mid encoder, just upload the writes */ - if (cmd->encoder->main.last_used == KK_ENC_NONE) - upload_queue_writes(cmd); + upload_queue_writes(cmd); } VKAPI_ATTR void VKAPI_CALL