From 22a96f305898b5d1aa26809c7156a01686eb9bf0 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 24 Feb 2010 18:58:38 -0800 Subject: mesa: Remove checks of Visual.rgbMode This must always be true now, so there is no reason to check it. Ever. Signed-off-by: Ian Romanick --- src/mesa/main/readpix.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/mesa/main/readpix.c') diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index feea1d375f6..f4d74e8be6d 100644 --- a/src/mesa/main/readpix.c +++ b/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; -- cgit v1.2.3