gallium/radeon: handle render_condition_enable for clear_rt/ds
authorMarek Olšák <marek.olsak@amd.com>
Mon, 8 Aug 2016 22:42:14 +0000 (00:42 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 9 Aug 2016 23:10:21 +0000 (01:10 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/r300/r300_blit.c
src/gallium/drivers/r600/r600_blit.c
src/gallium/drivers/radeonsi/si_blit.c

index cfb3f6da22089344269d206446c50ee0bce2df0a..b5c3ae5ac3bf91a5a457d66906665998f78d455f 100644 (file)
@@ -435,7 +435,8 @@ static void r300_clear_render_target(struct pipe_context *pipe,
 {
     struct r300_context *r300 = r300_context(pipe);
 
-    r300_blitter_begin(r300, R300_CLEAR_SURFACE);
+    r300_blitter_begin(r300, R300_CLEAR_SURFACE |
+                       (render_condition_enabled ? 0 : R300_IGNORE_RENDER_COND));
     util_blitter_clear_render_target(r300->blitter, dst, color,
                                      dstx, dsty, width, height);
     r300_blitter_end(r300);
@@ -462,7 +463,8 @@ static void r300_clear_depth_stencil(struct pipe_context *pipe,
     }
 
     /* XXX Do not decompress ZMask of the currently-set zbuffer. */
-    r300_blitter_begin(r300, R300_CLEAR_SURFACE);
+    r300_blitter_begin(r300, R300_CLEAR_SURFACE |
+                       (render_condition_enabled ? 0 : R300_IGNORE_RENDER_COND));
     util_blitter_clear_depth_stencil(r300->blitter, dst, clear_flags, depth, stencil,
                                      dstx, dsty, width, height);
     r300_blitter_end(r300);
index 327efc20a6e52829c363e885f3e41d6eb8147a70..adf616e68817de51cb38a02519171bd250062f70 100644 (file)
@@ -478,7 +478,8 @@ static void r600_clear_render_target(struct pipe_context *ctx,
 {
        struct r600_context *rctx = (struct r600_context *)ctx;
 
-       r600_blitter_begin(ctx, R600_CLEAR_SURFACE);
+       r600_blitter_begin(ctx, R600_CLEAR_SURFACE |
+                          (render_condition_enabled ? 0 : R600_DISABLE_RENDER_COND));
        util_blitter_clear_render_target(rctx->blitter, dst, color,
                                         dstx, dsty, width, height);
        r600_blitter_end(ctx);
@@ -495,7 +496,8 @@ static void r600_clear_depth_stencil(struct pipe_context *ctx,
 {
        struct r600_context *rctx = (struct r600_context *)ctx;
 
-       r600_blitter_begin(ctx, R600_CLEAR_SURFACE);
+       r600_blitter_begin(ctx, R600_CLEAR_SURFACE |
+                          (render_condition_enabled ? 0 : R600_DISABLE_RENDER_COND));
        util_blitter_clear_depth_stencil(rctx->blitter, dst, clear_flags, depth, stencil,
                                         dstx, dsty, width, height);
        r600_blitter_end(ctx);
index ce13e97ca0a4b2b3f73dfd1cf0f3a552d46f0dc8..f4bff6b5bb11fc56b2d181a616f9ece965a67dc2 100644 (file)
@@ -764,7 +764,8 @@ static void si_clear_render_target(struct pipe_context *ctx,
 {
        struct si_context *sctx = (struct si_context *)ctx;
 
-       si_blitter_begin(ctx, SI_CLEAR_SURFACE);
+       si_blitter_begin(ctx, SI_CLEAR_SURFACE |
+                        (render_condition_enabled ? 0 : SI_DISABLE_RENDER_COND));
        util_blitter_clear_render_target(sctx->blitter, dst, color,
                                         dstx, dsty, width, height);
        si_blitter_end(ctx);
@@ -781,7 +782,8 @@ static void si_clear_depth_stencil(struct pipe_context *ctx,
 {
        struct si_context *sctx = (struct si_context *)ctx;
 
-       si_blitter_begin(ctx, SI_CLEAR_SURFACE);
+       si_blitter_begin(ctx, SI_CLEAR_SURFACE |
+                        (render_condition_enabled ? 0 : SI_DISABLE_RENDER_COND));
        util_blitter_clear_depth_stencil(sctx->blitter, dst, clear_flags, depth, stencil,
                                         dstx, dsty, width, height);
        si_blitter_end(ctx);