summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/ffb
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2004-01-21 16:08:43 +0000
committerIan Romanick <[email protected]>2004-01-21 16:08:43 +0000
commit20a17e42d7fc9fe65aabe612fe1e513c3103d121 (patch)
treeace6f8746d47c9a1f3f397dceebc6ce58e045c0a /src/mesa/drivers/dri/ffb
parent4d36f334c9b3ab6b4e6901802e64ee7391a422ef (diff)
Remove dd_function_table::BlendFunc. All drivers now use
dd_function_table:BlendFuncSeparate. If a driver does not actually support EXT_blend_func_separate, it can assume that the RGB and alpha blend functions are the same.
Diffstat (limited to 'src/mesa/drivers/dri/ffb')
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_state.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/ffb/ffb_state.c b/src/mesa/drivers/dri/ffb/ffb_state.c
index ac753b922a1..ddda946f4b0 100644
--- a/src/mesa/drivers/dri/ffb/ffb_state.c
+++ b/src/mesa/drivers/dri/ffb/ffb_state.c
@@ -102,14 +102,19 @@ static void ffbDDBlendEquation(GLcontext *ctx, GLenum mode)
FALLBACK( ctx, (mode != GL_FUNC_ADD_EXT), FFB_BADATTR_BLENDEQN);
}
-static void ffbDDBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor)
+static void ffbDDBlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB,
+ GLenum dfactorRGB, GLenum sfactorA,
+ GLenum dfactorA)
{
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
unsigned int blendc = 1 << 4;
#ifdef STATE_TRACE
- fprintf(stderr, "ffbDDBlendFunc: sfactor(%s) dfactor(%s)\n",
- _mesa_lookup_enum_by_nr(sfactor), _mesa_lookup_enum_by_nr(dfactor));
+ fprintf(stderr, "ffbDDBlendFuncSeparate: sRGB(%s) dRGB(%s) sA(%s) dA(%s)\n",
+ _mesa_lookup_enum_by_nr(sfactorRGB),
+ _mesa_lookup_enum_by_nr(dfactorRGB),
+ _mesa_lookup_enum_by_nr(sfactorA),
+ _mesa_lookup_enum_by_nr(dfactorA));
#endif
switch (ctx->Color.BlendSrcRGB) {
case GL_ZERO:
@@ -179,21 +184,6 @@ static void ffbDDBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor)
}
}
-static void ffbDDBlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB,
- GLenum dfactorRGB, GLenum sfactorA,
- GLenum dfactorA)
-{
-#ifdef STATE_TRACE
- fprintf(stderr, "ffbDDBlendFuncSeparate: sRGB(%s) dRGB(%s) sA(%s) dA(%s)\n",
- _mesa_lookup_enum_by_nr(sfactorRGB),
- _mesa_lookup_enum_by_nr(dfactorRGB),
- _mesa_lookup_enum_by_nr(sfactorA),
- _mesa_lookup_enum_by_nr(dfactorA));
-#endif
-
- ffbDDBlendFunc(ctx, sfactorRGB, dfactorRGB);
-}
-
static void ffbDDDepthFunc(GLcontext *ctx, GLenum func)
{
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
@@ -817,7 +807,7 @@ static void ffbDDEnable(GLcontext *ctx, GLenum cap, GLboolean state)
if (fmesa->ppc != tmp) {
fmesa->ppc = tmp;
FFB_MAKE_DIRTY(fmesa, FFB_STATE_PPC, 1);
- ffbDDBlendFunc(ctx, 0, 0);
+ ffbDDBlendFuncSeparate(ctx, 0, 0, 0, 0 );
}
break;
@@ -1063,7 +1053,6 @@ void ffbDDInitStateFuncs(GLcontext *ctx)
ctx->Driver.Enable = ffbDDEnable;
ctx->Driver.AlphaFunc = ffbDDAlphaFunc;
ctx->Driver.BlendEquation = ffbDDBlendEquation;
- ctx->Driver.BlendFunc = ffbDDBlendFunc;
ctx->Driver.BlendFuncSeparate = ffbDDBlendFuncSeparate;
ctx->Driver.DepthFunc = ffbDDDepthFunc;
ctx->Driver.DepthMask = ffbDDDepthMask;