etnaviv: rs: don't use etna_compatible_rs_format when possible
authorJonathan Marek <jonathan@marek.ca>
Mon, 1 Jul 2019 20:48:51 +0000 (16:48 -0400)
committerJonathan Marek <jonathan@marek.ca>
Thu, 4 Jul 2019 18:05:18 +0000 (14:05 -0400)
This mirrors the change in blt. RS cares about this for msaa/compression.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_rs.c

index 01e97b2080d217afda2e9f70d41b80a9810533cd..3ac4c5d53164fbbebd48a426aca602377f8c5158 100644 (file)
@@ -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 ||