[Mesa-dev] [PATCH 02/20] radeonsi: check for !is_linear in do_hardware_msaa_resolve

Marek Olšák maraeo at gmail.com
Wed Nov 16 18:38:25 UTC 2016


From: Marek Olšák <marek.olsak at amd.com>

We don't want opt4Space here.
---
 src/gallium/drivers/radeonsi/si_blit.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index 075d76a..f5f49c1 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -965,20 +965,21 @@ void si_resource_copy_region(struct pipe_context *ctx,
 	pipe_surface_reference(&dst_view, NULL);
 	pipe_sampler_view_reference(&src_view, NULL);
 }
 
 static bool do_hardware_msaa_resolve(struct pipe_context *ctx,
 				     const struct pipe_blit_info *info)
 {
 	struct si_context *sctx = (struct si_context*)ctx;
 	struct r600_texture *src = (struct r600_texture*)info->src.resource;
 	struct r600_texture *dst = (struct r600_texture*)info->dst.resource;
+	struct r600_texture *rtmp;
 	unsigned dst_width = u_minify(info->dst.resource->width0, info->dst.level);
 	unsigned dst_height = u_minify(info->dst.resource->height0, info->dst.level);
 	enum pipe_format format = info->src.format;
 	unsigned sample_mask = ~0;
 	struct pipe_resource *tmp, templ;
 	struct pipe_blit_info blit;
 
 	/* Check basic requirements for hw resolve. */
 	if (!(info->src.resource->nr_samples > 1 &&
 	      info->dst.resource->nr_samples <= 1 &&
@@ -1067,23 +1068,24 @@ resolve_to_temp:
 
 	/* The src and dst microtile modes must be the same. */
 	if (src->surface.micro_tile_mode == RADEON_MICRO_MODE_DISPLAY)
 		templ.bind = PIPE_BIND_SCANOUT;
 	else
 		templ.bind = 0;
 
 	tmp = ctx->screen->resource_create(ctx->screen, &templ);
 	if (!tmp)
 		return false;
+	rtmp = (struct r600_texture*)tmp;
 
-	assert(src->surface.micro_tile_mode ==
-	       ((struct r600_texture*)tmp)->surface.micro_tile_mode);
+	assert(!rtmp->surface.is_linear);
+	assert(src->surface.micro_tile_mode == rtmp->surface.micro_tile_mode);
 
 	/* resolve */
 	si_blitter_begin(ctx, SI_COLOR_RESOLVE |
 			 (info->render_condition_enable ? 0 : SI_DISABLE_RENDER_COND));
 	util_blitter_custom_resolve_color(sctx->blitter, tmp, 0, 0,
 					  info->src.resource, info->src.box.z,
 					  sample_mask, sctx->custom_blend_resolve,
 					  format);
 	si_blitter_end(ctx);
 
-- 
2.7.4



More information about the mesa-dev mailing list