aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/mipmap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-10 12:57:09 +0000
committermarha <marha@users.sourceforge.net>2011-03-10 12:57:09 +0000
commitae312a8a8042b4b23ffc652acf3b5cad1b3f07ca (patch)
treef54be422d872ddfcc3fa96dafe8c40288548ef22 /mesalib/src/mesa/main/mipmap.c
parentb5f8cc93800ce69d2c984081471b05e650ba9ddd (diff)
parentf81bb3160c5f39d8f7ad329e99865af88f02b96a (diff)
downloadvcxsrv-ae312a8a8042b4b23ffc652acf3b5cad1b3f07ca.tar.gz
vcxsrv-ae312a8a8042b4b23ffc652acf3b5cad1b3f07ca.tar.bz2
vcxsrv-ae312a8a8042b4b23ffc652acf3b5cad1b3f07ca.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/mipmap.c')
-rw-r--r--mesalib/src/mesa/main/mipmap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/mipmap.c b/mesalib/src/mesa/main/mipmap.c
index 453d7f29b..b12399ee6 100644
--- a/mesalib/src/mesa/main/mipmap.c
+++ b/mesalib/src/mesa/main/mipmap.c
@@ -1764,8 +1764,13 @@ _mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
} else if (srcImage->_BaseFormat == GL_RGBA) {
convertFormat = MESA_FORMAT_RGBA8888;
components = 4;
- }
- else {
+ } else if (srcImage->_BaseFormat == GL_LUMINANCE) {
+ convertFormat = MESA_FORMAT_L8;
+ components = 1;
+ } else if (srcImage->_BaseFormat == GL_LUMINANCE_ALPHA) {
+ convertFormat = MESA_FORMAT_AL88;
+ components = 2;
+ } else {
_mesa_problem(ctx, "bad srcImage->_BaseFormat in _mesa_generate_mipmaps");
return;
}