From: Brian Paul Date: Fri, 20 Jun 2008 17:05:00 +0000 (-0600) Subject: mesa: revamp glBlendFunc loopback X-Git-Tag: 062012170305~17580^2~390^2~1155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9cae37870e66550d8cceac4b4a8765c1936d4ddc;p=profile%2Fivi%2Fmesa.git mesa: revamp glBlendFunc loopback --- diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index 742247f..4d4a897 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -46,19 +46,11 @@ * \param dfactor destination factor operator. * * \sa glBlendFunc, glBlendFuncSeparateEXT - * - * Swizzles the inputs and calls \c glBlendFuncSeparateEXT. This is done - * using the \c CurrentDispatch table in the context, so this same function - * can be used while compiling display lists. Therefore, there is no need - * for the display list code to save and restore this function. */ void GLAPIENTRY _mesa_BlendFunc( GLenum sfactor, GLenum dfactor ) { - GET_CURRENT_CONTEXT(ctx); - - (*ctx->CurrentDispatch->BlendFuncSeparateEXT)( sfactor, dfactor, - sfactor, dfactor ); + _mesa_BlendFuncSeparateEXT(sfactor, dfactor, sfactor, dfactor); } diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 07d279d..c672c0f 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -926,6 +926,13 @@ save_BlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, static void GLAPIENTRY +save_BlendFunc(GLenum srcfactor, GLenum dstfactor) +{ + save_BlendFuncSeparate(srcfactor, dstfactor, srcfactor, dstfactor); +} + + +static void GLAPIENTRY save_BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { GET_CURRENT_CONTEXT(ctx); @@ -7602,7 +7609,7 @@ _mesa_init_dlist_table(struct _glapi_table *table) SET_Accum(table, save_Accum); SET_AlphaFunc(table, save_AlphaFunc); SET_Bitmap(table, save_Bitmap); - SET_BlendFunc(table, _mesa_BlendFunc); /* loops-back to BlendFuncSeparate */ + SET_BlendFunc(table, _save_BlendFunc); SET_CallList(table, _mesa_save_CallList); SET_CallLists(table, _mesa_save_CallLists); SET_Clear(table, save_Clear);