diff --git a/.pick_status.json b/.pick_status.json index 89a5917b13f..65361b2aa04 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2902,7 +2902,7 @@ "description": "etnaviv: rs: flush TS cache before making configuration changes", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/etnaviv/etnaviv_rs.c b/src/gallium/drivers/etnaviv/etnaviv_rs.c index 83dc49fed98..4d15200d90f 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_rs.c +++ b/src/gallium/drivers/etnaviv/etnaviv_rs.c @@ -745,9 +745,6 @@ etna_try_rs_blit(struct pipe_context *pctx, etna_set_state(ctx->stream, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH); etna_stall(ctx->stream, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE); - - if (src_lev->ts_size && src_lev->ts_valid) - etna_set_state(ctx->stream, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH); } /* Set up color TS to source surface before blit, if needed */ @@ -758,6 +755,9 @@ etna_try_rs_blit(struct pipe_context *pctx, src_lev->ts_offset + blit_info->src.box.z * src_lev->ts_layer_stride; uint32_t ts_mem_config = 0; + /* flush TS cache before changing to another TS configuration */ + etna_set_state(ctx->stream, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH); + if (src_lev->ts_compress_fmt >= 0) { ts_mem_config |= VIVS_TS_MEM_CONFIG_COLOR_COMPRESSION | VIVS_TS_MEM_CONFIG_COLOR_COMPRESSION_FORMAT(src_lev->ts_compress_fmt);