aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-04-03 10:35:09 -0700
committerMatt Turner <[email protected]>2014-04-05 09:47:36 -0700
commit86ae6f477d24169cbc27d53c57d5d024d73e4e4a (patch)
treeccb6c95473d66141760331e1777557df361df67f /src/mesa/drivers
parent20dee82a75ac7415fba0b3540a1f99d60b2325db (diff)
i965/fs: Fix off-by-one in saturate propagation.
ip needs to be initialized to start_ip - 1, since the first thing in the main loop is ip++. Otherwise we would incorrectly propagate the saturate from the mov to the mad: mad a, b, c, d mov.sat x, a add y, z, a Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp2
1 files changed, 1 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 189888e371d..eaecb459deb 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp
@@ -32,7 +32,7 @@ static bool
opt_saturate_propagation_local(fs_visitor *v, bblock_t *block)
{
bool progress = false;
- int ip = block->start_ip;
+ int ip = block->start_ip - 1;
for (fs_inst *inst = (fs_inst *)block->start;
inst != block->end->next;