From 130138030a3dc8bda20766146ca9fda4047133d3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 17 Dec 2012 17:03:02 -0800 Subject: i965/vs: Teach copy propagation about sends from GRFs. This incidentally also teaches it a bit about gen6 math -- we now allow unswizzled, unmodified GRF temps as the sources for math. Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mesa/drivers/dri/i965/brw_vec4.cpp') diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 91b72f7f20b..35dd9aed43c 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -225,6 +225,18 @@ vec4_instruction::is_send_from_grf() return false; } +bool +vec4_visitor::can_do_source_mods(vec4_instruction *inst) +{ + if (intel->gen == 6 && inst->is_math()) + return false; + + if (inst->is_send_from_grf()) + return false; + + return true; +} + /** * Returns how many MRFs an opcode will write over. * -- cgit v1.2.3