diff options
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_readpix.c | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_span.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 553fd9a76d..1de481248b 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); diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 8931cdec1b..28c82990e0 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1248,7 +1248,8 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) 4 * span->end * sizeof(GLchan)); } - ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB); + ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB || + rb->_BaseFormat == GL_ALPHA); if (ctx->Color._LogicOpEnabled) { _swrast_logicop_rgba_span(ctx, rb, span); @@ -1346,7 +1347,8 @@ _swrast_read_rgba_span( GLcontext *ctx, struct gl_renderbuffer *rb, ASSERT(rb); ASSERT(rb->GetRow); - ASSERT(rb->_BaseFormat == GL_RGB || rb->_BaseFormat == GL_RGBA); + ASSERT(rb->_BaseFormat == GL_RGB || rb->_BaseFormat == GL_RGBA || + rb->_BaseFormat == GL_ALPHA); if (rb->DataType == dstType) { rb->GetRow(ctx, rb, length, x + skip, y, |