summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_readpix.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-09-07 14:31:22 -0700
committerEric Anholt <[email protected]>2010-09-07 14:34:23 -0700
commit50a3349bee04088bee3491622d6ef3c032d01eac (patch)
tree6c89ebe510804f81e2262c4f59eedb579d055a96 /src/mesa/swrast/s_readpix.c
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/swrast/s_readpix.c')
-rw-r--r--src/mesa/swrast/s_readpix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 553fd9a76d8..1de481248b1 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -191,7 +191,8 @@ fast_read_rgba_pixels( GLcontext *ctx,
if (!rb)
return GL_FALSE;
- ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB);
+ ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB ||
+ rb->_BaseFormat == GL_ALPHA);
/* clipping should have already been done */
ASSERT(x + width <= (GLint) rb->Width);