i965: Fix all non-snb regression in the snb attribute interpolation commit.
[mesa.git] / src / mesa / drivers / dri / tdfx / tdfx_tex.c
index af434315c1605cdb7505a7ccc51ef61b92778008..1c51452c104b04a221784550a73c419ae6764cfd 100644 (file)
@@ -1396,11 +1396,6 @@ tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level,
     }
 #endif
 
-    /* choose the texture format */
-    assert(ctx->Driver.ChooseTextureFormat);
-    texImage->TexFormat = (*ctx->Driver.ChooseTextureFormat)(ctx,
-                                     internalFormat, format, type);
-    assert(texImage->TexFormat);
     mesaFormat = texImage->TexFormat;
     mml->glideFormat = fxGlideFormat(mesaFormat);
     ti->info.format = mml->glideFormat;
@@ -1577,7 +1572,7 @@ tdfxCompressedTexImage2D (GLcontext *ctx, GLenum target,
     tdfxTexInfo *ti;
     tdfxMipMapLevel *mml;
     gl_format mesaFormat;
-    GLuint compressedSize;
+    GLuint compressedSize = 0;
 
     if (TDFX_DEBUG & DEBUG_VERBOSE_DRI) {
         fprintf(stderr, "tdfxCompressedTexImage2D: id=%d int 0x%x  %dx%d\n",
@@ -1618,12 +1613,6 @@ tdfxCompressedTexImage2D (GLcontext *ctx, GLenum target,
     mml->height = height * mml->hScale;
 
 
-    /* choose the texture format */
-    assert(ctx->Driver.ChooseTextureFormat);
-    texImage->TexFormat = (*ctx->Driver.ChooseTextureFormat)(ctx,
-                                           internalFormat, -1/*format*/, -1/*type*/);
-    assert(texImage->TexFormat);
-
     /* Determine the appropriate Glide texel format,
      * given the user's internal texture format hint.
      */
@@ -1671,7 +1660,7 @@ tdfxCompressedTexImage2D (GLcontext *ctx, GLenum target,
                                 texImage->Data);
        ti->padded = GL_TRUE;
     } else {
-       MEMCPY(texImage->Data, data, compressedSize);
+       memcpy(texImage->Data, data, compressedSize);
     }
 
     RevalidateTexture(ctx, texObj);
@@ -1718,7 +1707,7 @@ tdfxCompressedTexSubImage2D( GLcontext *ctx, GLenum target,
     rows = height / 4; /* [dBorca] hardcoded 4, but works for FXT1/DXTC */
 
     for (i = 0; i < rows; i++) {
-       MEMCPY(dest, data, srcRowStride);
+       memcpy(dest, data, srcRowStride);
        dest += destRowStride;
        data = (GLvoid *)((intptr_t)data + (intptr_t)srcRowStride);
     }