aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp b/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
index d3147998028..db0be1911cc 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
@@ -169,6 +169,12 @@ fs_visitor::opt_peephole_sel()
break;
}
+ /* Check that source types for mov operations match. */
+ if (then_mov[i]->src[0].type != else_mov[i]->src[0].type) {
+ movs = i;
+ break;
+ }
+
if (!then_mov[i]->src[0].equals(else_mov[i]->src[0])) {
/* Only the last source register can be a constant, so if the MOV
* in the "then" clause uses a constant, we need to put it in a