Mesa (8.0): mesa: Throw the required error for glReadPixels() from a multisampled FBO.
Eric Anholt
anholt at kemper.freedesktop.org
Fri Jan 13 18:31:10 UTC 2012
Module: Mesa
Branch: 8.0
Commit: b178514e24ee7f2f89448b384683fe42fd448c18
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b178514e24ee7f2f89448b384683fe42fd448c18
Author: Eric Anholt <eric at anholt.net>
Date: Wed Jan 11 13:54:53 2012 -0800
mesa: Throw the required error for glReadPixels() from a multisampled FBO.
Fixes piglit EXT_framebuffer_multisample-negative-readpixels.
Reviewed-by: Brian Paul <brianp at vmware.com>
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 86b7c6707f915b07347070901d602917bc25dd0f)
---
src/mesa/main/readpix.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 0c0e539..c1489d2 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;
More information about the mesa-commit
mailing list