zink: remove flushes for batch descriptor use

now that we do all our tracking and flushing per-program, we can throw
out the batch-based flushing and let our descriptors free-range

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>
This commit is contained in:
Mike Blumenkrantz
2020-09-18 10:26:02 -04:00
committed by Marge Bot
parent d21e88719a
commit 4461a871b8
3 changed files with 1 additions and 8 deletions
-2
View File
@@ -41,8 +41,6 @@ struct zink_resource;
struct zink_sampler_view;
struct zink_surface;
#define ZINK_BATCH_DESC_SIZE 1000
struct zink_batch {
unsigned batch_id : 3;
VkCommandPool cmdpool;
-6
View File
@@ -228,12 +228,6 @@ get_descriptor_set(struct zink_context *ctx, bool is_compute)
{
struct zink_program *pg = is_compute ? (struct zink_program *)ctx->curr_compute : (struct zink_program *)ctx->curr_program;
struct zink_batch *batch = is_compute ? &ctx->compute_batch : zink_curr_batch(ctx);
unsigned num_descriptors = pg->num_descriptors;
/* if we're about to exceed our limit, flush until we're back under */
while (batch->descs_used + num_descriptors >= ZINK_BATCH_DESC_SIZE) {
batch = zink_flush_batch(ctx, batch);
}
zink_batch_reference_program(batch, pg);
return zink_program_allocate_desc_set(ctx, batch, pg);
}
+1
View File
@@ -691,6 +691,7 @@ zink_program_allocate_desc_set(struct zink_context *ctx,
unsigned descs_used = pg->descs_used;
if (descs_used + pg->num_descriptors > ZINK_DEFAULT_MAX_DESCS) {
batch = zink_flush_batch(ctx, batch);
zink_batch_reference_program(batch, pg);
return zink_program_allocate_desc_set(ctx, batch, pg);
}