mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
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:
parent
f1aeb46a34
commit
f6ee36a437
1 changed files with 9 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue