From: Eric Anholt Date: Wed, 11 Jan 2012 21:54:53 +0000 (-0800) Subject: mesa: Throw the required error for glReadPixels() from a multisampled FBO. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86b7c6707f915b07347070901d602917bc25dd0f;p=mesa.git mesa: Throw the required error for glReadPixels() from a multisampled FBO. Fixes piglit EXT_framebuffer_multisample-negative-readpixels. Reviewed-by: Brian Paul NOTE: This is a candidate for the 8.0 branch. --- diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 0c0e5394d66..c1489d21109 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -782,6 +782,11 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, return; } + if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(multisample FBO)"); + return; + } + if (!_mesa_source_buffer_exists(ctx, format)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(no readbuffer)"); return;