mesa: move mesa_set_fetch_functions()
[mesa.git] / src / mesa / drivers / dri / unichrome / via_tex.c
index b6be06d1ee29f6a507b6c9ef5f71d7a3fdd06bd8..13458aba1c2814ffb12849ab5584cff7d3644cec 100644 (file)
@@ -37,6 +37,7 @@
 #include "main/mipmap.h"
 #include "main/simple_list.h"
 #include "main/texcompress.h"
+#include "main/texfetch.h"
 #include "main/texformat.h"
 #include "main/texobj.h"
 #include "main/texstore.h"
@@ -696,7 +697,6 @@ static void viaTexImage(GLcontext *ctx,
 
    if (texelBytes == 0) {
       /* compressed format */
-      texImage->IsCompressed = GL_TRUE;
       texImage->CompressedSize =
          ctx->Driver.CompressedTextureSize(ctx, texImage->Width,
                                            texImage->Height, texImage->Depth,
@@ -713,7 +713,7 @@ static void viaTexImage(GLcontext *ctx,
    viaImage->pitchLog2 = logbase2(postConvWidth * texelBytes);
 
    /* allocate memory */
-   if (texImage->IsCompressed)
+   if (_mesa_is_format_compressed(texImage->TexFormat))
       sizeInBytes = texImage->CompressedSize;
    else
       sizeInBytes = postConvWidth * postConvHeight * texelBytes;
@@ -793,7 +793,7 @@ static void viaTexImage(GLcontext *ctx,
       GLint dstRowStride;
       GLboolean success;
 
-      if (texImage->IsCompressed) {
+      if (_mesa_is_format_compressed(texImage->TexFormat)) {
          dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat, width);
       }
       else {