zink: ignore compute batch when starting/ending batches

compute batches don't have queries

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781>
This commit is contained in:
Mike Blumenkrantz 2020-08-12 16:04:07 -04:00 committed by Marge Bot
parent 8f6ffc5543
commit f32891b159

View file

@ -81,14 +81,14 @@ zink_start_batch(struct zink_context *ctx, struct zink_batch *batch)
if (vkBeginCommandBuffer(batch->cmdbuf, &cbbi) != VK_SUCCESS)
debug_printf("vkBeginCommandBuffer failed\n");
if (!ctx->queries_disabled)
if (!ctx->queries_disabled && batch->batch_id != ZINK_COMPUTE_BATCH_ID)
zink_resume_queries(ctx, batch);
}
void
zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
{
if (!ctx->queries_disabled)
if (!ctx->queries_disabled && batch->batch_id != ZINK_COMPUTE_BATCH_ID)
zink_suspend_queries(ctx, batch);
if (vkEndCommandBuffer(batch->cmdbuf) != VK_SUCCESS) {