summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/drawpix.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-01-11 14:06:17 -0800
committerEric Anholt <eric@anholt.net>2012-01-12 12:34:20 -0800
commit9be6654c1f75bc402c807ec0caccebde032afa59 (patch)
treec7061d3fecab1ffd469ab1778c69dddb9e11b130 /src/mesa/main/drawpix.c
parent6950a4faf650fe119ee97aa18b006eed099038be (diff)
downloadexternal_mesa3d-9be6654c1f75bc402c807ec0caccebde032afa59.zip
external_mesa3d-9be6654c1f75bc402c807ec0caccebde032afa59.tar.gz
external_mesa3d-9be6654c1f75bc402c807ec0caccebde032afa59.tar.bz2
mesa: Throw the required error for glCopyPixels from multisample FBO.
Fixes piglit EXT_framebuffer_multisample/negative-copypixels. Reviewed-by: Brian Paul <brianp@vmware.com> NOTE: This is a candidate for the 8.0 branch.
Diffstat (limited to 'src/mesa/main/drawpix.c')
-rw-r--r--src/mesa/main/drawpix.c6
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,