From d2cc7f38d3530b4e232e8137b8b039a03c4a12ca Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 18 Apr 2025 14:00:23 -0400 Subject: [PATCH] asahi: optimize out empty dispatches this occurs with GS lowering. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Mary Guillemard Part-of: --- src/gallium/drivers/asahi/agx_state.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index b98bf68a0ec..37b6bd7b35d 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -5297,6 +5297,8 @@ agx_launch(struct agx_batch *batch, struct agx_grid grid, unsigned variable_shared_mem) { struct agx_context *ctx = batch->ctx; + if (!linked && agx_is_shader_empty(&cs->b)) + return; /* 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