From 1362ae38d49b2007f2afcee3b1eeffcf2f69dfd9 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 22 Jan 2024 16:29:16 -0400 Subject: [PATCH] asahi: optimize "no changes" case drawoverhead case 1 Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_state.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 762b6de5201..68d12fa50d4 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -3563,6 +3563,11 @@ agx_encode_state(struct agx_batch *batch, uint8_t *out, bool is_lines, bool is_points) { struct agx_context *ctx = batch->ctx; + + /* If nothing is dirty, encode nothing */ + if (!ctx->dirty) + return out; + struct agx_rasterizer *rast = ctx->rast; unsigned ppp_updates = 0;