[Mesa-dev] [PATCH 05/12] panfrost/midgard: Add fcsel_i opcode
Alyssa Rosenzweig
alyssa at rosenzweig.io
Mon Mar 25 02:01:39 UTC 2019
Whereas a normal fcsel acts on a boolean input in r31.w, the fcsel_i
variant acts on an integer input in r31.w, which can be preloaded with
an instruction like imov (with the appropriate negate flag on the
source).
Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>
---
src/gallium/drivers/panfrost/midgard/helpers.h | 1 +
src/gallium/drivers/panfrost/midgard/midgard.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/src/gallium/drivers/panfrost/midgard/helpers.h b/src/gallium/drivers/panfrost/midgard/helpers.h
index 606eb9982e7..268259ce432 100644
--- a/src/gallium/drivers/panfrost/midgard/helpers.h
+++ b/src/gallium/drivers/panfrost/midgard/helpers.h
@@ -223,6 +223,7 @@ static unsigned alu_opcode_props[256] = {
[midgard_alu_op_ile] = UNITS_MOST,
[midgard_alu_op_icsel] = UNITS_ADD,
+ [midgard_alu_op_fcsel_i] = UNITS_ADD,
[midgard_alu_op_fcsel] = UNITS_ADD | UNIT_SMUL,
[midgard_alu_op_frcp] = UNIT_VLUT,
diff --git a/src/gallium/drivers/panfrost/midgard/midgard.h b/src/gallium/drivers/panfrost/midgard/midgard.h
index 39b1df5d915..f3cabff8c2f 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard.h
+++ b/src/gallium/drivers/panfrost/midgard/midgard.h
@@ -105,6 +105,7 @@ typedef enum {
midgard_alu_op_i2f = 0xB8,
midgard_alu_op_u2f = 0xBC,
midgard_alu_op_icsel = 0xC1,
+ midgard_alu_op_fcsel_i = 0xC4,
midgard_alu_op_fcsel = 0xC5,
midgard_alu_op_fround = 0xC6,
midgard_alu_op_fatan_pt2 = 0xE8,
@@ -457,6 +458,7 @@ static char *alu_opcode_names[256] = {
[midgard_alu_op_i2f] = "i2f",
[midgard_alu_op_u2f] = "u2f",
[midgard_alu_op_icsel] = "icsel",
+ [midgard_alu_op_fcsel_i] = "fcsel_i",
[midgard_alu_op_fcsel] = "fcsel",
[midgard_alu_op_fround] = "fround",
[midgard_alu_op_fatan_pt2] = "fatan_pt2",
--
2.20.1
More information about the mesa-dev
mailing list