agx: add agx_is_shader_empty helper

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-21 12:20:19 -04:00 committed by Marge Bot
parent f1aeb46a34
commit f6ee36a437

View file

@ -198,6 +198,15 @@ struct agx_shader_part {
void *binary;
};
static inline bool
agx_is_shader_empty(struct agx_shader_part *s)
{
/* Last instruction is a stop, so if there's one instruction, there is
* nothing but a stop. The shader is thus empty.
*/
return (s->info.stats.instrs == 1);
}
#define AGX_MAX_RTS (8)
enum agx_format {