Mesa (master): swrast: accept GL_RG in glReadPixels()
Brian Paul
brianp at kemper.freedesktop.org
Fri Dec 3 22:26:47 UTC 2010
Module: Mesa
Branch: master
Commit: 5fc2548faea31acdd08bbb0f016ea41c6f01cf41
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5fc2548faea31acdd08bbb0f016ea41c6f01cf41
Author: Brian Paul <brianp at vmware.com>
Date: Fri Dec 3 15:21:36 2010 -0700
swrast: accept GL_RG in glReadPixels()
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32088
---
src/mesa/swrast/s_readpix.c | 19 +++----------------
1 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 5e6356c..9179678 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -495,27 +495,14 @@ _swrast_ReadPixels( struct gl_context *ctx,
read_depth_pixels(ctx, x, y, width, height, type, pixels,
&clippedPacking);
break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_RGB:
- case GL_LUMINANCE:
- case GL_LUMINANCE_ALPHA:
- case GL_RGBA:
- case GL_BGR:
- case GL_BGRA:
- case GL_ABGR_EXT:
- read_rgba_pixels(ctx, x, y, width, height,
- format, type, pixels, &clippedPacking);
- break;
case GL_DEPTH_STENCIL_EXT:
read_depth_stencil_pixels(ctx, x, y, width, height,
type, pixels, &clippedPacking);
break;
default:
- _mesa_problem(ctx, "unexpected format 0x%x in _swrast_ReadPixels", format);
- /* don't return yet, clean-up */
+ /* all other formats should be color formats */
+ read_rgba_pixels(ctx, x, y, width, height,
+ format, type, pixels, &clippedPacking);
}
swrast_render_finish(ctx);
More information about the mesa-commit
mailing list