build fixes
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_tex.c
index 99aa4a458b5ba926f03c8e338681a384f0be813c..87c26f89780f8262ea0df952594a6bc6be88ff4a 100644 (file)
@@ -623,10 +623,6 @@ static void radeonTexParameter( GLcontext *ctx, GLenum target,
               _mesa_lookup_enum_by_nr( pname ) );
    }
 
-   if ( ( target != GL_TEXTURE_2D ) &&
-       ( target != GL_TEXTURE_1D ) )
-      return;
-
    switch ( pname ) {
    case GL_TEXTURE_MIN_FILTER:
    case GL_TEXTURE_MAG_FILTER:
@@ -674,11 +670,9 @@ static void radeonBindTexture( GLcontext *ctx, GLenum target,
               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) );
 }
 
 
@@ -693,7 +687,6 @@ static void radeonDeleteTexture( GLcontext *ctx,
               _mesa_lookup_enum_by_nr( texObj->Target ) );
    }
 
-   assert(t);
    if ( t != NULL ) {
       if ( rmesa ) {
          RADEON_FIREVERTICES( rmesa );
@@ -741,6 +734,7 @@ radeonNewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
    if (!obj)
       return NULL;
    obj->MaxAnisotropy = rmesa->initialMaxAnisotropy;
+   radeonAllocTexObj( obj );
    return obj;
 }