summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-12-17 17:03:02 -0800
committerEric Anholt <[email protected]>2013-03-28 11:46:34 -0700
commit130138030a3dc8bda20766146ca9fda4047133d3 (patch)
tree1449e810c563cc21ea792cb99fd2b69010f7f225 /src/mesa/drivers/dri/i965/brw_vec4.cpp
parentc3a22d42a88c299561dd913d0a00bb986921eeba (diff)
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 <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp12
1 files changed, 12 insertions, 0 deletions
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.
*