summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-09-22 16:57:03 -0700
committerJason Ekstrand <[email protected]>2015-09-22 20:37:35 -0700
commite7496fed2a2428b704b8aeab5f42df8e6a2f7ae1 (patch)
tree224af79ec6d13729e7cbdd03a1a4ed6f4c38425d /src/mesa/program
parent999ff3c77d5d978224ee01ca19121e15698c2c6a (diff)
prog_to_nir: Use nir_op_dph
Shader-db results on HSW: instructions in affected programs: 72 -> 56 (-22.22%) Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/prog_to_nir.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index ec61100356a..1bd735a47bb 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -527,8 +527,7 @@ ptn_dp4(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
static void
ptn_dph(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
{
- nir_ssa_def *dp3 = nir_fdot3(b, src[0], src[1]);
- ptn_move_dest(b, dest, nir_fadd(b, dp3, ptn_channel(b, src[1], W)));
+ ptn_move_dest(b, dest, nir_fdph(b, src[0], src[1]));
}
static void