i965/fs: Simplify and improve accuracy of compute_to_mrf() by using regions_overlap().
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 27 May 2016 19:50:28 +0000 (12:50 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 31 May 2016 22:56:54 +0000 (15:56 -0700)
commitbb61e24787952a4796a687a86200a05cf83af7e9
tree6faf448d3d0a894e6ff590b8aa31b7af78205a65
parent88f380a2ddbdeda6e83725403b12ee0070f1f0f3
i965/fs: Simplify and improve accuracy of compute_to_mrf() by using regions_overlap().

Compute-to-mrf was being rather heavy-handed about checking whether
instruction source or destination regions interfere with the copy
instruction, which could conceivably lead to program miscompilation.
Fix it by using regions_overlap() instead of the open-coded and
dubiously correct overlap checks.

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