Mesa (master): bifrost: Fix packing of ADD_FEXP2_FAST
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 28 22:11:13 UTC 2020
Module: Mesa
Branch: master
Commit: c7626ac8ba851fabc22563279a48953ab1530aae
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7626ac8ba851fabc22563279a48953ab1530aae
Author: Chris Forbes <chrisforbes at google.com>
Date: Tue Jul 28 14:42:33 2020 -0700
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 <chrisforbes at google.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6111>
---
src/panfrost/bifrost/bi_pack.c | 2 +-
src/panfrost/bifrost/bifrost.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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;
More information about the mesa-commit
mailing list