From: Brian Paul Date: Tue, 20 Apr 2010 22:12:34 +0000 (-0600) Subject: mesa: raise GL_INVALID_OPERATION for glReadPixels(GL_COLOR_INDEX) X-Git-Tag: android-x86-2.2~3896^2~221 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f86d7af4a0003997890edc84158e72c21c11037e;p=android-x86%2Fexternal-mesa.git mesa: raise GL_INVALID_OPERATION for glReadPixels(GL_COLOR_INDEX) We no longer support CI-mode color buffers so this is always an error. --- diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index f4d74e8be6d..93f2bd31cc6 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -103,6 +103,12 @@ _mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type, "glReadPixels(no color buffer)"); return GL_TRUE; } + /* We no longer support CI-mode color buffers so trying to read + * GL_COLOR_INDEX pixels is always an error. + */ + _mesa_error(ctx, GL_INVALID_OPERATION, + "glReadPixels(color buffer is RGB)"); + return GL_TRUE; } break; case GL_STENCIL_INDEX: