diff options
Diffstat (limited to 'xc/extras/Mesa/src/FX/fxsetup.c')
-rw-r--r-- | xc/extras/Mesa/src/FX/fxsetup.c | 61 |
1 files changed, 36 insertions, 25 deletions
diff --git a/xc/extras/Mesa/src/FX/fxsetup.c b/xc/extras/Mesa/src/FX/fxsetup.c index 8707aed1d..5e82443d7 100644 --- a/xc/extras/Mesa/src/FX/fxsetup.c +++ b/xc/extras/Mesa/src/FX/fxsetup.c @@ -69,7 +69,7 @@ static void fxSetupDepthTest(GLcontext *ctx); static void fxSetupScissor(GLcontext *ctx); static void fxSetupCull(GLcontext *ctx); static void gl_print_fx_state_flags( const char *msg, GLuint flags); -static GLboolean fxMultipassBlend(struct vertex_buffer *, GLuint); +/*static GLboolean fxMultipassBlend(struct vertex_buffer *, GLuint);*/ static GLboolean fxMultipassTexture( struct vertex_buffer *, GLuint ); static void fxTexValidate(GLcontext *ctx, struct gl_texture_object *tObj) @@ -183,7 +183,7 @@ static GLuint fxGetTexSetConfiguration(GLcontext *ctx, GLuint envmode=0; GLuint ifmt=0; - if((ctx->Light.ShadeModel==GL_SMOOTH) || + if((ctx->Light.ShadeModel==GL_SMOOTH) || 1 || (ctx->Point.SmoothFlag) || (ctx->Line.SmoothFlag) || (ctx->Polygon.SmoothFlag)) @@ -191,11 +191,13 @@ static GLuint fxGetTexSetConfiguration(GLcontext *ctx, else unitsmode|=FX_UM_ALPHA_CONSTANT; - if(ctx->Light.ShadeModel==GL_SMOOTH) + if(ctx->Light.ShadeModel==GL_SMOOTH || 1) unitsmode|=FX_UM_COLOR_ITERATED; else unitsmode|=FX_UM_COLOR_CONSTANT; + + /* OpenGL Feeds Texture 0 into Texture 1 Glide Feeds Texture 1 into Texture 0 @@ -476,8 +478,8 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset) else unitsmode=fxGetTexSetConfiguration(ctx,NULL,tObj); - if(fxMesa->lastUnitsMode==unitsmode) - return; +/* if(fxMesa->lastUnitsMode==unitsmode) */ +/* return; */ fxMesa->lastUnitsMode=unitsmode; @@ -555,9 +557,8 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset) FXTRUE); ctx->Driver.MultipassFunc = fxMultipassBlend; #else -#ifndef FX_SILENT - fprintf(stderr,"fx Driver: GL_BLEND not yet supported\n"); -#endif + if (MESA_VERBOSE&VERBOSE_DRIVER) + fprintf(stderr,"fx Driver: GL_BLEND not yet supported\n"); #endif break; case GL_REPLACE: @@ -588,9 +589,9 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset) FXFALSE); break; default: -#ifndef FX_SILENT - fprintf(stderr,"fx Driver: %x Texture.EnvMode not yet supported\n",ctx->Texture.Unit[textureset].EnvMode); -#endif + if (MESA_VERBOSE&VERBOSE_DRIVER) + fprintf(stderr, "fx Driver: %x Texture.EnvMode not yet supported\n", + ctx->Texture.Unit[textureset].EnvMode); break; } @@ -764,8 +765,8 @@ static void fxSetupTextureDoubleTMU_NoLock(GLcontext *ctx) unitsmode=fxGetTexSetConfiguration(ctx,tObj0,tObj1); - if(fxMesa->lastUnitsMode==unitsmode) - return; +/* if(fxMesa->lastUnitsMode==unitsmode) */ +/* return; */ fxMesa->lastUnitsMode=unitsmode; @@ -1030,7 +1031,7 @@ static void fxSetupTextureNone_NoLock(GLcontext *ctx) fprintf(stderr,"fxmesa: fxSetupTextureNone(...)\n"); } - if((ctx->Light.ShadeModel==GL_SMOOTH) || + if((ctx->Light.ShadeModel==GL_SMOOTH) || 1 || (ctx->Point.SmoothFlag) || (ctx->Line.SmoothFlag) || (ctx->Polygon.SmoothFlag)) @@ -1038,7 +1039,7 @@ static void fxSetupTextureNone_NoLock(GLcontext *ctx) else locala=GR_COMBINE_LOCAL_CONSTANT; - if(ctx->Light.ShadeModel==GL_SMOOTH) + if(ctx->Light.ShadeModel==GL_SMOOTH || 1) localc=GR_COMBINE_LOCAL_ITERATED; else localc=GR_COMBINE_LOCAL_CONSTANT; @@ -1410,14 +1411,20 @@ static void fxSetupColorMask(GLcontext *ctx) { fxMesaContext fxMesa = FX_CONTEXT(ctx); - FX_grColorMask(ctx->Color.ColorMask[RCOMP] || - ctx->Color.ColorMask[GCOMP] || - ctx->Color.ColorMask[BCOMP], - ctx->Color.ColorMask[ACOMP] && fxMesa->haveAlphaBuffer); + if (ctx->Color.DrawBuffer == GL_NONE) { + FX_grColorMask(FXFALSE, FXFALSE); + } + else { + FX_grColorMask(ctx->Color.ColorMask[RCOMP] || + ctx->Color.ColorMask[GCOMP] || + ctx->Color.ColorMask[BCOMP], + ctx->Color.ColorMask[ACOMP] && fxMesa->haveAlphaBuffer); + } } + /************************************************************************/ /**************************** Fog Mode SetUp ****************************/ /************************************************************************/ @@ -1615,6 +1622,9 @@ void fxDDEnable(GLcontext *ctx, GLenum cap, GLboolean state) fxMesa->new_state |= FX_NEW_SCISSOR; ctx->Driver.RenderStart = fxSetupFXUnits; break; + case GL_SHARED_TEXTURE_PALETTE_EXT: + fxDDTexUseGlbPalette(ctx, state); + break; case GL_FOG: fxMesa->new_state |= FX_NEW_FOG; ctx->Driver.RenderStart = fxSetupFXUnits; @@ -1624,6 +1634,7 @@ void fxDDEnable(GLcontext *ctx, GLenum cap, GLboolean state) ctx->Driver.RenderStart = fxSetupFXUnits; break; case GL_LINE_SMOOTH: + case GL_LINE_STIPPLE: case GL_POINT_SMOOTH: case GL_POLYGON_SMOOTH: case GL_TEXTURE_2D: @@ -1631,7 +1642,7 @@ void fxDDEnable(GLcontext *ctx, GLenum cap, GLboolean state) ctx->Driver.RenderStart = fxSetupFXUnits; break; default: - ; /* XXX no-op??? */ + ; /* XXX no-op? */ } } @@ -1664,10 +1675,10 @@ static GLboolean fxMultipassBlend(struct vertex_buffer *VB, GLuint pass) fxDDDepthMask(ctx, FALSE); } /* Enable Cc*Ct mode */ - /* ??? Set the Constant Color ??? */ + /* XXX Set the Constant Color ? */ fxDDEnable(ctx, GL_BLEND, GL_TRUE); - fxDDBlendFunc(ctx, ???, ???); - fxSetupTextureSingleTMU(ctx, ???); + fxDDBlendFunc(ctx, XXX, XXX); + fxSetupTextureSingleTMU(ctx, XXX); fxSetupBlend(ctx); fxSetupDepthTest(ctx); break; @@ -1675,8 +1686,8 @@ static GLboolean fxMultipassBlend(struct vertex_buffer *VB, GLuint pass) case 2: /* Reset everything back to normal */ fxMesa->unitsState = fxMesa->restoreUnitsState; - fxMesa->setupdone &= ???; - fxSetupTextureSingleTMU(ctx, ???); + fxMesa->setupdone &= XXX; + fxSetupTextureSingleTMU(ctx, XXX); fxSetupBlend(ctx); fxSetupDepthTest(ctx); break; |