mesa: Make renderbuffer FBO attachments not layered

For framebuffer completeness checks, consider renderbuffers as not
layered. Previously, they would have counted as layered if a layered
textured had previously been bound to the same attachment point. This
could cause framebuffer completeness checks to incorrectly fail with
GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS, even if no layered attachments
were present.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89026
This commit is contained in:
James Legg
2015-02-07 23:33:15 +00:00
committed by Chris Forbes
parent 49299ef6fa
commit 1581e12aba
+1
View File
@@ -468,6 +468,7 @@ set_renderbuffer_attachment(struct gl_context *ctx,
remove_attachment(ctx, att);
att->Type = GL_RENDERBUFFER_EXT;
att->Texture = NULL; /* just to be safe */
att->Layered = GL_FALSE;
att->Complete = GL_FALSE;
_mesa_reference_renderbuffer(&att->Renderbuffer, rb);
}