aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/readpix.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-02 14:47:58 +0000
committermarha <marha@users.sourceforge.net>2010-04-02 14:47:58 +0000
commit7933658107276f9d5491f8736a743cf8f8bbd5f2 (patch)
treef2893a761364e7abc9d934e9c5427e5cf5190c7a /mesalib/src/mesa/main/readpix.c
parent83fa9a9811e2c18cffd83a020757f7fb51ffddaa (diff)
downloadvcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.tar.gz
vcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.tar.bz2
vcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.zip
Updated to following packages:
mesa-7.8
Diffstat (limited to 'mesalib/src/mesa/main/readpix.c')
-rw-r--r--mesalib/src/mesa/main/readpix.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/mesalib/src/mesa/main/readpix.c b/mesalib/src/mesa/main/readpix.c
index feea1d375..f4d74e8be 100644
--- a/mesalib/src/mesa/main/readpix.c
+++ b/mesalib/src/mesa/main/readpix.c
@@ -77,14 +77,7 @@ _mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type,
case GL_RGBA:
case GL_BGRA:
case GL_ABGR_EXT:
- if (drawing) {
- if (!ctx->DrawBuffer->Visual.rgbMode) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawPixels(drawing RGB pixels into color index buffer)");
- return GL_TRUE;
- }
- }
- else {
+ if (!drawing) {
/* reading */
if (!_mesa_source_buffer_exists(ctx, GL_COLOR)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -95,10 +88,9 @@ _mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type,
break;
case GL_COLOR_INDEX:
if (drawing) {
- if (ctx->DrawBuffer->Visual.rgbMode &&
- (ctx->PixelMaps.ItoR.Size == 0 ||
- ctx->PixelMaps.ItoG.Size == 0 ||
- ctx->PixelMaps.ItoB.Size == 0)) {
+ if (ctx->PixelMaps.ItoR.Size == 0 ||
+ ctx->PixelMaps.ItoG.Size == 0 ||
+ ctx->PixelMaps.ItoB.Size == 0) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glDrawPixels(drawing color index pixels into RGB buffer)");
return GL_TRUE;