summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2015-02-27 10:22:21 -0800
committerMatt Turner <mattst88@gmail.com>2015-03-04 12:37:34 -0800
commit1e128e9b69c6336762a2b6ee5d356c763b9ae3b0 (patch)
treeef75c5e1dba051b6d4fd3efe05008af1c37deb7f /src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
parentade0b580e75bdea227eec5345f6681b678d0811b (diff)
downloadexternal_mesa3d-1e128e9b69c6336762a2b6ee5d356c763b9ae3b0.zip
external_mesa3d-1e128e9b69c6336762a2b6ee5d356c763b9ae3b0.tar.gz
external_mesa3d-1e128e9b69c6336762a2b6ee5d356c763b9ae3b0.tar.bz2
i965/fs: Don't propagate cmod to inst with different type.
Cc: 10.5 <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89317 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
index c6384ab..58890ee 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
@@ -80,6 +80,10 @@ opt_cmod_propagation_local(fs_visitor *v, bblock_t *block)
scan_inst->dst.reg_offset != inst->src[0].reg_offset)
break;
+ /* Comparisons operate differently for ints and floats */
+ if (scan_inst->dst.type != inst->dst.type)
+ break;
+
/* If the instruction generating inst's source also wrote the
* flag, and inst is doing a simple .nz comparison, then inst
* is redundant - the appropriate value is already in the flag