swr: turn off queries around blits
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 26 Nov 2016 22:56:24 +0000 (17:56 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 1 Dec 2016 01:35:53 +0000 (20:35 -0500)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
src/gallium/drivers/swr/swr_context.cpp

index b355bba0d7efcbfe7fc85f66a8914b50ac0e0048..b8c87faef733b9eabcc0389bcbd5aa23dc716742 100644 (file)
@@ -301,7 +301,10 @@ swr_blit(struct pipe_context *pipe, const struct pipe_blit_info *blit_info)
       return;
    }
 
-   /* XXX turn off occlusion and streamout queries */
+   if (ctx->active_queries) {
+      SwrEnableStatsFE(ctx->swrContext, FALSE);
+      SwrEnableStatsBE(ctx->swrContext, FALSE);
+   }
 
    util_blitter_save_vertex_buffer_slot(ctx->blitter, ctx->vertex_buffer);
    util_blitter_save_vertex_elements(ctx->blitter, (void *)ctx->velems);
@@ -335,6 +338,11 @@ swr_blit(struct pipe_context *pipe, const struct pipe_blit_info *blit_info)
                                       ctx->render_cond_mode);
 
    util_blitter_blit(ctx->blitter, &info);
+
+   if (ctx->active_queries) {
+      SwrEnableStatsFE(ctx->swrContext, TRUE);
+      SwrEnableStatsBE(ctx->swrContext, TRUE);
+   }
 }