From 419e05d5f64d8be6bf34af8f44a0766e12c1d70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 19 Mar 2021 23:51:32 -0400 Subject: [PATCH] radeonsi: don't do an L2 flush in compute_do_clear_or_copy if we're not syncing Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_compute_blit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c index 990018ee23e..c149263c332 100644 --- a/src/gallium/drivers/radeonsi/si_compute_blit.c +++ b/src/gallium/drivers/radeonsi/si_compute_blit.c @@ -262,7 +262,9 @@ static void si_compute_do_clear_or_copy(struct si_context *sctx, struct pipe_res si_launch_grid_internal(sctx, &info, saved_cs, flags); enum si_cache_policy cache_policy = get_cache_policy(sctx, coher, size); - sctx->flags |= cache_policy == L2_BYPASS ? SI_CONTEXT_WB_L2 : 0; + + if (flags & SI_OP_SYNC_AFTER) + sctx->flags |= cache_policy == L2_BYPASS ? SI_CONTEXT_WB_L2 : 0; if (cache_policy != L2_BYPASS) si_resource(dst)->TC_L2_dirty = true;