From: Jonathan Marek Date: Mon, 1 Jul 2019 20:48:51 +0000 (-0400) Subject: etnaviv: rs: don't use etna_compatible_rs_format when possible X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e910acb3f23ee197b563e0af8a79bc7ff5ec6b49;p=mesa.git etnaviv: rs: don't use etna_compatible_rs_format when possible This mirrors the change in blt. RS cares about this for msaa/compression. Signed-off-by: Jonathan Marek Reviewed-by: Christian Gmeiner --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_rs.c b/src/gallium/drivers/etnaviv/etnaviv_rs.c index 01e97b2080d..3ac4c5d5316 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_rs.c +++ b/src/gallium/drivers/etnaviv/etnaviv_rs.c @@ -574,8 +574,15 @@ etna_try_rs_blit(struct pipe_context *pctx, return false; } - unsigned src_format = etna_compatible_rs_format(blit_info->src.format); - unsigned dst_format = etna_compatible_rs_format(blit_info->dst.format); + unsigned src_format = blit_info->src.format; + unsigned dst_format = blit_info->dst.format; + + /* for a copy with same dst/src format, we can use a different format */ + if (translate_rs_format(src_format) == ETNA_NO_MATCH && + src_format == dst_format) { + src_format = dst_format = etna_compatible_rs_format(src_format); + } + if (translate_rs_format(src_format) == ETNA_NO_MATCH || translate_rs_format(dst_format) == ETNA_NO_MATCH || blit_info->scissor_enable ||