From: Eric Anholt Date: Fri, 10 Feb 2012 20:05:16 +0000 (-0800) Subject: mesa: Only end render-to-texture at bind time for drawbuffers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a1fd13fff18f95b83fabf3428689ff47abb5c5f8;p=mesa.git mesa: Only end render-to-texture at bind time for drawbuffers. If we're only starting for new draw buffers, why would we end for old read buffers along with draw buffers? --- diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 7f9ba4a92b4..6ee062d0b11 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1758,11 +1758,8 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer) if (bindDrawBuf) { FLUSH_VERTICES(ctx, _NEW_BUFFERS); - /* check if old read/draw buffers were render-to-texture */ - if (!bindReadBuf) - check_end_texture_render(ctx, oldReadFb); - - if (oldDrawFb != oldReadFb) + /* check if old framebuffer had any texture attachments */ + if (oldDrawFb) check_end_texture_render(ctx, oldDrawFb); /* check if newly bound framebuffer has any texture attachments */