summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-05-23 09:14:17 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-05-23 09:16:58 +0100
commit3b41d619a1b7cc8c356c32af777486461ddd7926 (patch)
tree2296fdef018853d0b83e3eafd7be7ef6adf5fec4
parentadc1f88fc9278bdbb3b24a6d48f91a0bd98e9f1c (diff)
draw: faster LIT(), incorrect though
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_aos.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c
index 930914f609..b0c3ac49d2 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos.c
+++ b/src/gallium/auxiliary/draw/draw_vs_aos.c
@@ -1098,7 +1098,13 @@ static boolean emit_LIT( struct aos_compilation *cp, const struct tgsi_full_inst
* Note: use 1.0 to avoid passing zero to
*/
x87_fldz(cp->func); /* 1 0 */
+#if 1
+ x87_fld1(cp->func); /* 1 0 */
+#else
+ /* Correct but slow due to fp exceptions generated in fyl2x - fix me.
+ */
x87_fldz(cp->func); /* 1 0 */
+#endif
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 */