asahi: optimize out empty dispatches

this occurs with GS lowering.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638>
This commit is contained in:
Alyssa Rosenzweig 2025-04-18 14:00:23 -04:00 committed by Marge Bot
parent b916c38c76
commit d2cc7f38d3

View file

@ -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