i965/fs: fix copy propagation of partially invalidated entries
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 11 Mar 2016 13:35:07 +0000 (14:35 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Mon, 16 May 2016 07:55:32 +0000 (09:55 +0200)
commitcf375a3333e54a01462f192202d609436e5fbec8
treea43182aa9bfeada61952bc47b6b5f82402939bbd
parentea1ef49a16dc429c50ece388e92bf206ccf282a7
i965/fs: fix copy propagation of partially invalidated entries

We were not invalidating entries with a src that reads more than one register
when we find writes that overwrite any register read by entry->src after
the first. This leads to incorrect copy propagation because we re-use
entries from the ACP that have been partially invalidated. Same thing for
entries with a dst that writes to more than one register.

v2 (Sam):
- Improve code by defining regions_overlap() and using it instead of a
loop (Curro).

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp