summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-02-10 12:05:16 -0800
committerEric Anholt <[email protected]>2012-02-17 13:31:27 -0800
commita1fd13fff18f95b83fabf3428689ff47abb5c5f8 (patch)
tree18efe4202263f0f1b6b0e8f5ea96fe619df19cd4 /src/mesa
parent7199b0b6811b3340cb5c531c8625220e964fa16c (diff)
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?
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/fbobject.c7
1 files changed, 2 insertions, 5 deletions
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 */