From 620c998b165da6b26b61b6f750bf97339798e48c Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 15 Jul 2004 08:41:26 +0000 Subject: use a switch statement makes integrating the s3tc patch easier --- src/mesa/drivers/dri/i915/intel_tex.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/i915/intel_tex.c b/src/mesa/drivers/dri/i915/intel_tex.c index 6475950585..42505725e8 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 { -- cgit v1.2.3