Mesa (master): panfrost/midgard: Fix regressions in -bjellyfish

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Apr 28 21:41:47 UTC 2019


Module: Mesa
Branch: master
Commit: 68a1508dc9dfb283dce18921273bf218086eb2ce
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=68a1508dc9dfb283dce18921273bf218086eb2ce

Author: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Date:   Sun Apr 28 03:47:57 2019 +0000

panfrost/midgard: Fix regressions in -bjellyfish

Two fixes here, one is that we tried to copyprop non-strictly-SSA values
which was bound to fly in our face. The other was peeling back the imov
workaround.. Turns out we still need that. More research is needed
still, but let's not regress real apps.

Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>

---

 src/gallium/drivers/panfrost/midgard/midgard_compile.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
index b5e29fee91d..ac4c7219ce9 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
@@ -1135,9 +1135,11 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
                 ALU_CASE(imul, imul);
                 ALU_CASE(iabs, iabs);
 
-                /* XXX: Use fmov, not imov, since imov was causing major
-                 * issues with texture precision? XXX research */
-                ALU_CASE(imov, imov);
+                /* XXX: Use fmov, not imov for now, since NIR does not
+                 * differentiate well (it'll happily emits imov for floats,
+                 * which the hardware rather dislikes and breaks e.g
+                 * -bjellyfish */
+                ALU_CASE(imov, fmov);
 
                 ALU_CASE(feq32, feq);
                 ALU_CASE(fne32, fne);
@@ -3156,6 +3158,8 @@ midgard_opt_copy_prop(compiler_context *ctx, midgard_block *block)
 
                 if (to >= SSA_FIXED_MINIMUM) continue;
                 if (from >= SSA_FIXED_MINIMUM) continue;
+                if (to >= ctx->func->impl->ssa_alloc) continue;
+                if (from >= ctx->func->impl->ssa_alloc) continue;
 
                 /* Also, if the move has side effects, we're helpless */
 




More information about the mesa-commit mailing list