Mesa (7.10): st/mesa: BlitFramebuffer should not be killed by conditional rendering

Marek Olšák mareko at kemper.freedesktop.org
Wed Jun 1 00:21:04 UTC 2011


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun May 29 17:52:29 2011 +0200

st/mesa: BlitFramebuffer should not be killed by conditional rendering

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <brianp at vmware.com>
(cherry picked from commit ccfeb90b757ed2b2948bbe06fd4f4a15628639f9)

---

 src/mesa/state_tracker/st_cb_blit.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c
index d9eb806..7b1d02f 100644
--- a/src/mesa/state_tracker/st_cb_blit.c
+++ b/src/mesa/state_tracker/st_cb_blit.c
@@ -109,6 +109,11 @@ st_BlitFramebuffer(struct gl_context *ctx,
       dstY1 = tmp;
    }
 
+   /* Disable conditional rendering. */
+   if (st->render_condition) {
+      st->pipe->render_condition(st->pipe, NULL, 0);
+   }
+
    if (mask & GL_COLOR_BUFFER_BIT) {
       struct gl_renderbuffer_attachment *srcAtt =
          &readFB->Attachment[readFB->_ColorReadBufferIndex];
@@ -121,7 +126,7 @@ st_BlitFramebuffer(struct gl_context *ctx,
          struct pipe_surface *dstSurf = dstRb->surface;
 
          if (!srcObj->pt)
-            return;
+            goto done;
 
          util_blit_pixels(st->blit, srcObj->pt, srcAtt->TextureLevel,
                           srcX0, srcY0, srcX1, srcY1,
@@ -199,6 +204,13 @@ st_BlitFramebuffer(struct gl_context *ctx,
          }
       }
    }
+
+done:
+   /* Restore conditional rendering state. */
+   if (st->render_condition) {
+      st->pipe->render_condition(st->pipe, st->render_condition,
+                                 st->condition_mode);
+   }
 }
 
 




More information about the mesa-commit mailing list