summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-09-08 12:05:25 -0700
committerMatt Turner <mattst88@gmail.com>2014-09-27 12:18:37 -0700
commit82bdb559a160129774d2e2f235cb2b18c907d713 (patch)
tree567882fd66efa3a1c18116fcfa256d6dc9c9802f /src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp
parented48f91275f52f26b513fc2970233063bfa023af (diff)
downloadexternal_mesa3d-82bdb559a160129774d2e2f235cb2b18c907d713.zip
external_mesa3d-82bdb559a160129774d2e2f235cb2b18c907d713.tar.gz
external_mesa3d-82bdb559a160129774d2e2f235cb2b18c907d713.tar.bz2
i965/fs: Walk instructions in reverse in saturate propagation.
When we find a mov.sat, we search backwards. We might as well search everything else backwards as well and potentially look at fewer instructions. This change enables the next patch. Reviewed-by: Jason Ekstrand <jason.ekstrand@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.cpp6
1 files changed, 3 insertions, 3 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 4c4b6bf..6f8f8d0 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp
@@ -32,10 +32,10 @@ static bool
opt_saturate_propagation_local(fs_visitor *v, bblock_t *block)
{
bool progress = false;
- int ip = block->start_ip - 1;
+ int ip = block->end_ip + 1;
- foreach_inst_in_block(fs_inst, inst, block) {
- ip++;
+ foreach_inst_in_block_reverse(fs_inst, inst, block) {
+ ip--;
if (inst->opcode != BRW_OPCODE_MOV ||
inst->dst.file != GRF ||