From 38f28665bf9fb5b2464738ca5074848ec2777ae1 Mon Sep 17 00:00:00 2001 From: Gareth Hughes Date: Wed, 28 Mar 2001 20:40:51 +0000 Subject: More texture format updates. Drivers now need only plug an appropriate format into texImage->TexFormat, the rest is handled by core Mesa. --- src/mesa/swrast/s_texture.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mesa/swrast/s_texture.c') diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index 220d3a4366..73e1b6718d 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -1,4 +1,4 @@ -/* $Id: s_texture.c,v 1.20 2001/03/26 19:42:40 brianp Exp $ */ +/* $Id: s_texture.c,v 1.21 2001/03/28 20:40:52 gareth Exp $ */ /* * Mesa 3-D graphics library @@ -31,6 +31,7 @@ #include "macros.h" #include "mmath.h" #include "mem.h" +#include "texformat.h" #include "teximage.h" #include "s_context.h" @@ -1671,15 +1672,13 @@ _swrast_choose_texture_sample_func( GLcontext *ctx, GLuint texUnit, if (t->WrapS == GL_REPEAT && t->WrapT == GL_REPEAT && t->Image[baseLevel]->Border == 0 && - t->Image[baseLevel]->Format == GL_RGB && - t->Image[baseLevel]->Type == CHAN_TYPE) { + t->Image[baseLevel]->TexFormat->MesaFormat == MESA_FORMAT_RGB) { swrast->TextureSample[texUnit] = opt_sample_rgb_2d; } else if (t->WrapS == GL_REPEAT && t->WrapT == GL_REPEAT && t->Image[baseLevel]->Border == 0 && - t->Image[baseLevel]->Format==GL_RGBA && - t->Image[baseLevel]->Type == CHAN_TYPE) { + t->Image[baseLevel]->TexFormat->MesaFormat == MESA_FORMAT_RGBA) { swrast->TextureSample[texUnit] = opt_sample_rgba_2d; } else -- cgit v1.2.3