aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-30 16:46:57 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-31 09:39:16 -0700
commit64235b1eccdaf4c26b83c4bfc720dfd36c94412e (patch)
treed74375710b5052ae409e54663db3a2de3f61146e /src/panfrost
parent13ee87c8b99e045d8610bf801f2f15544ca4f430 (diff)
pan/midgard: Fix ball/bany opcode table
This were seriously messed up beyond all recognition. How we're passing shaders.random.* is a mystery. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/midgard/midgard.h6
-rw-r--r--src/panfrost/midgard/midgard_ops.c33
2 files changed, 22 insertions, 17 deletions
diff --git a/src/panfrost/midgard/midgard.h b/src/panfrost/midgard/midgard.h
index 6473809d10a..28b79575ff7 100644
--- a/src/panfrost/midgard/midgard.h
+++ b/src/panfrost/midgard/midgard.h
@@ -119,12 +119,12 @@ typedef enum {
midgard_alu_op_flt = 0x82,
midgard_alu_op_fle = 0x83,
midgard_alu_op_fball_eq = 0x88,
- midgard_alu_op_bball_eq = 0x89,
+ midgard_alu_op_fball_neq = 0x89,
midgard_alu_op_fball_lt = 0x8A, /* all(lessThan(.., ..)) */
midgard_alu_op_fball_lte = 0x8B, /* all(lessThanEqual(.., ..)) */
- midgard_alu_op_bbany_neq = 0x90, /* used for bvec4(1) */
- midgard_alu_op_fbany_neq = 0x91, /* bvec4(0) also */
+ midgard_alu_op_fbany_eq = 0x90,
+ midgard_alu_op_fbany_neq = 0x91,
midgard_alu_op_fbany_lt = 0x92, /* any(lessThan(.., ..)) */
midgard_alu_op_fbany_lte = 0x93, /* any(lessThanEqual(.., ..)) */
diff --git a/src/panfrost/midgard/midgard_ops.c b/src/panfrost/midgard/midgard_ops.c
index f125c505832..e0d8d886a79 100644
--- a/src/panfrost/midgard/midgard_ops.c
+++ b/src/panfrost/midgard/midgard_ops.c
@@ -137,29 +137,34 @@ struct mir_op_props alu_opcode_props[256] = {
[midgard_alu_op_iasr] = {"iasr", UNITS_ADD},
[midgard_alu_op_ilsr] = {"ilsr", UNITS_ADD},
- [midgard_alu_op_fball_eq] = {"fball_eq", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
- [midgard_alu_op_fbany_neq] = {"fbany_neq", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
+ [midgard_alu_op_fball_eq] = {"fball_eq", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES | OP_TYPE_CONVERT},
+ [midgard_alu_op_fball_neq] = {"fball_neq", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES | OP_TYPE_CONVERT},
+ [midgard_alu_op_fball_lt] = {"fball_lt", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES | OP_TYPE_CONVERT},
+ [midgard_alu_op_fball_lte] = {"fball_lte", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES | OP_TYPE_CONVERT},
+
+ [midgard_alu_op_fbany_eq] = {"fbany_eq", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES | OP_TYPE_CONVERT},
+ [midgard_alu_op_fbany_neq] = {"fbany_neq", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES | OP_TYPE_CONVERT},
+ [midgard_alu_op_fbany_lt] = {"fbany_lt", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES | OP_TYPE_CONVERT},
+ [midgard_alu_op_fbany_lte] = {"fbany_lte", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES | OP_TYPE_CONVERT},
+
[midgard_alu_op_iball_eq] = {"iball_eq", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
[midgard_alu_op_iball_neq] = {"iball_neq", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
+ [midgard_alu_op_iball_lt] = {"iball_lt", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
+ [midgard_alu_op_iball_lte] = {"iball_lte", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
+ [midgard_alu_op_uball_lt] = {"uball_lt", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
+ [midgard_alu_op_uball_lte] = {"uball_lte", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
+
[midgard_alu_op_ibany_eq] = {"ibany_eq", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
[midgard_alu_op_ibany_neq] = {"ibany_neq", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
+ [midgard_alu_op_ibany_lt] = {"ibany_lt", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
+ [midgard_alu_op_ibany_lte] = {"ibany_lte", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
+ [midgard_alu_op_ubany_lt] = {"ubany_lt", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
+ [midgard_alu_op_ubany_lte] = {"ubany_lte", UNITS_VECTOR | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
/* These instructions are not yet emitted by the compiler, so
* don't speculate about units yet */
[midgard_alu_op_ishladd] = {"ishladd", 0},
-
- [midgard_alu_op_uball_lt] = {"uball_lt", 0},
- [midgard_alu_op_uball_lte] = {"uball_lte", 0},
- [midgard_alu_op_iball_lt] = {"iball_lt", 0},
- [midgard_alu_op_iball_lte] = {"iball_lte", 0},
- [midgard_alu_op_ubany_lt] = {"ubany_lt", 0},
- [midgard_alu_op_ubany_lte] = {"ubany_lte", 0},
- [midgard_alu_op_ibany_lt] = {"ibany_lt", 0},
- [midgard_alu_op_ibany_lte] = {"ibany_lte", 0},
-
[midgard_alu_op_freduce] = {"freduce", 0},
- [midgard_alu_op_bball_eq] = {"bball_eq", 0 | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
- [midgard_alu_op_bbany_neq] = {"bball_eq", 0 | OP_CHANNEL_COUNT(4) | OP_COMMUTES},
[midgard_alu_op_fatan2_pt1] = {"fatan2_pt1", 0},
[midgard_alu_op_fatan_pt2] = {"fatan_pt2", 0},
};