summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/zink/zink_batch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/zink/zink_batch.c')
-rw-r--r--src/gallium/drivers/zink/zink_batch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c
index 2a1e7f8e65b..74700acb340 100644
--- a/src/gallium/drivers/zink/zink_batch.c
+++ b/src/gallium/drivers/zink/zink_batch.c
@@ -3,6 +3,7 @@
#include "zink_context.h"
#include "zink_fence.h"
#include "zink_framebuffer.h"
+#include "zink_query.h"
#include "zink_render_pass.h"
#include "zink_resource.h"
#include "zink_screen.h"
@@ -58,11 +59,17 @@ zink_start_batch(struct zink_context *ctx, struct zink_batch *batch)
cbbi.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
if (vkBeginCommandBuffer(batch->cmdbuf, &cbbi) != VK_SUCCESS)
debug_printf("vkBeginCommandBuffer failed\n");
+
+ if (!ctx->queries_disabled)
+ zink_resume_queries(ctx, batch);
}
void
zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
{
+ if (!ctx->queries_disabled)
+ zink_suspend_queries(ctx, batch);
+
if (vkEndCommandBuffer(batch->cmdbuf) != VK_SUCCESS) {
debug_printf("vkEndCommandBuffer failed\n");
return;