summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2013-11-15 11:09:47 -0800
committerMatt Turner <mattst88@gmail.com>2013-11-20 15:04:52 -0800
commit9793fc1335f11b4131d6db680bec567dcfccfb5f (patch)
treeb62d43e285d79c6ec28f98e3983c4387f62403ea
parent060159820c05c4e9a9b577844387555b11092391 (diff)
i965/fs: Use source's original type in register_coalesce().
Previously, register_coalesce() would modify mov vgrf1:f vgrf2:f cmp null vgrf3:d vgrf1:d to be cmp null vgrf3:d vgrf2:f and incorrectly use vgrf2's type in the instruction that the mov was coalesced into. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 8b3f8df26f9..5b20b1cbbe6 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2429,6 +2429,7 @@ fs_visitor::register_coalesce()
scan_inst->src[i].reg == inst->dst.reg &&
scan_inst->src[i].reg_offset == inst->dst.reg_offset) {
fs_reg new_src = inst->src[0];
+ new_src.type = scan_inst->src[i].type;
if (scan_inst->src[i].abs) {
new_src.negate = 0;
new_src.abs = 1;