Mesa (master): mesa: Only end render-to-texture at bind time for drawbuffers.

Eric Anholt anholt at kemper.freedesktop.org
Fri Feb 17 21:49:27 UTC 2012


Module: Mesa
Branch: master
Commit: a1fd13fff18f95b83fabf3428689ff47abb5c5f8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a1fd13fff18f95b83fabf3428689ff47abb5c5f8

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 10 12:05:16 2012 -0800

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?

---

 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 7f9ba4a..6ee062d 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 */




More information about the mesa-commit mailing list