pan/bi: Add bi_pack_fma_2src helper

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
This commit is contained in:
Alyssa Rosenzweig 2020-04-14 13:14:05 -04:00
parent 9904ed170a
commit ffa9f6a789

View file

@ -642,6 +642,18 @@ bi_pack_fma_1src(bi_instruction *ins, struct bi_registers *regs, unsigned op)
RETURN_PACKED(pack);
}
static unsigned
bi_pack_fma_2src(bi_instruction *ins, struct bi_registers *regs, unsigned op)
{
struct bifrost_fma_2src pack = {
.src0 = bi_get_src(ins, regs, 0, true),
.src1 = bi_get_src(ins, regs, 1, true),
.op = op
};
RETURN_PACKED(pack);
}
static unsigned
bi_pack_add_1src(bi_instruction *ins, struct bi_registers *regs, unsigned op)
{