aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/bifrost/compiler.h
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-04-14 12:21:25 -0400
committerAlyssa Rosenzweig <[email protected]>2020-04-17 16:25:34 -0400
commitaf01378dce1873c520c52a536ee7d1731c18105d (patch)
tree43a3daa9d317a4d92af05e08ede5162bd29c650b /src/panfrost/bifrost/compiler.h
parent83d961b0c26874622a0c72cebfa40ef4952ae5d3 (diff)
pan/bi: Add BI_TABLE for fast table accesses
Used to implement SPECIAL ops. Separate class since they are faster which means you can pair them with actual work on FMA. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Diffstat (limited to 'src/panfrost/bifrost/compiler.h')
-rw-r--r--src/panfrost/bifrost/compiler.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h
index 6a75de7fdc0..64baf8cc4c7 100644
--- a/src/panfrost/bifrost/compiler.h
+++ b/src/panfrost/bifrost/compiler.h
@@ -71,8 +71,9 @@ enum bi_class {
BI_SHIFT,
BI_STORE,
BI_STORE_VAR,
- BI_SPECIAL, /* _FAST, _TABLE on supported GPUs */
+ BI_SPECIAL, /* _FAST on supported GPUs */
BI_SWIZZLE,
+ BI_TABLE,
BI_TEX,
BI_ROUND,
BI_NUM_CLASSES
@@ -182,6 +183,15 @@ enum bi_round_op {
BI_ROUND_ROUND /* i.e.: fround() */
};
+enum bi_table_op {
+ /* fp32 log2() with low precision, suitable for GL or half_log2() in
+ * CL. In the first argument, takes x. Letting u be such that x =
+ * 2^{-m} u with m integer and 0.75 <= u < 1.5, returns
+ * log2(u) / (u - 1). */
+
+ BI_TABLE_LOG2_U_OVER_U_1_LOW,
+};
+
enum bi_special_op {
BI_SPECIAL_FRCP,
BI_SPECIAL_FRSQ,
@@ -244,6 +254,7 @@ typedef struct {
enum bi_bitwise_op bitwise;
enum bi_round_op round;
enum bi_special_op special;
+ enum bi_table_op table;
enum bi_cond compare;
} op;