summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index 93ae3d61cac..95aa30614b1 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -323,7 +323,7 @@ vec4_visitor::opt_copy_propagation()
for (int i = 0; i < virtual_grf_reg_count; i++) {
for (int j = 0; j < 4; j++) {
- if (inst->dst.writemask & (1 << i) &&
+ if (inst->dst.writemask & (1 << j) &&
cur_value[i][j] &&
cur_value[i][j]->file == GRF &&
cur_value[i][j]->reg == inst->dst.reg &&