Previously the GL spec required that whenever glBlitFramebuffer is used with either buffer being multisampled, the internal formats must match. However the GL 4.4 spec was later changed to remove this restriction. In the section entitled “Changes in the released Specification of July 22, 2013” it says:
“Relax BlitFramebuffer in section 18.3.1 so that format conversion can take place during multisample blits, since drivers already allow this and some apps depend on it.” If most drivers already allowed this in earlier versions I think it's safe to assume that this is a spec bug and it should also be allowed in all versions. This patch just removes the restriction on desktop GL. For GLES there are conformance tests that assert the previous behaviour so it is probably safer to leave it in. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92706 --- There is a corresponding update to Piglit to make it expect this new behaviour here: http://patchwork.freedesktop.org/patch/63670/ I've only tested this with SKL and HSW. It passed fine on SKL but it needs the previous patch to work on HSW. I put it through a full Jenkins run but it doesn't really test much without the Piglit patch as well and I don't think I can post Piglit patches to Jenkins. As this enables the new behaviour for all Mesa drivers of course it would need some testing with other drivers before landing. src/mesa/main/blit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/blit.c b/src/mesa/main/blit.c index a32f1a4..6803062 100644 --- a/src/mesa/main/blit.c +++ b/src/mesa/main/blit.c @@ -285,7 +285,8 @@ _mesa_blit_framebuffer(struct gl_context *ctx, /* extra checks for multisample copies... */ if (readFb->Visual.samples > 0 || drawFb->Visual.samples > 0) { /* color formats must match */ - if (!compatible_resolve_formats(colorReadRb, colorDrawRb)) { + if (_mesa_is_gles(ctx) && + !compatible_resolve_formats(colorReadRb, colorDrawRb)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(bad src/dst multisample pixel formats)", func); return; -- 1.9.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev