From the GL 3.0 spec, section 4.3.3, in the documentation for
CopyPixels():
"An INVALID_OPERATION error will be generated if the object bound
to READ_FRAMEBUFFER_BINDING is framebuffer complete and the value
of SAMPLE_BUFFERS is greater than zero."
The same applies to CopyTexImage...() and CopyTexSubImage...()
functions, since they are defined in terms of CopyPixels().
Previously we were generating an INVALID_FRAMEBUFFER_OPERATION error
in these cases.
Fixes piglit tests
"EXT_framebuffer_multisample/negative-{copypixels,copyteximage}".
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
}
if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyPixels(multisample FBO)");
goto end;
}
}
if (ctx->ReadBuffer->Visual.samples > 0) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexImage%dD(multisample FBO)",
dimensions);
return GL_TRUE;
}
if (ctx->ReadBuffer->Visual.samples > 0) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexSubImage%dD(multisample FBO)",
dimensions);
return GL_TRUE;