summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_texture.c
diff options
context:
space:
mode:
authorGareth Hughes <gareth@valinux.com>2001-03-28 20:40:51 +0000
committerGareth Hughes <gareth@valinux.com>2001-03-28 20:40:51 +0000
commit38f28665bf9fb5b2464738ca5074848ec2777ae1 (patch)
treed7df29f52814f6cd466b3ad9c3252c744ee5071c /src/mesa/swrast/s_texture.c
parent53933fe9dbfae168dce0688b406810462a6d577b (diff)
More texture format updates. Drivers now need only plug an appropriate
format into texImage->TexFormat, the rest is handled by core Mesa.
Diffstat (limited to 'src/mesa/swrast/s_texture.c')
-rw-r--r--src/mesa/swrast/s_texture.c9
1 files changed, 4 insertions, 5 deletions
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