summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-02-15 21:55:30 -0800
committerEric Anholt <[email protected]>2013-02-19 10:33:41 -0800
commitc2a6e529c3bc9e62ad93beb1f5ae427dbbba8a38 (patch)
tree4d77b2f1113efef9f92717b395ad68f57a92097a /src
parentaebd3f46e305829ebfcc817cafa8592edc2f80ab (diff)
i965/fs: Only do CSE when the dst types match.
We could potentially do some CSE even when the dst types aren't the same on gen6 where there is no implicit dst type conversion iirc, or in the case of uniform pull constant loads where the dst type doesn't impact what's stored. But it's not worth worrying about. Reviewed-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for the 9.1 branch.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_cse.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
index 70c143af90e..a13ca362699 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
@@ -105,7 +105,8 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
/* Match current instruction's expression against those in AEB. */
if (inst->opcode == entry->generator->opcode &&
inst->saturate == entry->generator->saturate &&
- operands_match(entry->generator->src, inst->src)) {
+ inst->dst.type == entry->generator->dst.type &&
+ operands_match(entry->generator->src, inst->src)) {
found = true;
progress = true;