Mesa (master): pan/bi: Don't schedule clamps to +FADD.v2f16

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 3 15:29:41 UTC 2021


Module: Mesa
Branch: master
Commit: daeb3507c2655d061e4fbc78daf055b6c5e9be09
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=daeb3507c2655d061e4fbc78daf055b6c5e9be09

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Tue Feb 23 00:26:03 2021 +0000

pan/bi: Don't schedule clamps to +FADD.v2f16

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10392>

---

 src/panfrost/bifrost/bi_schedule.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c
index 21a597f6992..3b38c09dec0 100644
--- a/src/panfrost/bifrost/bi_schedule.c
+++ b/src/panfrost/bifrost/bi_schedule.c
@@ -390,6 +390,10 @@ bi_can_fma(bi_instr *ins)
 ASSERTED static bool
 bi_can_add(bi_instr *ins)
 {
+        /* +FADD.v2f16 lacks clamp modifier, use *FADD.v2f16 instead */
+        if (ins->op == BI_OPCODE_FADD_V2F16 && ins->clamp)
+                return false;
+
         /* TODO: some additional fp16 constraints */
         return bi_opcode_props[ins->op].add;
 }



More information about the mesa-commit mailing list