use a switch statement makes integrating the s3tc patch easier
authorDave Airlie <airliedfreedesktop.org>
Thu, 15 Jul 2004 08:41:26 +0000 (08:41 +0000)
committerDave Airlie <airliedfreedesktop.org>
Thu, 15 Jul 2004 08:41:26 +0000 (08:41 +0000)
src/mesa/drivers/dri/i915/intel_tex.c

index 6475950585e4e59c69bc75c000e2cc17b201c64e..42505725e8a6de2d1625972c96f257c24fca63ea 100644 (file)
@@ -617,12 +617,18 @@ static void intelUploadTexImage( intelContextPtr intel,
       GLubyte *src = (GLubyte *)image->Data;
       GLuint j;
 
-      if ((image->IntFormat == GL_COMPRESSED_RGB_FXT1_3DFX || image->IntFormat == GL_COMPRESSED_RGBA_FXT1_3DFX))
+      switch(image->IntFormat)
        {
+       case GL_COMPRESSED_RGB_FXT1_3DFX:
+       case GL_COMPRESSED_RGBA_FXT1_3DFX:
          for (j = 0 ; j < image->Height/4 ; j++, dst += (t->Pitch)) {
            __memcpy(dst, src, row_len );
            src += row_len;
          }
+         break;
+       default:
+         fprintf(stderr,"Internal Compressed format not supported %d\n", image->IntFormat);
+         break;
        }
    }
    else {