summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-05-27 17:45:54 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-05-27 17:52:24 +0100
commit2ec419d40dba43305c28fca9658ea00541f67821 (patch)
treecb06a12c191625491d93ec0944f2d735e7957f80 /src/gallium/auxiliary/draw
parentf8762ba5234fd1b44e11e76bb5f58d2305c90572 (diff)
draw: fix ABS aliasing bug
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_aos.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c
index e2e96470f7..1c63677e6e 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos.c
+++ b/src/gallium/auxiliary/draw/draw_vs_aos.c
@@ -964,12 +964,13 @@ static boolean emit_ABS( struct aos_compilation *cp, const struct tgsi_full_inst
{
struct x86_reg arg0 = fetch_src(cp, &op->FullSrcRegisters[0]);
struct x86_reg neg = aos_get_internal(cp, IMM_NEGS);
- struct x86_reg dst = get_xmm_writable(cp, arg0);
+ struct x86_reg tmp = aos_get_xmm_reg(cp);
- sse_mulps(cp->func, dst, neg);
- sse_maxps(cp->func, dst, arg0);
+ sse_movaps(cp->func, tmp, arg0);
+ sse_mulps(cp->func, tmp, neg);
+ sse_maxps(cp->func, tmp, arg0);
- store_dest(cp, &op->FullDstRegisters[0], dst);
+ store_dest(cp, &op->FullDstRegisters[0], tmp);
return TRUE;
}