Mesa (7.10): st/mesa: conditional rendering should not kill texture decompression via blit

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


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

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

st/mesa: conditional rendering should not kill texture decompression via blit

NOTE: This is a candidate for the 7.10 branch.

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

---

 src/mesa/state_tracker/st_cb_texture.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index b3a05c0..3bd6128 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -882,6 +882,11 @@ decompress_with_blit(struct gl_context * ctx, GLenum target, GLint level,
       return;
    }
 
+   /* Disable conditional rendering. */
+   if (st->render_condition) {
+      pipe->render_condition(pipe, NULL, 0);
+   }
+
    /* blit/render/decompress */
    util_blit_pixels_tex(st->blit,
                         src_view,      /* pipe_resource (src) */
@@ -893,6 +898,12 @@ decompress_with_blit(struct gl_context * ctx, GLenum target, GLint level,
                         0.0,              /* z */
                         PIPE_TEX_MIPFILTER_NEAREST);
 
+   /* Restore conditional rendering state. */
+   if (st->render_condition) {
+      pipe->render_condition(pipe, st->render_condition,
+                             st->condition_mode);
+   }
+
    /* map the dst_surface so we can read from it */
    tex_xfer = pipe_get_transfer(st_context(ctx)->pipe,
                                 dst_texture, 0, 0,




More information about the mesa-commit mailing list