pan/bi: Handle BIFROST_FIRST_WRITE_FMA_P2_READ_P3

It's a special case for unclear reasons, and if you mess it up you get
INSTR_INVALID_ENC. Isn't hardware fun?

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458>
This commit is contained in:
Alyssa Rosenzweig 2020-04-01 18:22:01 -04:00 committed by Marge Bot
parent 75aabc6ea1
commit 0ab3f687c0
2 changed files with 4 additions and 1 deletions

View file

@ -315,6 +315,8 @@ bi_pack_register_ctrl(struct bi_registers r)
if (r.first_instruction) {
if (ctrl == BIFROST_REG_NONE)
ctrl = BIFROST_FIRST_NONE;
else if (ctrl == BIFROST_WRITE_FMA_P2_READ_P3)
ctrl = BIFROST_FIRST_WRITE_FMA_P2_READ_P3;
else
ctrl |= BIFROST_FIRST_NONE;
}

View file

@ -520,7 +520,7 @@ struct bifrost_fmt_constant {
enum bifrost_reg_control {
BIFROST_WRITE_FMA_P2 = 1,
BIFROST_WRITE_FMA_P2_READ_P3 = 2,
BIFROST_WRITE_FMA_P2_READ_P3_ALT = 3,
BIFROST_FIRST_WRITE_FMA_P2_READ_P3 = 3,
BIFROST_READ_P3 = 4,
BIFROST_WRITE_ADD_P2 = 5,
BIFROST_WRITE_ADD_P2_READ_P3 = 6,
@ -528,6 +528,7 @@ enum bifrost_reg_control {
BIFROST_FIRST_NONE = 8,
BIFROST_FIRST_WRITE_FMA_P2 = 9,
/* INSTR_INVALID_ENC */
BIFROST_REG_NONE = 11,
BIFROST_FIRST_READ_P3 = 12,
BIFROST_FIRST_WRITE_ADD_P2 = 13,