glapi: add indexed blend functions (GL 4.0)
[mesa.git] / src / mesa / main / fbobject.c
index 97538bc7b293106ba38561a01b21d85fe2045029..ae3a418cd1c44f0f8dbccca99d9626558ecf2ef8 100644 (file)
@@ -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);