diff options
author | Matt Turner <mattst88@gmail.com> | 2015-01-27 22:43:28 -0800 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2015-02-19 21:16:43 -0800 |
commit | 871ad3f08bc34e16fdd728e9a4821b9a83e509f0 (patch) | |
tree | 3ee17eb19401297a2da20e8145803a7db906ca05 /src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp | |
parent | bf3389ec49a158e0b66db8e038d801eacabd20f1 (diff) | |
download | external_mesa3d-871ad3f08bc34e16fdd728e9a4821b9a83e509f0.zip external_mesa3d-871ad3f08bc34e16fdd728e9a4821b9a83e509f0.tar.gz external_mesa3d-871ad3f08bc34e16fdd728e9a4821b9a83e509f0.tar.bz2 |
i965/fs: Use fs_inst::overwrites_reg() in saturate propagation.
This is safer and matches the conditional_mod propagation pass.
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.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 | 8 |
1 files changed, 4 insertions, 4 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 a9966a4..bc51661 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp @@ -64,10 +64,10 @@ 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, block) { - if (scan_inst->dst.file == GRF && - scan_inst->dst.reg == inst->src[0].reg && - scan_inst->dst.reg_offset == inst->src[0].reg_offset && - !scan_inst->is_partial_write()) { + if (scan_inst->overwrites_reg(inst->src[0])) { + if (scan_inst->is_partial_write()) + break; + if (scan_inst->saturate) { inst->saturate = false; progress = true; |