-/* $Id: s_blend.c,v 1.20 2002/04/19 10:33:34 jrfonseca Exp $ */
+/* $Id: s_blend.c,v 1.21 2002/04/19 10:53:08 jrfonseca Exp $ */
/*
* Mesa 3-D graphics library
SWRAST_CONTEXT(ctx)->BlendFunc = blend_transparency;
}
else if (eq==GL_FUNC_ADD_EXT && srcRGB==GL_ONE && dstRGB==GL_ONE) {
- SWRAST_CONTEXT(ctx)->BlendFunc = blend_add;
+#if defined(USE_MMX_ASM)
+ if ( cpu_has_mmx ) {
+ SWRAST_CONTEXT(ctx)->BlendFunc = _mesa_mmx_blend_add;
+ }
+ else
+#endif
+ SWRAST_CONTEXT(ctx)->BlendFunc = blend_add;
}
else if (((eq==GL_FUNC_ADD_EXT || eq==GL_FUNC_REVERSE_SUBTRACT_EXT)
&& (srcRGB==GL_ZERO && dstRGB==GL_SRC_COLOR))
-/* $Id: mmx.h,v 1.7 2002/04/19 10:33:34 jrfonseca Exp $ */
+/* $Id: mmx.h,v 1.8 2002/04/19 10:53:08 jrfonseca Exp $ */
/*
* Mesa 3-D graphics library
_mesa_mmx_blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[],
GLubyte rgba[][4], const GLubyte dest[][4] );
+extern void _ASMAPI
+_mesa_mmx_blend_add( GLcontext *ctx, GLuint n, const GLubyte mask[],
+ GLubyte rgba[][4], const GLubyte dest[][4] );
+
extern void _ASMAPI
_mesa_mmx_blend_modulate( GLcontext *ctx, GLuint n, const GLubyte mask[],
GLubyte rgba[][4], const GLubyte dest[][4] );
#include "mmx_blendtmp.h"
-/* modulate
+/* add bleding mode
+ */
+
+#define TAG(x) x##_add
+
+#define INIT
+
+#define MAIN( rgba, dest ) \
+ GMB_LOAD( rgba, dest, MM1, MM2 ) ;\
+ PADDUSB ( MM1, MM2 ) ;\
+ GMB_STORE( rgba, MM2 )
+
+#include "mmx_blendtmp.h"
+
+
+/* modulate blending mode
*/
#define TAG(x) x##_modulate