summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-09-07 14:31:22 -0700
committerEric Anholt <eric@anholt.net>2010-09-07 14:34:23 -0700
commit50a3349bee04088bee3491622d6ef3c032d01eac (patch)
tree6c89ebe510804f81e2262c4f59eedb579d055a96 /src/mesa/main
parentacd7c21541110d7ae6b9e63647391f65946e5c5d (diff)
mesa: Set the base format of GL_ALPHA FBOs and teach swrast about it.
Fixes assertion failures in fbo-alpha with a debug build of Mesa. Bug #29781.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/fbobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index defdebbdefa..72cbb09ab83 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -925,6 +925,12 @@ GLenum
_mesa_base_fbo_format(GLcontext *ctx, GLenum internalFormat)
{
switch (internalFormat) {
+ case GL_ALPHA:
+ case GL_ALPHA4:
+ case GL_ALPHA8:
+ case GL_ALPHA12:
+ case GL_ALPHA16:
+ return GL_ALPHA;
case GL_RGB:
case GL_R3_G3_B2:
case GL_RGB4: