r600g,radeonsi: don't use hardware MSAA resolve if dst is fast-cleared
authorMarek Olšák <marek.olsak@amd.com>
Mon, 2 Jun 2014 11:51:29 +0000 (13:51 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 3 Jun 2014 11:33:14 +0000 (13:33 +0200)
It doesn't work and our docs say so too.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/r600/r600_blit.c
src/gallium/drivers/radeonsi/si_blit.c

index a2e7fa343536679ddea66d529d3bc00ec6364340..3269c476fd4824872b36616ca4cb3554c31d3213 100644 (file)
@@ -788,7 +788,8 @@ static bool do_hardware_msaa_resolve(struct pipe_context *ctx,
            info->src.box.width == dst_width &&
            info->src.box.height == dst_height &&
            info->src.box.depth == 1 &&
-           dst->surface.level[info->dst.level].mode >= RADEON_SURF_MODE_1D) {
+           dst->surface.level[info->dst.level].mode >= RADEON_SURF_MODE_1D &&
+           (!dst->cmask.size || !dst->dirty_level_mask) /* dst cannot be fast-cleared */) {
                r600_blitter_begin(ctx, R600_COLOR_RESOLVE |
                                   (info->render_condition_enable ? 0 : R600_DISABLE_RENDER_COND));
                util_blitter_custom_resolve_color(rctx->blitter,
index 0a4a660d2ac3a684191146e0b9ebf1ac4acc0c04..e02615fe6ca07b128f3f3c917c4495b20ee2e59d 100644 (file)
@@ -688,7 +688,8 @@ static bool do_hardware_msaa_resolve(struct pipe_context *ctx,
            info->src.box.height == dst_height &&
            info->src.box.depth == 1 &&
            dst->surface.level[info->dst.level].mode >= RADEON_SURF_MODE_1D &&
-           !(dst->surface.flags & RADEON_SURF_SCANOUT)) {
+           !(dst->surface.flags & RADEON_SURF_SCANOUT) &&
+           (!dst->cmask.size || !dst->dirty_level_mask) /* dst cannot be fast-cleared */) {
                si_blitter_begin(ctx, SI_COLOR_RESOLVE |
                                 (info->render_condition_enable ? 0 : SI_DISABLE_RENDER_COND));
                util_blitter_custom_resolve_color(sctx->blitter,