aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-04-30 15:41:10 -0400
committerMarge Bot <[email protected]>2020-05-01 18:26:36 +0000
commitf47c60b41123e19c443968af2a311d84d8c96ac1 (patch)
tree2c1be18cabf26ee6d746620fb1d6a722c4d3625c /src
parentf8601110e4ecec7a1578e853f694796fe50b4e94 (diff)
pan/mdg: Ingest actual isub ops
Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4852>
Diffstat (limited to 'src')
-rw-r--r--src/panfrost/midgard/midgard_compile.h1
-rw-r--r--src/panfrost/midgard/midgard_nir_algebraic.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_compile.h b/src/panfrost/midgard/midgard_compile.h
index c59732fbd60..bf98342c4f6 100644
--- a/src/panfrost/midgard/midgard_compile.h
+++ b/src/panfrost/midgard/midgard_compile.h
@@ -38,7 +38,6 @@ midgard_compile_shader_nir(nir_shader *nir, panfrost_program *program, bool is_b
static const nir_shader_compiler_options midgard_nir_options = {
.lower_ffma = true,
- .lower_sub = true,
.lower_scmp = true,
.lower_flrp16 = true,
.lower_flrp32 = true,
diff --git a/src/panfrost/midgard/midgard_nir_algebraic.py b/src/panfrost/midgard/midgard_nir_algebraic.py
index 3dc1900cca1..e8547a5067c 100644
--- a/src/panfrost/midgard/midgard_nir_algebraic.py
+++ b/src/panfrost/midgard/midgard_nir_algebraic.py
@@ -37,6 +37,9 @@ algebraic_late = [
(('ineg', a), ('isub', 0, a)),
+ # Likewise we want fsub lowered but not isub
+ (('fsub', a, b), ('fadd', a, ('fneg', b))),
+
# These two special-cases save space/an op than the actual csel op +
# scheduler flexibility