summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/glide/fxdd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/glide/fxdd.c')
-rw-r--r--src/mesa/drivers/glide/fxdd.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index b69b6999ea..3811770558 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -831,7 +831,7 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa )
fxMesa->glCtx->Const.MaxTextureLevels=9;
fxMesa->glCtx->Const.MaxTextureSize=256;
fxMesa->glCtx->Const.MaxTextureUnits=fxMesa->emulateTwoTMUs ? 2 : 1;
- fxMesa->new_state = NEW_ALL;
+ fxMesa->new_state = _NEW_ALL;
fxDDSetupInit();
fxDDCvaInit();
@@ -888,7 +888,7 @@ void fxDDInitExtensions( GLcontext *ctx )
gl_extensions_disable(ctx, "GL_EXT_blend_color");
gl_extensions_disable(ctx, "GL_EXT_fog_coord");
- gl_extensions_add(ctx, DEFAULT_ON, "3DFX_set_global_palette", 0);
+ gl_extensions_add(ctx, GL_TRUE, "3DFX_set_global_palette", 0);
if (!fxMesa->haveTwoTMUs)
gl_extensions_disable(ctx, "GL_EXT_texture_env_add");
@@ -1022,9 +1022,6 @@ static GLboolean fxIsInHardware(GLcontext *ctx)
}
-
-#define INTERESTED (~(NEW_MODELVIEW|NEW_PROJECTION|NEW_PROJECTION|NEW_TEXTURE_MATRIX|NEW_USER_CLIP|NEW_CLIENT_STATE|NEW_TEXTURE_ENABLE))
-
static void fxDDUpdateDDPointers(GLcontext *ctx)
{
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
@@ -1033,23 +1030,26 @@ static void fxDDUpdateDDPointers(GLcontext *ctx)
if (MESA_VERBOSE&(VERBOSE_DRIVER|VERBOSE_STATE))
fprintf(stderr,"fxmesa: fxDDUpdateDDPointers(...)\n");
- if (new_state & (NEW_RASTER_OPS|NEW_TEXTURING))
+ if (new_state & _FX_NEW_FALLBACK)
fxMesa->is_in_hardware = fxIsInHardware(ctx);
if (fxMesa->is_in_hardware) {
if (fxMesa->new_state)
fxSetupFXUnits(ctx);
- if(new_state & INTERESTED) {
+ if (new_state & _FX_NEW_RENDERSTATE) {
fxDDChooseRenderState( ctx );
+
fxMesa->RenderVBTables=fxDDChooseRenderVBTables(ctx);
fxMesa->RenderVBClippedTab=fxMesa->RenderVBTables[0];
fxMesa->RenderVBCulledTab=fxMesa->RenderVBTables[1];
fxMesa->RenderVBRawTab=fxMesa->RenderVBTables[2];
-
- ctx->Driver.RasterSetup=fxDDChooseSetupFunction(ctx);
}
-
+
+ if (new_state & _FX_NEW_SETUP_FUNCTION)
+ ctx->Driver.RasterSetup=fxDDChooseSetupFunction(ctx);
+
+
ctx->Driver.PointsFunc=fxMesa->PointsFunc;
ctx->Driver.LineFunc=fxMesa->LineFunc;
ctx->Driver.TriangleFunc=fxMesa->TriangleFunc;
@@ -1075,6 +1075,13 @@ void fxSetupDDPointers(GLcontext *ctx)
fprintf(stderr,"fxmesa: fxSetupDDPointers()\n");
}
+ ctx->Driver.UpdateStateNotify = (_FX_NEW_SETUP_FUNCTION|
+ _FX_NEW_RENDERSTATE|
+ _FX_NEW_FALLBACK|
+ _SWRAST_NEW_TRIANGLE|
+ _SWRAST_NEW_LINE|
+ _SWRAST_NEW_POINT);
+
ctx->Driver.UpdateState=fxDDUpdateDDPointers;
ctx->Driver.WriteDepthSpan=fxDDWriteDepthSpan;