mesa: Return GL_FRAMEBUFFER_UNDEFINED if the winsys fbo is incomplete.

Specified by ARB_framebuffer_object, GL 3.0, and ES 3.0.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Matt Turner 2013-07-26 16:36:19 -07:00
parent b2d3f25aa2
commit 8dd15e6021

View file

@ -2141,8 +2141,12 @@ _mesa_CheckFramebufferStatus(GLenum target)
}
if (_mesa_is_winsys_fbo(buffer)) {
/* The window system / default framebuffer is always complete */
return GL_FRAMEBUFFER_COMPLETE_EXT;
/* EGL_KHR_surfaceless_context allows the winsys FBO to be incomplete. */
if (buffer != &IncompleteFramebuffer) {
return GL_FRAMEBUFFER_COMPLETE_EXT;
} else {
return GL_FRAMEBUFFER_UNDEFINED;
}
}
/* No need to flush here */