diff options
author | Francisco Jerez <currojerez@riseup.net> | 2016-09-01 19:34:18 -0700 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2016-09-14 14:50:55 -0700 |
commit | b42c13a5b8ac7d643bbf4c1592607811a81b4ebb (patch) | |
tree | f8de2847535fa7899339b11040c6885ec1124d56 /src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp | |
parent | 32d67923b28e55cfe23883510509644e788003f0 (diff) | |
download | external_mesa3d-b42c13a5b8ac7d643bbf4c1592607811a81b4ebb.zip external_mesa3d-b42c13a5b8ac7d643bbf4c1592607811a81b4ebb.tar.gz external_mesa3d-b42c13a5b8ac7d643bbf4c1592607811a81b4ebb.tar.bz2 |
i965/fs: Drop fs_inst::overwrites_reg() in favor of regions_overlap().
fs_inst::overwrites_reg is rather easy to misuse because it cannot
tell how large the register region starting at 'reg' is, so in cases
where the destination region starts after 'reg' it may give a
misleading result. regions_overlap() is somewhat more verbose to use
but handles arbitrary overlap correctly so it should generally be used
instead.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp index 60bb1c0..1c97a50 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp @@ -64,7 +64,8 @@ opt_saturate_propagation_local(fs_visitor *v, bblock_t *block) bool interfered = false; foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst) { - if (scan_inst->overwrites_reg(inst->src[0])) { + if (regions_overlap(scan_inst->dst, scan_inst->size_written, + inst->src[0], inst->size_read(0))) { if (scan_inst->is_partial_write() || (scan_inst->dst.type != inst->dst.type && !scan_inst->can_change_types())) |