From: Alyssa Rosenzweig Date: Fri, 14 Aug 2020 22:22:36 +0000 (-0400) Subject: panfrost: Drop panfrost_invalidate_frame X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=4b21c8b15f022a1838d88e6f667783dcff6bb9e6 panfrost: Drop panfrost_invalidate_frame Only used to initialize active_queries once at context initialization, then unneeded. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Tomeu Vizoso Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 0107f87d6a3..c63e4f9dc03 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -144,16 +144,6 @@ panfrost_clear( panfrost_batch_clear(batch, buffers, color, depth, stencil); } -/* Reset per-frame context, called on context initialisation as well as after - * flushing a frame */ - -void -panfrost_invalidate_frame(struct panfrost_context *ctx) -{ - /* TODO: When does this need to be handled? */ - ctx->active_queries = true; -} - bool panfrost_writes_point_size(struct panfrost_context *ctx) { @@ -1041,7 +1031,6 @@ panfrost_set_framebuffer_state(struct pipe_context *pctx, util_copy_framebuffer_state(&ctx->pipe_framebuffer, fb); ctx->batch = NULL; - panfrost_invalidate_frame(ctx); /* We may need to generate a new variant if the fragment shader is * keyed to the framebuffer format (due to EXT_framebuffer_fetch) */ @@ -1491,7 +1480,6 @@ panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags) /* Prepare for render! */ panfrost_batch_init(ctx); - panfrost_invalidate_frame(ctx); if (!(dev->quirks & IS_BIFROST)) { for (unsigned c = 0; c < PIPE_MAX_COLOR_BUFS; ++c) @@ -1500,6 +1488,7 @@ panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags) /* By default mask everything on */ ctx->sample_mask = ~0; + ctx->active_queries = true; return gallium; } diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index e1a6dc8b5c2..48873a79253 100644 --- a/src/gallium/drivers/panfrost/pan_context.h +++ b/src/gallium/drivers/panfrost/pan_context.h @@ -303,9 +303,6 @@ panfrost_get_shader_state(struct panfrost_context *ctx, struct pipe_context * panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags); -void -panfrost_invalidate_frame(struct panfrost_context *ctx); - bool panfrost_writes_point_size(struct panfrost_context *ctx); diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index fe99b29b7da..33b8bce4df8 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -121,22 +121,15 @@ panfrost_freeze_batch(struct panfrost_batch *batch) struct hash_entry *entry; /* Remove the entry in the FBO -> batch hash table if the batch - * matches. This way, next draws/clears targeting this FBO will trigger - * the creation of a new batch. + * matches and drop the context reference. This way, next draws/clears + * targeting this FBO will trigger the creation of a new batch. */ entry = _mesa_hash_table_search(ctx->batches, &batch->key); if (entry && entry->data == batch) _mesa_hash_table_remove(ctx->batches, entry); - /* If this is the bound batch, the panfrost_context parameters are - * relevant so submitting it invalidates those parameters, but if it's - * not bound, the context parameters are for some other batch so we - * can't invalidate them. - */ - if (ctx->batch == batch) { - panfrost_invalidate_frame(ctx); + if (ctx->batch == batch) ctx->batch = NULL; - } } #ifdef PAN_BATCH_DEBUG