fxDDInitFxMesaContext(fxMesaContext fxMesa)
{
int i;
- static int firsttime = 1;
for (i = 0; i < 256; i++) {
gl_ubyte_to_float_255_color_tab[i] = (float) i;
}
- if (firsttime) {
-#if 00
- fxDDSetupInit();
- fxDDTrifuncInit();
-#endif
- firsttime = 0;
- }
-
FX_setupGrVertexLayout();
if (getenv("FX_EMULATE_SINGLE_TMU"))
fxAllocVB(fxMesa->glCtx);
fxSetupDDPointers(fxMesa->glCtx);
+ fxDDInitTriFuncs(fxMesa->glCtx);
/* Tell the software rasterizer to use pixel fog always.
*/
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
+ fxChooseVertexState(ctx);
}
if (new_state & _NEW_TEXTURE)
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);
}
{
GLcontext *ctx = fxMesa->glCtx;
SWvertex v[3];
+ fprintf(stderr, "%s\n", __FUNCTION__);
+
fx_translate_vertex( ctx, v0, &v[0] );
fx_translate_vertex( ctx, v1, &v[1] );
fx_translate_vertex( ctx, v2, &v[2] );
GLuint flags = ctx->_TriangleCaps;
GLuint index = 0;
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
+ fprintf(stderr, "%s\n", __FUNCTION__);
if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) {
if (flags & ANY_RASTER_FLAGS) {
if (flags & LINE_FALLBACK)
fxMesa->draw_line = fx_fallback_line;
- if (flags & TRI_FALLBACK)
+ if (flags & TRI_FALLBACK) {
+ fprintf(stderr, "tri fallback\n");
fxMesa->draw_tri = fx_fallback_tri;
+ }
index |= FX_FALLBACK_BIT;
}
}
+ fprintf(stderr, "render index %x\n", index);
+
tnl->Driver.Render.Points = rast_tab[index].points;
tnl->Driver.Render.Line = rast_tab[index].line;
tnl->Driver.Render.ClippedLine = rast_tab[index].line;
if (newfallback) {
if (oldfallback == 0) {
+ fprintf(stderr, "goint to fallback\n");
_swsetup_Wakeup( ctx );
}
}
else {
if (oldfallback) {
+ fprintf(stderr, "leaving fallback\n");
_swrast_flush( ctx );
tnl->Driver.Render.Start = fxCheckTexSizes;
tnl->Driver.Render.Finish = _swrast_flush;
tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple;
tnl->Driver.Render.BuildVertices = fxBuildVertices;
tnl->Driver.Render.Multipass = 0;
-#if 000
- fxDDChooseSetupState(ctx);
-#endif
+ fxChooseVertexState(ctx);
fxDDChooseRenderState(ctx);
}
}
}
-#if 00
void fxDDInitTriFuncs( GLcontext *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- fxMesaContext fxMesa = FX_CONTEXT(ctx);
static int firsttime = 1;
if (firsttime) {
(void) fx_print_vertex;
}
-#endif
#else