summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
index 01b672f..a0aa169 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
@@ -209,7 +209,7 @@ fs_visitor::register_coalesce()
scan_inst->dst.reg = reg_to;
scan_inst->dst.reg_offset = reg_to_offset[i];
}
- for (int j = 0; j < 3; j++) {
+ for (int j = 0; j < scan_inst->sources; j++) {
if (scan_inst->src[j].file == GRF &&
scan_inst->src[j].reg == reg_from &&
scan_inst->src[j].reg_offset == i) {