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.
This commit is contained in:
Eric Anholt 2012-01-11 14:06:17 -08:00
parent 6950a4faf6
commit 9be6654c1f
1 changed files with 6 additions and 0 deletions

View File

@ -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,