From: Dave Airlie Date: Thu, 15 Jul 2004 08:41:26 +0000 (+0000) Subject: use a switch statement makes integrating the s3tc patch easier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=620c998b165da6b26b61b6f750bf97339798e48c;p=mesa.git use a switch statement makes integrating the s3tc patch easier --- diff --git a/src/mesa/drivers/dri/i915/intel_tex.c b/src/mesa/drivers/dri/i915/intel_tex.c index 6475950585e..42505725e8a 100644 --- a/src/mesa/drivers/dri/i915/intel_tex.c +++ b/src/mesa/drivers/dri/i915/intel_tex.c @@ -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 {