From: Alyssa Rosenzweig Date: Tue, 14 Apr 2020 16:22:28 +0000 (-0400) Subject: pan/bi: Add special op for exp2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc611566260eacc0d4e92d8b3dc3a8a4d7c94b6e;p=mesa.git pan/bi: Add special op for exp2 Needs some extra help but basically exp2_fast Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index c9e6beb1249..2e6ef452899 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -267,6 +267,7 @@ bi_special_op_name(enum bi_special_op op) switch (op) { case BI_SPECIAL_FRCP: return "frcp"; case BI_SPECIAL_FRSQ: return "frsq"; + case BI_SPECIAL_EXP2_LOW: return "exp2_low"; default: return "invalid"; } } diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 64baf8cc4c7..90f0e94a6e0 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -195,6 +195,11 @@ enum bi_table_op { enum bi_special_op { BI_SPECIAL_FRCP, BI_SPECIAL_FRSQ, + + /* fp32 exp2() with low precision, suitable for half_exp2() in CL or + * exp2() in GL. In the first argument, it takes f2i_rte(x * 2^24). In + * the second, it takes x itself. */ + BI_SPECIAL_EXP2_LOW, }; typedef struct {