Mesa (master): mesa: Throw the required error for glCopyPixels from multisample FBO.
Eric Anholt
anholt at kemper.freedesktop.org
Thu Jan 12 20:34:34 UTC 2012
Module: Mesa
Branch: master
Commit: 9be6654c1f75bc402c807ec0caccebde032afa59
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9be6654c1f75bc402c807ec0caccebde032afa59
Author: Eric Anholt <eric at anholt.net>
Date: Wed Jan 11 14:06:17 2012 -0800
mesa: Throw the required error for glCopyPixels from multisample FBO.
Fixes piglit EXT_framebuffer_multisample/negative-copypixels.
Reviewed-by: Brian Paul <brianp at vmware.com>
NOTE: This is a candidate for the 8.0 branch.
---
src/mesa/main/drawpix.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 9f5b0b3..01983d9 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -203,6 +203,12 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
goto end;
}
+ if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) {
+ _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ "glCopyPixels(multisample FBO)");
+ goto end;
+ }
+
if (!_mesa_source_buffer_exists(ctx, type) ||
!_mesa_dest_buffer_exists(ctx, type)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
More information about the mesa-commit
mailing list