| @@ -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); | |||
| } | |||
| @@ -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 | |||
| @@ -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 ***************************/ | |||
| @@ -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 | |||
| @@ -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," : "", | |||