summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/midgard/helpers.h
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-03-25 02:49:04 +0000
committerAlyssa Rosenzweig <[email protected]>2019-03-26 23:35:36 +0000
commiteffe6fb08d9bfda2b5991e67ade3b3126bc30697 (patch)
treeb871e07b4e43e5ad60a6f2f5ce162e5ce4627197 /src/gallium/drivers/panfrost/midgard/helpers.h
parent3208c9d9a2a5800521bd123d699bdbf2c52855a9 (diff)
panfrost/midgard: Lower source modifiers for ints
On Midgard, float ops support standard source modifiers (abs/neg) and destination modifiers (sat/pos/round). Integer ops do not support these, however. To cope, we use native NIR source modifiers for floats, but lower them away to iabs/ineg for integers, implementing those ops simultaneously to avoid regressions. Fixes the integer tests in dEQP-GLES2.functional.shaders.operator.unary_operator.minus.* Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/midgard/helpers.h')
-rw-r--r--src/gallium/drivers/panfrost/midgard/helpers.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/midgard/helpers.h b/src/gallium/drivers/panfrost/midgard/helpers.h
index c90d7530ecb..01c88ed0fcf 100644
--- a/src/gallium/drivers/panfrost/midgard/helpers.h
+++ b/src/gallium/drivers/panfrost/midgard/helpers.h
@@ -142,6 +142,7 @@ midgard_is_integer_op(int op)
//case midgard_alu_op_f2i:
//case midgard_alu_op_f2u:
case midgard_alu_op_ieq:
+ case midgard_alu_op_iabs:
case midgard_alu_op_ine:
case midgard_alu_op_ilt:
case midgard_alu_op_ile:
@@ -209,6 +210,7 @@ static unsigned alu_opcode_props[256] = {
/* Incredibly, iadd can run on vmul, etc */
[midgard_alu_op_iadd] = UNITS_MOST,
+ [midgard_alu_op_iabs] = UNITS_MOST,
[midgard_alu_op_isub] = UNITS_MOST,
[midgard_alu_op_imul] = UNITS_MOST,
[midgard_alu_op_imov] = UNITS_MOST | QUIRK_FLIPPED_R24,