From e304aa3600f865db533d273e2c1a554cb6a54f05 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 14 Nov 2011 19:49:54 -0800 Subject: [PATCH] i965: Make gen6_resolve_implied_move a no-op for MRF sources. 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 Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 60350caca3f..9d8c701c501 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -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); -- 2.30.2