summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-03-02 09:48:40 +1000
committerDave Airlie <[email protected]>2011-03-02 09:48:40 +1000
commit8eebd216dd9f32de65e9af4160c042825ca75466 (patch)
tree1208bb27b1dabcb79d7bdb2e0cf0303f53386ef9 /src/mesa
parent01d5d1e80ee506205e8615356e55e4bca16c6b11 (diff)
rgtc: fixup mipmap generation
this allows swrast to pass mipmap generation for these formats.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mipmap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index d8a56103800..0727e1818f1 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1755,8 +1755,13 @@ _mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
if (srcImage->_BaseFormat == GL_RGB) {
convertFormat = MESA_FORMAT_RGB888;
components = 3;
- }
- else if (srcImage->_BaseFormat == GL_RGBA) {
+ } else if (srcImage->_BaseFormat == GL_RED) {
+ convertFormat = MESA_FORMAT_R8;
+ components = 1;
+ } else if (srcImage->_BaseFormat == GL_RG) {
+ convertFormat = MESA_FORMAT_RG88;
+ components = 2;
+ } else if (srcImage->_BaseFormat == GL_RGBA) {
convertFormat = MESA_FORMAT_RGBA8888;
components = 4;
}