From: Jonathan Marek Date: Mon, 1 Jul 2019 20:29:40 +0000 (-0400) Subject: etnaviv: fix compression format not set correctly in TS_MEM_CONFIG X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84c87f40fbd4733d59bd8ff218d0ab82730b5160;p=mesa.git etnaviv: fix compression format not set correctly in TS_MEM_CONFIG VIVS_TS_MEM_CONFIG_COLOR_COMPRESSION_FORMAT() needs to be used. 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 8c85f329f76..631fced1e37 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_rs.c +++ b/src/gallium/drivers/etnaviv/etnaviv_rs.c @@ -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 diff --git a/src/gallium/drivers/etnaviv/etnaviv_state.c b/src/gallium/drivers/etnaviv/etnaviv_state.c index a63350993fe..f2460be834e 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_state.c +++ b/src/gallium/drivers/etnaviv/etnaviv_state.c @@ -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 {