diff options
author | Ian Romanick <[email protected]> | 2004-01-27 18:52:40 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2004-01-27 18:52:40 +0000 |
commit | c93105eb9e2499efb237fd89dba0cebd48f18375 (patch) | |
tree | e105eeceae3f57be1b583e51957d6f39038fed34 /src/mesa/drivers/dri/radeon | |
parent | dd9e6e7e37fbb8c30c8085ed784539d94110aa3e (diff) |
Added support for EXT_blend_equation_separate / ATI_blend_equation_separate.
The internal driver interface was also changed to use
BlendEquationSeparate instead of BlendEquation.
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_state.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c index 74e918fd001..25aa3fadfe9 100644 --- a/src/mesa/drivers/dri/radeon/radeon_state.c +++ b/src/mesa/drivers/dri/radeon/radeon_state.c @@ -102,13 +102,16 @@ static void radeonAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref ) rmesa->hw.ctx.cmd[CTX_PP_MISC] = pp_misc; } -static void radeonBlendEquation( GLcontext *ctx, GLenum mode ) +static void radeonBlendEquationSeparate( GLcontext *ctx, + GLenum modeRGB, GLenum modeA ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); GLuint b = rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] & ~RADEON_COMB_FCN_MASK; GLboolean fallback = GL_FALSE; - switch ( mode ) { + assert( modeRGB == modeA ); + + switch ( modeRGB ) { case GL_FUNC_ADD: case GL_LOGIC_OP: b |= RADEON_COMB_FCN_ADD_CLAMP; @@ -1693,7 +1696,9 @@ static void radeonEnable( GLcontext *ctx, GLenum cap, GLboolean state ) /* Catch a possible fallback: */ if (state) { - ctx->Driver.BlendEquation( ctx, ctx->Color.BlendEquation ); + ctx->Driver.BlendEquationSeparate( ctx, + ctx->Color.BlendEquationRGB, + ctx->Color.BlendEquationA ); ctx->Driver.BlendFuncSeparate( ctx, ctx->Color.BlendSrcRGB, ctx->Color.BlendDstRGB, ctx->Color.BlendSrcRGB, @@ -2186,7 +2191,7 @@ void radeonInitStateFuncs( GLcontext *ctx ) ctx->Driver.ReadBuffer = radeonReadBuffer; ctx->Driver.AlphaFunc = radeonAlphaFunc; - ctx->Driver.BlendEquation = radeonBlendEquation; + ctx->Driver.BlendEquationSeparate = radeonBlendEquationSeparate; ctx->Driver.BlendFuncSeparate = radeonBlendFuncSeparate; ctx->Driver.ClearColor = radeonClearColor; ctx->Driver.ClearDepth = radeonClearDepth; |