diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-01-30 23:31:51 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-01-30 23:31:51 +0000 |
commit | f924a933b4ead8883e918f65ca59824c0dab1f8e (patch) | |
tree | a37c392ca1a9bcf816e3e296d1bf6cea7ca6b618 /src/mesa/drivers/dri/unichrome/via_state.c | |
parent | f18598cbd2802e61c2cbb1d610630da9b5951169 (diff) |
Minor fixes for recent Mesa 6.1 changes
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_state.c')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_state.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c index 88eb011d5c..61000f228a 100644 --- a/src/mesa/drivers/dri/unichrome/via_state.c +++ b/src/mesa/drivers/dri/unichrome/via_state.c @@ -88,13 +88,17 @@ static void viaAlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref) vmesa = vmesa; } -static void viaBlendEquation(GLcontext *ctx, GLenum mode) +static void viaBlendEquationSeparate(GLcontext *ctx, GLenum rgbMode, GLenum aMode) { #ifdef DEBUG if (VIA_DEBUG) fprintf(stderr, "%s in\n", __FUNCTION__); #endif + + /* GL_EXT_blend_equation_separate not supported */ + ASSERT(rgbMode == aMode); + /* Can only do GL_ADD equation in hardware */ - FALLBACK(VIA_CONTEXT(ctx), VIA_FALLBACK_BLEND_EQ, mode != GL_FUNC_ADD_EXT); + FALLBACK(VIA_CONTEXT(ctx), VIA_FALLBACK_BLEND_EQ, rgbMode != GL_FUNC_ADD_EXT); /* BlendEquation sets ColorLogicOpEnabled in an unexpected * manner. @@ -522,7 +526,7 @@ void viaChooseTextureState(GLcontext *ctx) if (texUnit0->_ReallyEnabled) { struct gl_texture_object *texObj = texUnit0->_Current; - struct gl_texture_image *texImage = texObj->Image[0]; + struct gl_texture_image *texImage = texObj->Image[0][0]; GLint r, g, b, a; #ifdef DEBUG if (VIA_DEBUG) fprintf(stderr, "texUnit0->_ReallyEnabled\n"); @@ -3079,7 +3083,7 @@ void viaChooseTextureState(GLcontext *ctx) if (texUnit1->_ReallyEnabled) { struct gl_texture_object *texObj = texUnit1->_Current; - struct gl_texture_image *texImage = texObj->Image[0]; + struct gl_texture_image *texImage = texObj->Image[0][0]; GLint r, g, b, a; if (texImage->Border) { @@ -6334,7 +6338,7 @@ void viaInitStateFuncs(GLcontext *ctx) /* API callbacks */ ctx->Driver.AlphaFunc = viaAlphaFunc; - ctx->Driver.BlendEquation = viaBlendEquation; + ctx->Driver.BlendEquationSeparate = viaBlendEquationSeparate; //ctx->Driver.BlendFunc = viaBlendFunc; ctx->Driver.BlendFuncSeparate = viaBlendFuncSeparate; ctx->Driver.ClearColor = viaClearColor; |