zink: add 'has_draw' flag to batch struct

this tells us if a batch has a draw command pending

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
This commit is contained in:
Mike Blumenkrantz 2020-11-17 18:29:15 -05:00 committed by Marge Bot
parent 05629bb470
commit 06273abd20
3 changed files with 3 additions and 0 deletions

View file

@ -60,6 +60,7 @@ reset_batch(struct zink_context *ctx, struct zink_batch *batch)
if (vkResetDescriptorPool(screen->dev, batch->descpool, 0) != VK_SUCCESS)
fprintf(stderr, "vkResetDescriptorPool failed\n");
batch->has_draw = false;
}
void

View file

@ -57,6 +57,7 @@ struct zink_batch {
struct set *active_queries; /* zink_query objects which were active at some point in this batch */
bool has_draw;
bool in_rp; //renderpass is currently active
};

View file

@ -618,4 +618,5 @@ zink_draw_vbo(struct pipe_context *pctx,
}
screen->vk_CmdEndTransformFeedbackEXT(batch->cmdbuf, 0, ctx->num_so_targets, counter_buffers, counter_buffer_offsets);
}
batch->has_draw = true;
}