[Mesa-dev] [PATCH 06/13] i965/fs: Avoid inappropriate optimization with regs_written > 1.

Eric Anholt eric at anholt.net
Wed Mar 20 17:36:55 PDT 2013


Right now we don't have anything with regs_written() > 1 and !inst->mlen,
but that's about to change.

NOTE: This is a candidate for the 9.1 branch.
---
 src/mesa/drivers/dri/i965/brw_fs.cpp |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index fbe9e3a..f1b0789 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2087,6 +2087,12 @@ fs_visitor::compute_to_mrf()
 	       break;
 	    }
 
+            /* Things returning more than one register would need us to
+             * understand coalescing out more than one MOV at a time.
+             */
+            if (scan_inst->regs_written() > 1)
+               break;
+
 	    /* SEND instructions can't have MRF as a destination. */
 	    if (scan_inst->mlen)
 	       break;
-- 
1.7.10.4



More information about the mesa-dev mailing list