summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2008-12-09 13:10:56 -0800
committerEric Anholt <eric@anholt.net>2008-12-09 13:17:48 -0800
commitb66495a0d915f5d5cc5ab50c843c9c1b296a5851 (patch)
tree7f0e7b1770b4590998a632168e3f0d0ed7840bef /src/mesa/tnl
parent6e29a3c8e2dc920b6216a0df6357abd8234f1ec4 (diff)
tnl: Optimize SSE load[23]f_1 since they don't need the identity swizzle.
SSE movss from memory zeroes out everything above the destination dword, so we get the (a, 0) or (a, 0, 0) result that these functions needed. Bug #16520.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_vertex_sse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_vertex_sse.c b/src/mesa/tnl/t_vertex_sse.c
index d8021a3d2c..07adc1ed79 100644
--- a/src/mesa/tnl/t_vertex_sse.c
+++ b/src/mesa/tnl/t_vertex_sse.c
@@ -146,7 +146,8 @@ static void emit_load3f_1( struct x86_program *p,
struct x86_reg dest,
struct x86_reg arg0 )
{
- emit_load4f_1(p, dest, arg0);
+ /* Loading from memory erases the upper bits. */
+ sse_movss(&p->func, dest, arg0);
}
static void emit_load2f_2( struct x86_program *p,
@@ -160,7 +161,8 @@ static void emit_load2f_1( struct x86_program *p,
struct x86_reg dest,
struct x86_reg arg0 )
{
- emit_load4f_1(p, dest, arg0);
+ /* Loading from memory erases the upper bits. */
+ sse_movss(&p->func, dest, arg0);
}
static void emit_load1f_1( struct x86_program *p,