Mesa (master): i965: Fix null register use in Sandybridge implied move resolution.

Kenneth Graunke kwg at kemper.freedesktop.org
Sat Apr 2 18:26:35 PDT 2011


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sun Apr  3 00:57:30 2011 -0700

i965: Fix null register use in Sandybridge implied move resolution.

Fixes regressions caused by commit 9a21bc6401, namely GPU hangs when
running gnome-shell or compiz (Mesa bugs #35820 and #35853).

I incorrectly refactored the case that dealt with ARF_NULL; even in that
case, the source register needs to be changed to the MRF.

NOTE: This is a candidate for the 7.10 branch (if 9a21bc6401 is
cherry-picked, take this one too).

---

 src/mesa/drivers/dri/i965/brw_eu_emit.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 32ee37f..57313a5 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -68,15 +68,14 @@ gen6_resolve_implied_move(struct brw_compile *p,
    if (intel->gen != 6)
       return;
 
-   if (src->file == BRW_ARCHITECTURE_REGISTER_FILE && src->nr == BRW_ARF_NULL)
-      return;
-
-   brw_push_insn_state(p);
-   brw_set_mask_control(p, BRW_MASK_DISABLE);
-   brw_set_compression_control(p, BRW_COMPRESSION_NONE);
-   brw_MOV(p, retype(brw_message_reg(msg_reg_nr), BRW_REGISTER_TYPE_UD),
-	   retype(*src, BRW_REGISTER_TYPE_UD));
-   brw_pop_insn_state(p);
+   if (src->file != BRW_ARCHITECTURE_REGISTER_FILE || src->nr != BRW_ARF_NULL) {
+      brw_push_insn_state(p);
+      brw_set_mask_control(p, BRW_MASK_DISABLE);
+      brw_set_compression_control(p, BRW_COMPRESSION_NONE);
+      brw_MOV(p, retype(brw_message_reg(msg_reg_nr), BRW_REGISTER_TYPE_UD),
+	      retype(*src, BRW_REGISTER_TYPE_UD));
+      brw_pop_insn_state(p);
+   }
    *src = brw_message_reg(msg_reg_nr);
 }
 



More information about the mesa-commit mailing list