From 7de4b98193d5bcad1d0a057a9c8d865bf93be9db Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 20 May 2020 14:33:38 -0400 Subject: [PATCH] panfrost: Don't flush explicitly when mipmapping The reorder work already takes cares of this nicely. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_resource.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index 5ae67ede233..8b57abada3e 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -790,7 +790,6 @@ panfrost_generate_mipmap( unsigned first_layer, unsigned last_layer) { - struct panfrost_context *ctx = pan_context(pctx); struct panfrost_resource *rsrc = pan_resource(prsrc); /* Generating a mipmap invalidates the written levels, so make that @@ -801,16 +800,7 @@ panfrost_generate_mipmap( for (unsigned l = base_level + 1; l <= last_level; ++l) rsrc->slices[l].initialized = false; - /* Beyond that, we just delegate the hard stuff. We're careful to - * include flushes on both ends to make sure the data is really valid. - * We could be doing a lot better perf-wise, especially once we have - * reorder-type optimizations in place. But for now prioritize - * correctness. */ - - panfrost_flush_batches_accessing_bo(ctx, rsrc->bo, PAN_BO_ACCESS_RW); - panfrost_bo_wait(rsrc->bo, INT64_MAX, PAN_BO_ACCESS_RW); - - /* We've flushed the original buffer if needed, now trigger a blit */ + /* Beyond that, we just delegate the hard stuff. */ bool blit_res = util_gen_mipmap( pctx, prsrc, format, @@ -818,14 +808,6 @@ panfrost_generate_mipmap( first_layer, last_layer, PIPE_TEX_FILTER_LINEAR); - /* If the blit was successful, flush once more. If it wasn't, well, let - * the gallium frontend deal with it. */ - - if (blit_res) { - panfrost_flush_batches_accessing_bo(ctx, rsrc->bo, PAN_BO_ACCESS_WRITE); - panfrost_bo_wait(rsrc->bo, INT64_MAX, PAN_BO_ACCESS_WRITE); - } - return blit_res; } -- 2.30.2