summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-05-22 20:22:15 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-05-23 09:16:58 +0100
commit7106da136069f865747e03c30ca245bc030b241b (patch)
treee2a2a597eb64a5f125a0104d03ee74c54aa46599 /src/gallium/auxiliary
parent43df4642f1d2f3d2673a1d5e4f5126f5175fb899 (diff)
draw: correct but slow LIT() in aos varient
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_aos.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c
index 93bb4f9bc0..930914f609 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos.c
+++ b/src/gallium/auxiliary/draw/draw_vs_aos.c
@@ -1093,10 +1093,12 @@ static boolean emit_LIT( struct aos_compilation *cp, const struct tgsi_full_inst
- /* a1' = a1 <= 0 ? 1 : a1;
+ /* a1' = a1 <= 0 ? 1 : a1;
+ *
+ * Note: use 1.0 to avoid passing zero to
*/
- x87_fldz(cp->func); /* 0 */
- x87_fld1(cp->func); /* 1 0 */
+ x87_fldz(cp->func); /* 1 0 */
+ x87_fldz(cp->func); /* 1 0 */
x87_fld_src(cp, &op->FullSrcRegisters[0], 1); /* a1 1 0 */
x87_fcomi(cp->func, st2); /* a1 1 0 */
x87_fcmovb(cp->func, st1); /* a1' 1 0 */
@@ -1119,17 +1121,14 @@ static boolean emit_LIT( struct aos_compilation *cp, const struct tgsi_full_inst
x87_fld_src(cp, &op->FullSrcRegisters[0], 0); /* a0 0 r2 */
x87_fcomi(cp->func, st1);
x87_fcmovb(cp->func, st1); /* a0' 0 r2 */
- x87_fstp(cp->func, st1); /* a0' r2 */
- x87_fxch(cp->func, st1); /* a0' r2 */
x87_fst_or_nop(cp->func, writemask, 1, dst); /* result[1] = a0' */
- x87_fldz(cp->func); /* 0 a0' r2 */
- x87_fcomi(cp->func, st1); /* 0 a0' r2 */
- x87_fcmovnbe(cp->func, st2); /* r2' a0' r2 */
+ x87_fcomi(cp->func, st1); /* a0' 0 r2 */
+ x87_fcmovnbe(cp->func, st2); /* r2' 0' r2 */
- x87_fstp_or_pop(cp->func, writemask, 2, dst);
- x87_fpop(cp->func);
+ x87_fstp_or_pop(cp->func, writemask, 2, dst); /* 0 r2 */
+ x87_fpop(cp->func); /* r2 */
x87_fpop(cp->func);
}