etnaviv: fix compression format not set correctly in TS_MEM_CONFIG
authorJonathan Marek <jonathan@marek.ca>
Mon, 1 Jul 2019 20:29:40 +0000 (16:29 -0400)
committerJonathan Marek <jonathan@marek.ca>
Thu, 4 Jul 2019 18:05:18 +0000 (14:05 -0400)
VIVS_TS_MEM_CONFIG_COLOR_COMPRESSION_FORMAT() needs to be used.

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

index 8c85f329f76913816b757e8fd8a6ae2f1f506d16..631fced1e3708249bf98e6fd8cf2b57e0957ca66 100644 (file)
@@ -657,7 +657,8 @@ etna_try_rs_blit(struct pipe_context *pctx,
    if (src->base.nr_samples > 1) {
       uint32_t msaa_format = translate_msaa_format(src_format);
       assert(msaa_format != ETNA_NO_MATCH);
-      ts_mem_config |= VIVS_TS_MEM_CONFIG_COLOR_COMPRESSION | msaa_format;
+      ts_mem_config |= VIVS_TS_MEM_CONFIG_COLOR_COMPRESSION |
+                       VIVS_TS_MEM_CONFIG_COLOR_COMPRESSION_FORMAT(msaa_format);
    }
 
    /* Always flush color and depth cache together before resolving. This works
index a63350993fefea090a71d332938f39b46b15c2af..f2460be834ee66014b1e6e1a8d0b21eb5ece3d78 100644 (file)
@@ -179,9 +179,11 @@ etna_set_framebuffer_state(struct pipe_context *pctx,
       }
 
       /* MSAA */
-      if (cbuf->base.texture->nr_samples > 1)
+      if (cbuf->base.texture->nr_samples > 1) {
          ts_mem_config |=
-            VIVS_TS_MEM_CONFIG_COLOR_COMPRESSION | translate_msaa_format(cbuf->base.format);
+            VIVS_TS_MEM_CONFIG_COLOR_COMPRESSION |
+            VIVS_TS_MEM_CONFIG_COLOR_COMPRESSION_FORMAT(translate_msaa_format(cbuf->base.format));
+      }
 
       nr_samples_color = cbuf->base.texture->nr_samples;
    } else {