summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_fs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index b7425a00593..eaa9ae6ac36 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2980,6 +2980,8 @@ fs_visitor::register_coalesce()
inst->dst.type != inst->src[0].type)
continue;
+ bool has_source_modifiers = inst->src[0].abs || inst->src[0].negate;
+
/* Found a move of a GRF to a GRF. Let's see if we can coalesce
* them: check for no writes to either one until the exit of the
* program.
@@ -3012,6 +3014,14 @@ fs_visitor::register_coalesce()
break;
}
}
+
+ /* The gen6 MATH instruction can't handle source modifiers, so avoid
+ * coalescing those for now. We should do something more specific.
+ */
+ if (intel->gen == 6 && scan_inst->is_math() && has_source_modifiers) {
+ interfered = true;
+ break;
+ }
}
if (interfered) {
continue;