summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Legg <[email protected]>2014-05-23 12:25:37 +0100
committerBrian Paul <[email protected]>2014-05-23 08:06:02 -0600
commit846c715abb17e13a5d39c565d0995404b6178d98 (patch)
treead47c91193dfcde50566fc3732a9656ec3a96859
parentd4c3968c25885f6eb53dee4cc0c60d8d3f8fec32 (diff)
mesa: Fix unbinding GL_DEPTH_STENCIL_ATTACHMENT
glFramebufferRender(..., GL_DEPTH_STENCIL_ATTACHMENT, ..., 0) only detached the depth buffer and not the stencil buffer. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=79115 Reviewed-by: Brian Paul <[email protected]> Cc: "10.1 10.2" <[email protected]>
-rw-r--r--src/mesa/main/fbobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 97538bc7b29..ae3a418cd1c 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -500,6 +500,12 @@ _mesa_framebuffer_renderbuffer(struct gl_context *ctx,
}
else {
remove_attachment(ctx, att);
+ if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
+ /* detach stencil (depth was detached above) */
+ att = get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT_EXT);
+ assert(att);
+ remove_attachment(ctx, att);
+ }
}
invalidate_framebuffer(fb);