summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_blend.c
diff options
context:
space:
mode:
authorJose Fonseca <[email protected]>2002-04-19 20:12:30 +0000
committerJose Fonseca <[email protected]>2002-04-19 20:12:30 +0000
commit3fe2bb8933c15a7091838fd982dbad402fe6ad43 (patch)
treeda6c366c6230aab1b23afbeb8f97fc42f2ee3e55 /src/mesa/swrast/s_blend.c
parent4fa66fa85ccc1b35411c1deb65119cde6c9d44a4 (diff)
Added min and max blend functions.
Slight optimization of _mesa_mmx_blend_add.
Diffstat (limited to 'src/mesa/swrast/s_blend.c')
-rw-r--r--src/mesa/swrast/s_blend.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c
index 0d75e2a8cfd..73e7de5c31d 100644
--- a/src/mesa/swrast/s_blend.c
+++ b/src/mesa/swrast/s_blend.c
@@ -1,4 +1,4 @@
-/* $Id: s_blend.c,v 1.21 2002/04/19 10:53:08 jrfonseca Exp $ */
+/* $Id: s_blend.c,v 1.22 2002/04/19 20:12:31 jrfonseca Exp $ */
/*
* Mesa 3-D graphics library
@@ -678,10 +678,22 @@ void _swrast_choose_blend_func( GLcontext *ctx )
SWRAST_CONTEXT(ctx)->BlendFunc = blend_modulate;
}
else if (eq==GL_MIN_EXT) {
- SWRAST_CONTEXT(ctx)->BlendFunc = blend_min;
+#if defined(USE_MMX_ASM)
+ if ( cpu_has_mmx ) {
+ SWRAST_CONTEXT(ctx)->BlendFunc = _mesa_mmx_blend_min;
+ }
+ else
+#endif
+ SWRAST_CONTEXT(ctx)->BlendFunc = blend_min;
}
else if (eq==GL_MAX_EXT) {
- SWRAST_CONTEXT(ctx)->BlendFunc = blend_max;
+#if defined(USE_MMX_ASM)
+ if ( cpu_has_mmx ) {
+ SWRAST_CONTEXT(ctx)->BlendFunc = _mesa_mmx_blend_max;
+ }
+ else
+#endif
+ SWRAST_CONTEXT(ctx)->BlendFunc = blend_max;
}
else if (eq==GL_FUNC_ADD_EXT && srcRGB == GL_ZERO && dstRGB == GL_ONE) {
SWRAST_CONTEXT(ctx)->BlendFunc = blend_noop;