summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-04-15 17:50:41 -0700
committerIan Romanick <[email protected]>2011-05-31 17:45:41 -0700
commitbb8336f82c42a71c68cf26ba4adbc65f470322e3 (patch)
tree478a2a40083c37da88e255fee31383d06df2d4cb
parentd264ed0b48e1c14260c2429af62549b4b327852d (diff)
swrast: Don't assert against glReadPixels of GL_RED and GL_RG.
Everything appears to already be in place for this. Fixes aborts in: ARB_texture_rg/fbo-alphatest-formats-float ARB_texture_rg/fbo-blending-formats-float. Reviewed-by: Brian Paul <[email protected]> (cherry picked from commit 641dd899bd485c194c20a871633797a47e4f912d)
-rw-r--r--src/mesa/swrast/s_readpix.c5
-rw-r--r--src/mesa/swrast/s_span.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 9fe0752a37f..c4fe27b7eda 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -191,7 +191,10 @@ fast_read_rgba_pixels( struct gl_context *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_RG ||
+ rb->_BaseFormat == GL_RED ||
rb->_BaseFormat == GL_ALPHA);
/* clipping should have already been done */
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 3240b135774..34525d4407a 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1347,7 +1347,10 @@ _swrast_read_rgba_span( struct gl_context *ctx, struct gl_renderbuffer *rb,
ASSERT(rb);
ASSERT(rb->GetRow);
- ASSERT(rb->_BaseFormat == GL_RGB || rb->_BaseFormat == GL_RGBA ||
+ ASSERT(rb->_BaseFormat == GL_RGBA ||
+ rb->_BaseFormat == GL_RGB ||
+ rb->_BaseFormat == GL_RG ||
+ rb->_BaseFormat == GL_RED ||
rb->_BaseFormat == GL_ALPHA);
if (rb->DataType == dstType) {