From facc4b9a5ec1bc418bb9005ebeb707d73aa4d41b Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 22 Jan 2024 16:36:44 -0400 Subject: [PATCH] asahi: drop any_draws Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_batch.c | 1 - src/gallium/drivers/asahi/agx_pipe.c | 2 +- src/gallium/drivers/asahi/agx_state.c | 4 ---- src/gallium/drivers/asahi/agx_state.h | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/gallium/drivers/asahi/agx_batch.c b/src/gallium/drivers/asahi/agx_batch.c index 3d75cdc58ff..95b02542520 100644 --- a/src/gallium/drivers/asahi/agx_batch.c +++ b/src/gallium/drivers/asahi/agx_batch.c @@ -130,7 +130,6 @@ agx_batch_init(struct agx_context *ctx, batch->clear_stencil = 0; batch->varyings = 0; batch->geometry_state = 0; - batch->any_draws = false; batch->initialized = false; batch->draws = 0; agx_bo_unreference(batch->sampler_heap.bo); diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 5889c50a71d..4a1bd12f62d 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -1288,7 +1288,7 @@ agx_flush_batch(struct agx_context *ctx, struct agx_batch *batch) assert(!agx_batch_is_submitted(batch)); /* Make sure there's something to submit. */ - if (!batch->clear && !batch->any_draws) { + if (!batch->clear) { agx_batch_reset(ctx, batch); return; } diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 6db5d096e45..597a77aaa3b 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -5128,8 +5128,6 @@ agx_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info, batch->resolve |= ctx->zs->store; } - batch->any_draws = true; - /* When we approach the end of a command buffer, cycle it out for a new one. * We only need to do this once per draw as long as we conservatively * estimate the maximum bytes of VDM commands that this draw will emit. @@ -5258,8 +5256,6 @@ agx_launch(struct agx_batch *batch, const struct pipe_grid_info *info, struct agx_context *ctx = batch->ctx; struct agx_device *dev = agx_device(ctx->base.screen); - batch->any_draws = true; - /* To implement load_num_workgroups, the number of workgroups needs to be * available in GPU memory. This is either the indirect buffer, or just a * buffer we upload ourselves if not indirect. diff --git a/src/gallium/drivers/asahi/agx_state.h b/src/gallium/drivers/asahi/agx_state.h index 32e54292cae..3351d67bd07 100644 --- a/src/gallium/drivers/asahi/agx_state.h +++ b/src/gallium/drivers/asahi/agx_state.h @@ -317,7 +317,6 @@ struct agx_batch { /* PIPE_CLEAR_* bitmask */ uint32_t clear, draw, load, resolve; - bool any_draws; bool initialized; uint64_t uploaded_clear_color[PIPE_MAX_COLOR_BUFS];