i965/fs: Refactor compute_to_mrf() to split search and rewrite into separate loops.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 27 May 2016 20:15:55 +0000 (13:15 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 31 May 2016 22:57:40 +0000 (15:57 -0700)
commit485fbaff03f7d281ff4f22bd6321548512783799
tree955fe71481af332f7a91368d488dfc549976eb4e
parent4b0ec9f4759bab68b51e2f410e9305e39c1e1e7f
i965/fs: Refactor compute_to_mrf() to split search and rewrite into separate loops.

This will allow compute_to_mrf to handle cases where the source of the
VGRF-to-MRF copy is initialized by more than one instruction.  In such
cases we cannot rewrite the destination of any of the generating
instructions until it's known whether the whole VGRF source region can
be coalesced into the destination MRF, which will imply continuing the
search until all generating instructions have been found or it has
been determined that the VGRF and MRF registers cannot be coalesced.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_fs.cpp