Mesa (master): radeonsi: scanout buffers cannot be a destination of MSAA resolve

Marek Olšák mareko at kemper.freedesktop.org
Fri Aug 16 23:49:16 UTC 2013


Module: Mesa
Branch: master
Commit: 8c04f253604dd38f43f2a3b0bf422538da8dcfa0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8c04f253604dd38f43f2a3b0bf422538da8dcfa0

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Aug 10 18:51:12 2013 +0200

radeonsi: scanout buffers cannot be a destination of MSAA resolve

Resolving to scanout buffers just doesn't work.

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

---

 src/gallium/drivers/radeonsi/r600_blit.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/r600_blit.c b/src/gallium/drivers/radeonsi/r600_blit.c
index 7ac92d4..edfa730 100644
--- a/src/gallium/drivers/radeonsi/r600_blit.c
+++ b/src/gallium/drivers/radeonsi/r600_blit.c
@@ -471,6 +471,7 @@ static boolean is_simple_msaa_resolve(const struct pipe_blit_info *info)
 	unsigned dst_height = u_minify(info->dst.resource->height0, info->dst.level);
 	struct r600_texture *dst = (struct r600_texture*)info->dst.resource;
 	unsigned dst_tile_mode = dst->surface.level[info->dst.level].mode;
+	bool dst_is_scanout = (dst->surface.flags & RADEON_SURF_SCANOUT) != 0;
 
 	return info->dst.resource->format == info->src.resource->format &&
 		info->dst.resource->format == info->dst.format &&
@@ -489,7 +490,8 @@ static boolean is_simple_msaa_resolve(const struct pipe_blit_info *info)
 		info->src.box.height == dst_height &&
 		/* Dst must be tiled. If it's not, we have to use a temporary
 		 * resource which is tiled. */
-		dst_tile_mode >= RADEON_SURF_MODE_1D;
+		dst_tile_mode >= RADEON_SURF_MODE_1D &&
+		!dst_is_scanout;
 }
 
 /* For MSAA integer resolving to work, we change the format to NORM using this function. */




More information about the mesa-commit mailing list