summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-03-30 05:17:56 -0700
committerKenneth Graunke <[email protected]>2015-04-01 13:30:13 -0700
commit4b38c5c783e8858f362bb1ff6cf651875bd0bbc5 (patch)
tree280d5a7792181ada4792b3df644327c8e8246c39 /src/mesa
parent218e45e2f7b2d6c20bbba837f6e5cbe15610771e (diff)
nir: In prog->nir, don't wrap dot products with ptn_channel(..., X).
ptn_move_dest and nir_fadd already take care of replicating the last channel out, so we can just use a scalar and skip splatting it. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/program/prog_to_nir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index d0e611003d6..4e210d190de 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -499,25 +499,25 @@ ptn_xpd(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
static void
ptn_dp2(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
{
- ptn_move_dest(b, dest, ptn_channel(b, nir_fdot2(b, src[0], src[1]), X));
+ ptn_move_dest(b, dest, nir_fdot2(b, src[0], src[1]));
}
static void
ptn_dp3(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
{
- ptn_move_dest(b, dest, ptn_channel(b, nir_fdot3(b, src[0], src[1]), X));
+ ptn_move_dest(b, dest, nir_fdot3(b, src[0], src[1]));
}
static void
ptn_dp4(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
{
- ptn_move_dest(b, dest, ptn_channel(b, nir_fdot4(b, src[0], src[1]), X));
+ ptn_move_dest(b, dest, nir_fdot4(b, src[0], src[1]));
}
static void
ptn_dph(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
{
- nir_ssa_def *dp3 = ptn_channel(b, nir_fdot3(b, src[0], src[1]), X);
+ 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)));
}