[Mesa-dev] [PATCH 6/9] radeonsi: handle incompatible DCC formats in resource_copy_region

Marek Olšák maraeo at gmail.com
Wed Mar 29 17:58:51 UTC 2017


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

Required because of later commits.
---
 src/gallium/drivers/radeonsi/si_blit.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index bc5c2d6..ded8beb 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -934,20 +934,25 @@ void si_resource_copy_region(struct pipe_context *ctx,
 				src_templ.format = PIPE_FORMAT_R32G32B32A32_UINT;
 				break;
 			default:
 				fprintf(stderr, "Unhandled format %s with blocksize %u\n",
 					util_format_short_name(src->format), blocksize);
 				assert(0);
 			}
 		}
 	}
 
+	vi_dcc_disable_if_incompatible_format(&sctx->b, dst, dst_level,
+					      dst_templ.format);
+	vi_dcc_disable_if_incompatible_format(&sctx->b, src, src_level,
+					      src_templ.format);
+
 	/* Initialize the surface. */
 	dst_view = r600_create_surface_custom(ctx, dst, &dst_templ,
 					      dst_width, dst_height);
 
 	/* Initialize the sampler view. */
 	src_view = si_create_sampler_view_custom(ctx, src, &src_templ,
 						 src_width0, src_height0,
 						 src_force_level);
 
 	u_box_3d(dstx, dsty, dstz, abs(src_box->width), abs(src_box->height),
-- 
2.7.4



More information about the mesa-dev mailing list