aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_texfilter.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-04 08:57:20 +0100
committermarha <marha@users.sourceforge.net>2011-11-04 08:57:20 +0100
commit02f377d5e2dd18537d0807ad63675a0970b5a37d (patch)
tree1814c826db4d95a30ad71431d9c84b8d2611ec18 /mesalib/src/mesa/swrast/s_texfilter.c
parent6f4feafd4d22beaabfb0202e66b0dea9047ee084 (diff)
downloadvcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.tar.gz
vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.tar.bz2
vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.zip
xserver pixman mesa git update 4 nov 2011
Diffstat (limited to 'mesalib/src/mesa/swrast/s_texfilter.c')
-rw-r--r--mesalib/src/mesa/swrast/s_texfilter.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/mesalib/src/mesa/swrast/s_texfilter.c b/mesalib/src/mesa/swrast/s_texfilter.c
index 9de5c0276..566262557 100644
--- a/mesalib/src/mesa/swrast/s_texfilter.c
+++ b/mesalib/src/mesa/swrast/s_texfilter.c
@@ -3647,25 +3647,21 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx,
const struct gl_texture_image *img = t->Image[0][t->BaseLevel];
const struct swrast_texture_image *swImg =
swrast_texture_image_const(img);
+ texture_sample_func func;
ASSERT(t->Sampler.MinFilter == GL_NEAREST);
+ func = &sample_nearest_2d;
if (t->Sampler.WrapS == GL_REPEAT &&
t->Sampler.WrapT == GL_REPEAT &&
swImg->_IsPowerOfTwo &&
- img->Border == 0 &&
- img->TexFormat == MESA_FORMAT_RGB888) {
- return &opt_sample_rgb_2d;
- }
- else if (t->Sampler.WrapS == GL_REPEAT &&
- t->Sampler.WrapT == GL_REPEAT &&
- swImg->_IsPowerOfTwo &&
- img->Border == 0 &&
- img->TexFormat == MESA_FORMAT_RGBA8888) {
- return &opt_sample_rgba_2d;
- }
- else {
- return &sample_nearest_2d;
+ img->Border == 0) {
+ if (img->TexFormat == MESA_FORMAT_RGB888)
+ func = &opt_sample_rgb_2d;
+ else if (img->TexFormat == MESA_FORMAT_RGBA8888)
+ func = &opt_sample_rgba_2d;
}
+
+ return func;
}
case GL_TEXTURE_3D:
if (needLambda) {