Mesa (master): vc4: Disable vc4_opt_vpm in the presence of control flow.

Eric Anholt anholt at kemper.freedesktop.org
Thu Jul 14 07:01:58 UTC 2016


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

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jul  8 17:06:18 2016 -0700

vc4: Disable vc4_opt_vpm in the presence of control flow.

It's a really valuable pass currently, but it will be a mess to rewrite
for control flow.  For now, just disable it if we have multiple blocks
present.

---

 src/gallium/drivers/vc4/vc4_opt_vpm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_opt_vpm.c b/src/gallium/drivers/vc4/vc4_opt_vpm.c
index e2249bd..34ea336 100644
--- a/src/gallium/drivers/vc4/vc4_opt_vpm.c
+++ b/src/gallium/drivers/vc4/vc4_opt_vpm.c
@@ -38,6 +38,11 @@ qir_opt_vpm(struct vc4_compile *c)
         if (c->stage == QSTAGE_FRAG)
                 return false;
 
+        /* For now, only do this pass when we don't have control flow. */
+        struct qblock *block = qir_entry_block(c);
+        if (block != qir_exit_block(c))
+                return false;
+
         bool progress = false;
         struct qinst *vpm_writes[64] = { 0 };
         uint32_t use_count[c->num_temps];




More information about the mesa-commit mailing list