summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-29 16:52:55 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-30 10:01:19 -0700
commit81e7782e30a17e206098f2ddb9d01fc974441dc8 (patch)
tree34a5289ed2f8dfb0e7191dcdf7db2ca4a7022905 /src
parentae6aea0d987f288dcfe0e8d5858aeacb3cef5e39 (diff)
pan/midgard: Add OP_IS_DERIVATIVE helper
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/panfrost/midgard/helpers.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/panfrost/midgard/helpers.h b/src/panfrost/midgard/helpers.h
index 0cd2e71862c..9e8f964b00c 100644
--- a/src/panfrost/midgard/helpers.h
+++ b/src/panfrost/midgard/helpers.h
@@ -79,6 +79,11 @@
op == midgard_alu_op_fcsel \
)
+#define OP_IS_DERIVATIVE(op) ( \
+ op == TEXTURE_OP_DFDX || \
+ op == TEXTURE_OP_DFDY \
+ )
+
/* ALU control words are single bit fields with a lot of space */
#define ALU_ENAB_VEC_MUL (1 << 17)