From: Chris Forbes Date: Tue, 28 Jul 2020 21:42:33 +0000 (-0700) Subject: bifrost: Fix packing of ADD_FEXP2_FAST X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7626ac8ba851fabc22563279a48953ab1530aae;p=mesa.git bifrost: Fix packing of ADD_FEXP2_FAST This was being packed as 1-src and so the Src1 was not set up properly. It only worked by accident. Signed-off-by: Chris Forbes Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index 5fb8213d0a7..d4351e25aa5 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -1433,7 +1433,7 @@ bi_pack_add_special(bi_instruction *ins, bi_registers *regs) } else if (ins->op.special == BI_SPECIAL_EXP2_LOW) { assert(!fp16); - op = BIFROST_ADD_OP_FEXP2_FAST; + return bi_pack_add_2src(ins, regs, BIFROST_ADD_OP_FEXP2_FAST); } else if (ins->op.special == BI_SPECIAL_IABS) { assert(ins->src_types[0] == nir_type_int32); op = BIFROST_ADD_OP_IABS_32; diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h index 085b3296f2a..12fb13a2c0c 100644 --- a/src/panfrost/bifrost/bifrost.h +++ b/src/panfrost/bifrost/bifrost.h @@ -163,7 +163,6 @@ struct bifrost_fma_mscale { #define BIFROST_ADD_OP_FRSQ_FAST_F16_X (0x0ce50) #define BIFROST_ADD_OP_FRSQ_FAST_F16_Y (0x0ce70) #define BIFROST_ADD_OP_LOG2_HELP (0x0cc68) -#define BIFROST_ADD_OP_FEXP2_FAST (0x0cd58) #define BIFROST_ADD_OP_IABS_32 (0x07bd4) struct bifrost_add_inst { @@ -203,6 +202,7 @@ struct bifrost_add_discard { #define BIFROST_ADD_ISUB_8 (0x17a80 >> 3) #define BIFROST_ADD_ISUB_16 (0x17b00 >> 3) #define BIFROST_ADD_ISUB_32 (0x17ac0 >> 3) +#define BIFROST_ADD_OP_FEXP2_FAST (0x0cd58 >> 3) struct bifrost_add_2src { unsigned src0 : 3;