summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-06-06 10:14:41 -0700
committerEric Anholt <eric@anholt.net>2013-06-10 14:04:24 -0700
commit263a7e4cd992738814575b04d2de24ca0a0ad08a (patch)
tree6c5e756aa0c4af3f830faff693e57aecf3ea4876 /src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
parent1ff10f92e77625bd17f5825b8f5aee4d355587fc (diff)
downloadexternal_mesa3d-263a7e4cd992738814575b04d2de24ca0a0ad08a.zip
external_mesa3d-263a7e4cd992738814575b04d2de24ca0a0ad08a.tar.gz
external_mesa3d-263a7e4cd992738814575b04d2de24ca0a0ad08a.tar.bz2
i965/vs: Use the MAD instruction when possible.
This is different from how we do it in the FS - we are using MAD even when some of the args are constants, because with the relatively unrestrained ability to schedule a MOV to prepare a temporary with that data, we can get lower latency for the sequence of instructions. No significant performance difference on GLB2.7 trex (n=33/34), though it doesn't have that many MADs. I noticed MAD opportunities while reading the code for the DOTA2 bug. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index 39eef4b..1a667eb 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -216,6 +216,7 @@ vec4_visitor::try_copy_propagation(struct intel_context *intel,
return false;
bool is_3src_inst = (inst->opcode == BRW_OPCODE_LRP ||
+ inst->opcode == BRW_OPCODE_MAD ||
inst->opcode == BRW_OPCODE_BFE ||
inst->opcode == BRW_OPCODE_BFI2);
if (is_3src_inst && value.file == UNIFORM)