pan/bi: Add bi_can_{fma, add} predicates

Stubs due to some edge cases, for the scheduler.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
This commit is contained in:
Alyssa Rosenzweig 2020-12-21 15:45:23 -05:00 committed by Marge Bot
parent 7434f31e09
commit 31a7e49613

View file

@ -150,6 +150,22 @@ bi_singleton(void *memctx, bi_instr *ins,
return u;
}
/* Scheduler predicates */
ASSERTED static bool
bi_can_fma(bi_instr *ins)
{
/* TODO: some additional fp16 constraints */
return bi_opcode_props[ins->op].fma;
}
ASSERTED static bool
bi_can_add(bi_instr *ins)
{
/* TODO: some additional fp16 constraints */
return bi_opcode_props[ins->op].add;
}
/* Eventually, we'll need a proper scheduling, grouping instructions
* into clauses and ordering/assigning grouped instructions to the
* appropriate FMA/ADD slots. Right now we do the dumbest possible