summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_texture.c')
-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 b5a4509c07e..37e8ea86f34 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;