aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/zink/zink_batch.c
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-07-16 13:29:06 +0200
committerErik Faye-Lund <[email protected]>2019-10-28 08:51:47 +0000
commit2683619955b973046b266c45afa0c10de8f0ef57 (patch)
tree9cda2f1b6b5a7f9890411ce06a7e9e66d07b7d5e /src/gallium/drivers/zink/zink_batch.c
parent67cde39c8c6734d7dd05b53dfcf4a6f3133ca577 (diff)
HACK: zink: suspend / resume queries on batch-boundaries
HACK because we assert that we don't overrun the pool. We need a fallback here instead. Acked-by: Jordan Justen <[email protected]>
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;