st/mesa: CopyTex(Sub)Image should not be killed by conditional rendering
authorMarek Olšák <maraeo@gmail.com>
Sun, 29 May 2011 13:35:25 +0000 (15:35 +0200)
committerMarek Olšák <maraeo@gmail.com>
Mon, 30 May 2011 08:51:01 +0000 (10:51 +0200)
NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_cb_texture.c

index 9d824b46c2333679962e1276a37b4d8f3ff3a32c..c7c4da684180a03a94a02230d66ecba623919f56 100644 (file)
@@ -1556,6 +1556,11 @@ st_copy_texsubimage(struct gl_context *ctx,
             srcY1 = srcY0 + height;
          }
 
+         /* Disable conditional rendering. */
+         if (st->render_condition) {
+            pipe->render_condition(pipe, NULL, 0);
+         }
+
          util_blit_pixels_writemask(st->blit,
                                     strb->texture,
                                     strb->surface->u.tex.level,
@@ -1567,6 +1572,13 @@ st_copy_texsubimage(struct gl_context *ctx,
                                     destX + width, destY + height,
                                     0.0, PIPE_TEX_MIPFILTER_NEAREST,
                                     format_writemask);
+
+         /* Restore conditional rendering state. */
+         if (st->render_condition) {
+            pipe->render_condition(pipe, st->render_condition,
+                                   st->condition_mode);
+         }
+
          use_fallback = GL_FALSE;
       }