i810InitVB( ctx );
i810InitState( ctx );
- driInitTextureObjects( ctx, &imesa->swapped, DRI_TEXMGR_DO_TEXTURE_2D);
-
#if DO_DEBUG
I810_DEBUG = driParseDebugString( getenv( "I810_DEBUG" ),
debug_control );
static void i810BindTexture( GLcontext *ctx, GLenum target,
struct gl_texture_object *tObj )
{
- if (!tObj->DriverData) {
- i810AllocTexObj( ctx, tObj );
- }
+ assert( (target != GL_TEXTURE_2D) || (tObj->DriverData != NULL) );
}
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
+ i810AllocTexObj( ctx, obj );
return obj;
}
i830DDInitSpanFuncs( ctx );
i830DDInitState (ctx);
- driInitTextureObjects( ctx, & imesa->swapped,
- DRI_TEXMGR_DO_TEXTURE_2D
- | DRI_TEXMGR_DO_TEXTURE_RECT );
-
#if DO_DEBUG
I830_DEBUG = driParseDebugString( getenv( "I830_DEBUG" ),
debug_control );
static void i830BindTexture( GLcontext *ctx, GLenum target,
struct gl_texture_object *tObj )
{
- if (!tObj->DriverData) {
- i830AllocTexObj( tObj );
- }
+ assert( (target != GL_TEXTURE_2D && target != GL_TEXTURE_RECTANGLE_NV) ||
+ (tObj->DriverData != NULL) );
}
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
+ i830AllocTexObj( obj );
return obj;
}
mgaDDInitPixelFuncs( ctx );
mgaDDInitTriFuncs( ctx );
- driInitTextureObjects( ctx, & mmesa->swapped,
- (DRI_TEXMGR_DO_TEXTURE_2D |
- DRI_TEXMGR_DO_TEXTURE_RECT) );
-
mgaInitVB( ctx );
mgaInitState( mmesa );
mgaBindTexture( GLcontext *ctx, GLenum target,
struct gl_texture_object *tObj )
{
- if ( target == GL_TEXTURE_2D ||
- target == GL_TEXTURE_RECTANGLE_NV ) {
- if ( tObj->DriverData == NULL ) {
- mgaAllocTexObj( tObj );
- }
- }
+ assert( (target != GL_TEXTURE_2D && target != GL_TEXTURE_RECTANGLE_NV) ||
+ (tObj->DriverData != NULL) );
}
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
+ mgaAllocTexObj( obj );
return obj;
}
r128DDInitSpanFuncs( ctx );
r128DDInitState( rmesa );
- driInitTextureObjects( ctx, & rmesa->swapped,
- DRI_TEXMGR_DO_TEXTURE_1D
- | DRI_TEXMGR_DO_TEXTURE_2D );
-
rmesa->vblank_flags = (rmesa->r128Screen->irq != 0)
? driGetDefaultVBlankFlags(&rmesa->optionCache) : VBLANK_FLAG_NO_IRQ;
ctx->Texture.CurrentUnit );
}
- if ( target == GL_TEXTURE_2D || target == GL_TEXTURE_1D ) {
- if ( tObj->DriverData == NULL ) {
- r128AllocTexObj( tObj );
- }
- }
+ assert( (target != GL_TEXTURE_2D && target != GL_TEXTURE_1D) ||
+ (tObj->DriverData != NULL) );
}
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
+ r128AllocTexObj( obj );
return obj;
}
rmesa->boxes = 0;
- /* formerly in radeon_tex.c */
- driInitTextureObjects( ctx, & rmesa->swapped,
- DRI_TEXMGR_DO_TEXTURE_1D
- | DRI_TEXMGR_DO_TEXTURE_2D );
-
/* Initialize the software rasterizer and helper modules.
*/
_swrast_CreateContext( ctx );
ctx->Texture.CurrentUnit );
}
- if ( target == GL_TEXTURE_2D || target == GL_TEXTURE_1D ) {
- if ( texObj->DriverData == NULL ) {
- radeonAllocTexObj( texObj );
- }
- }
+ assert( (target != GL_TEXTURE_1D && target != GL_TEXTURE_2D &&
+ target != GL_TEXTURE_RECTANGLE_NV) ||
+ (texObj->DriverData != NULL) );
}
if (!obj)
return NULL;
obj->MaxAnisotropy = rmesa->initialMaxAnisotropy;
+ radeonAllocTexObj( obj );
return obj;
}