From: Kenneth Graunke Date: Tue, 15 Nov 2011 03:49:54 +0000 (-0800) Subject: i965: Make gen6_resolve_implied_move a no-op for MRF sources. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e304aa3600f865db533d273e2c1a554cb6a54f05;p=mesa.git 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 --- 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);