[Mesa-dev] [PATCH 1/3] mesa: Only end render-to-texture at bind time for drawbuffers.

Eric Anholt eric at anholt.net
Fri Feb 10 14:53:25 PST 2012


If we're only starting for new draw buffers, why would we end for old
read buffers along with draw buffers?
---
 src/mesa/main/fbobject.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 987d687..64c3393 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 */
-- 
1.7.9



More information about the mesa-dev mailing list