Mesa (master): vc4: The r4_count is supposed to be how many writes, not reads.

Eric Anholt anholt at kemper.freedesktop.org
Wed Sep 10 03:44:16 UTC 2014


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

Author: Eric Anholt <eric at anholt.net>
Date:   Sun Sep  7 14:42:33 2014 -0700

vc4: The r4_count is supposed to be how many writes, not reads.

It's part of the key so that you can tell which r4 value is being read.

---

 src/gallium/drivers/vc4/vc4_opt_cse.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_opt_cse.c b/src/gallium/drivers/vc4/vc4_opt_cse.c
index bc91218..a9b5fda 100644
--- a/src/gallium/drivers/vc4/vc4_opt_cse.c
+++ b/src/gallium/drivers/vc4/vc4_opt_cse.c
@@ -173,7 +173,7 @@ qir_opt_cse(struct vc4_compile *c)
                         }
                 }
 
-                if (qir_reads_r4(inst))
+                if (qir_writes_r4(inst))
                         r4_count++;
         }
 




More information about the mesa-commit mailing list