#include "r128_span.h"
#include "r128_tex.h"
#include "r128_tris.h"
-#include "r128_vb.h"
#include "vblank.h"
#include "utils.h"
{ "2d", DEBUG_VERBOSE_2D },
{ "sync", DEBUG_ALWAYS_SYNC },
{ "api", DEBUG_VERBOSE_API },
+ { "fall", DEBUG_VERBOSE_FALL },
{ NULL, 0 }
};
rmesa->RenderIndex = -1; /* Impossible value */
rmesa->vert_buf = NULL;
rmesa->num_verts = 0;
+ rmesa->tnl_state = ~0;
/* Set the maximum texture size small enough that we can guarentee that
* all texture units can bind a maximal texture and have them both in
if (sPriv->drmMinor >= 4)
_mesa_enable_extension( ctx, "GL_MESA_ycbcr_texture" );
- r128InitVB( ctx );
r128InitTriFuncs( ctx );
r128DDInitStateFuncs( ctx );
r128DDInitSpanFuncs( ctx );
debug_control );
#endif
+ if (driQueryOptionb(&rmesa->optionCache, "no_rast")) {
+ fprintf(stderr, "disabling 3D acceleration\n");
+ FALLBACK(rmesa, R128_FALLBACK_DISABLE, 1);
+ }
+
return GL_TRUE;
}
_ac_DestroyContext( rmesa->glCtx );
_swrast_DestroyContext( rmesa->glCtx );
- r128FreeVB( rmesa->glCtx );
-
/* free the Mesa context */
rmesa->glCtx->DriverCtx = NULL;
_mesa_destroy_context(rmesa->glCtx);
driDrawableInitVBlank( driDrawPriv, newR128Ctx->vblank_flags );
newR128Ctx->driDrawable = driDrawPriv;
- _mesa_make_current2( newR128Ctx->glCtx,
- (GLframebuffer *) driDrawPriv->driverPrivate,
- (GLframebuffer *) driReadPriv->driverPrivate );
-
+ _mesa_make_current( newR128Ctx->glCtx,
+ (GLframebuffer *) driDrawPriv->driverPrivate,
+ (GLframebuffer *) driReadPriv->driverPrivate );
newR128Ctx->new_state |= R128_NEW_WINDOW | R128_NEW_CLIP;
-
- if ( !newR128Ctx->glCtx->Viewport.Width ) {
- _mesa_set_viewport(newR128Ctx->glCtx, 0, 0,
- driDrawPriv->w, driDrawPriv->h);
- }
} else {
- _mesa_make_current( 0, 0 );
+ _mesa_make_current( NULL, NULL, NULL );
}
return GL_TRUE;