summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2004-02-02 10:32:54 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2004-02-02 10:32:54 +0000
commit96becc154a758507a49a9ed517200f8b664e51b1 (patch)
tree20eb6fcdcf6b1aa9b00446d51861d7e53b555ffc
parent5e29c17150b2bd54c868beaedd51039fa68cdbb8 (diff)
bring over a fix from trunk (Daniel Borca)
-rw-r--r--src/mesa/swrast/s_texture.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c
index b5a4509c07..37e8ea86f3 100644
--- a/src/mesa/swrast/s_texture.c
+++ b/src/mesa/swrast/s_texture.c
@@ -1592,12 +1592,18 @@ sample_lambda_2d( GLcontext *ctx, GLuint texUnit,
switch (tObj->MinFilter) {
case GL_NEAREST:
if (repeatNoBorderPOT) {
- switch (tImg->Format) {
- case GL_RGB:
+ switch (tImg->TexFormat->MesaFormat) {
+ case MESA_FORMAT_RGB:
+ case MESA_FORMAT_RGB888:
+ /*case MESA_FORMAT_BGR888:*/
opt_sample_rgb_2d(ctx, texUnit, tObj, m, texcoords + minStart,
NULL, rgba + minStart);
break;
- case GL_RGBA:
+ case MESA_FORMAT_RGBA:
+ case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_ARGB8888:
+ /*case MESA_FORMAT_ABGR8888:*/
+ /*case MESA_FORMAT_BGRA8888:*/
opt_sample_rgba_2d(ctx, texUnit, tObj, m, texcoords + minStart,
NULL, rgba + minStart);
break;
@@ -1649,12 +1655,18 @@ sample_lambda_2d( GLcontext *ctx, GLuint texUnit,
switch (tObj->MagFilter) {
case GL_NEAREST:
if (repeatNoBorderPOT) {
- switch (tImg->Format) {
- case GL_RGB:
+ switch (tImg->TexFormat->MesaFormat) {
+ case MESA_FORMAT_RGB:
+ case MESA_FORMAT_RGB888:
+ /*case MESA_FORMAT_BGR888:*/
opt_sample_rgb_2d(ctx, texUnit, tObj, m, texcoords + magStart,
NULL, rgba + magStart);
break;
- case GL_RGBA:
+ case MESA_FORMAT_RGBA:
+ case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_ARGB8888:
+ /*case MESA_FORMAT_ABGR8888:*/
+ /*case MESA_FORMAT_BGRA8888:*/
opt_sample_rgba_2d(ctx, texUnit, tObj, m, texcoords + magStart,
NULL, rgba + magStart);
break;