i965: Make gen6_resolve_implied_move a no-op for MRF sources.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 15 Nov 2011 03:49:54 +0000 (19:49 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 2 Dec 2011 10:49:23 +0000 (02:49 -0800)
Attempting to move an MRF to a MRF is not only pointless, it will fail
because MRFs are read-only, resulting in garbage in your register.

If we already set up a MRF source, there's nothing to resolve anyway.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_eu_emit.c

index 60350caca3f9a1e6586dc71cbd31c10ef0489abb..9d8c701c5014b3b855cece5fc723af7e27ad5b27 100644 (file)
@@ -67,6 +67,9 @@ gen6_resolve_implied_move(struct brw_compile *p,
    if (intel->gen < 6)
       return;
 
+   if (src->file == BRW_MESSAGE_REGISTER_FILE)
+      return;
+
    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);