swrast: Add LUMINANCE, INTENSITY, LUMINANCE_ALPHA to span asserts.
authorEric Anholt <eric@anholt.net>
Mon, 18 Apr 2011 16:32:06 +0000 (09:32 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 20 Apr 2011 17:35:41 +0000 (10:35 -0700)
Fixes ARB_texture_float/fbo-alphatest-formats.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/swrast/s_readpix.c
src/mesa/swrast/s_span.c

index 5604c2e937e74caf940f8fc60ba5180b95e0beac..a201a631c9055ff8de49f602b7972360dcfc9502 100644 (file)
@@ -195,6 +195,9 @@ fast_read_rgba_pixels( struct gl_context *ctx,
          rb->_BaseFormat == GL_RGB ||
          rb->_BaseFormat == GL_RG ||
          rb->_BaseFormat == GL_RED ||
+         rb->_BaseFormat == GL_LUMINANCE ||
+         rb->_BaseFormat == GL_INTENSITY ||
+         rb->_BaseFormat == GL_LUMINANCE_ALPHA ||
          rb->_BaseFormat == GL_ALPHA);
 
    /* clipping should have already been done */
index b0f8e4904327f657340410e3b609ee0e3713a17f..f0524e0610e016fd4b696b8adc056c350dcb3641 100644 (file)
@@ -1352,6 +1352,9 @@ _swrast_read_rgba_span( struct gl_context *ctx, struct gl_renderbuffer *rb,
             rb->_BaseFormat == GL_RGB ||
             rb->_BaseFormat == GL_RG ||
             rb->_BaseFormat == GL_RED ||
+            rb->_BaseFormat == GL_LUMINANCE ||
+            rb->_BaseFormat == GL_INTENSITY ||
+            rb->_BaseFormat == GL_LUMINANCE_ALPHA ||
             rb->_BaseFormat == GL_ALPHA);
 
       if (rb->DataType == dstType) {