From: Brian Paul Date: Wed, 29 Aug 2001 03:58:42 +0000 (+0000) Subject: changes to allow the driver to compile - still doesn't work though X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=04ec0fd71e3ba758e0ddc950ec68c3af4c58b1ab;p=mesa.git changes to allow the driver to compile - still doesn't work though --- diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index e645f65be68..28341a08bba 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -664,8 +664,10 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa) } if (firsttime) { +#if 00 fxDDSetupInit(); fxDDTrifuncInit(); +#endif firsttime = 0; } @@ -932,7 +934,6 @@ fx_check_IsInHardware(GLcontext * ctx) - static void update_texture_scales(GLcontext * ctx) { @@ -958,7 +959,7 @@ update_texture_scales(GLcontext * ctx) static void fxDDUpdateDDPointers(GLcontext * ctx, GLuint new_state) { - TNLcontext *tnl = TNL_CONTEXT(ctx); + /* TNLcontext *tnl = TNL_CONTEXT(ctx);*/ fxMesaContext fxMesa = FX_CONTEXT(ctx); _swrast_InvalidateState(ctx, new_state); @@ -986,9 +987,10 @@ fxDDUpdateDDPointers(GLcontext * ctx, GLuint new_state) if (fxMesa->is_in_hardware) { if (new_state & _FX_NEW_RENDERSTATE) fxDDChooseRenderState(ctx); - +#if 000 if (new_state & _FX_NEW_SETUP_FUNCTION) fxDDChooseSetupState(ctx); +#endif } if (new_state & _NEW_TEXTURE) @@ -1002,6 +1004,8 @@ fxDDUpdateDDPointers(GLcontext * ctx, GLuint new_state) void fxSetupDDPointers(GLcontext * ctx) { + TNLcontext *tnl = TNL_CONTEXT(ctx); + if (MESA_VERBOSE & VERBOSE_DRIVER) { fprintf(stderr, "fxmesa: fxSetupDDPointers()\n"); } @@ -1055,6 +1059,13 @@ fxSetupDDPointers(GLcontext * ctx) ctx->Driver.ShadeModel = fxDDShadeModel; ctx->Driver.Enable = fxDDEnable; + tnl->Driver.RunPipeline = _tnl_run_pipeline; + + /* XXX is this right? (BP) */ + /* Install swsetup for tnl->Driver.Render.*: + */ + _swsetup_Wakeup(ctx); + fxSetupDDSpanPointers(ctx); fxDDUpdateDDPointers(ctx, ~0); } diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h index 09674680c97..6f33f13e31c 100644 --- a/src/mesa/drivers/glide/fxdrv.h +++ b/src/mesa/drivers/glide/fxdrv.h @@ -574,5 +574,8 @@ extern void fxTMMoveInTM_NoLock(fxMesaContext fxMesa, struct gl_texture_object *tObj, GLint where); extern void fxInitPixelTables(fxMesaContext fxMesa, GLboolean bgrOrder); +extern void fxCheckIsInHardware(GLcontext *ctx); + +extern GLboolean fx_check_IsInHardware(GLcontext *ctx); #endif diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c index ca79cc4e192..a121a1fc233 100644 --- a/src/mesa/drivers/glide/fxsetup.c +++ b/src/mesa/drivers/glide/fxsetup.c @@ -563,6 +563,7 @@ fxSetupTextureSingleTMU_NoLock(GLcontext * ctx, GLuint textureset) } } +#if 00 static void fxSetupTextureSingleTMU(GLcontext * ctx, GLuint textureset) { @@ -570,6 +571,8 @@ fxSetupTextureSingleTMU(GLcontext * ctx, GLuint textureset) fxSetupTextureSingleTMU_NoLock(ctx, textureset); END_BOARD_LOCK(); } +#endif + /************************* Double Texture Set ***************************/ diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c index 57a16ee6ea3..89ace65b465 100644 --- a/src/mesa/drivers/glide/fxtris.c +++ b/src/mesa/drivers/glide/fxtris.c @@ -646,7 +646,7 @@ static void fxFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, -static void fxChooseRenderState(GLcontext *ctx) +void fxDDChooseRenderState(GLcontext *ctx) { TNLcontext *tnl = TNL_CONTEXT(ctx); fxMesaContext fxMesa = FX_CONTEXT(ctx); @@ -705,6 +705,7 @@ static void fxChooseRenderState(GLcontext *ctx) } } + /**********************************************************************/ /* Runtime render state and callbacks */ /**********************************************************************/ @@ -773,7 +774,7 @@ void fxCheckIsInHardware( GLcontext *ctx ) GLuint oldfallback = !fxMesa->is_in_hardware; GLuint newfallback; - fxMesa->is_in_hardware = check_IsInHardware( ctx ); + fxMesa->is_in_hardware = fx_check_IsInHardware( ctx ); newfallback = !fxMesa->is_in_hardware; if (newfallback) { @@ -794,12 +795,15 @@ void fxCheckIsInHardware( GLcontext *ctx ) tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple; tnl->Driver.Render.BuildVertices = fxBuildVertices; tnl->Driver.Render.Multipass = 0; +#if 000 fxDDChooseSetupState(ctx); +#endif fxDDChooseRenderState(ctx); } } } +#if 00 void fxDDInitTriFuncs( GLcontext *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); @@ -824,6 +828,8 @@ void fxDDInitTriFuncs( GLcontext *ctx ) (void) fx_print_vertex; } +#endif + #else diff --git a/src/mesa/drivers/glide/fxvb.c b/src/mesa/drivers/glide/fxvb.c index 62e93f8e70b..5ad62e55e0d 100644 --- a/src/mesa/drivers/glide/fxvb.c +++ b/src/mesa/drivers/glide/fxvb.c @@ -245,7 +245,7 @@ static void init_setup_tab( void ) void fxPrintSetupFlags(char *msg, GLuint flags ) { - fprintf(stderr, "%s(%x): %s%s%s%s\n", + fprintf(stderr, "%s(%x): %s%s%s%s%s\n", msg, (int)flags, (flags & SETUP_XYZW) ? " xyzw," : "",