mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
MMX add blending function added.
This commit is contained in:
parent
533e88824a
commit
0c527ab054
3 changed files with 29 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* $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
|
||||
|
|
@ -656,7 +656,13 @@ void _swrast_choose_blend_func( GLcontext *ctx )
|
|||
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))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $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
|
||||
|
|
@ -32,6 +32,10 @@ extern void _ASMAPI
|
|||
_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] );
|
||||
|
|
|
|||
|
|
@ -270,7 +270,22 @@ const_80:
|
|||
#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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue