Mesa (master): panfrost: Don't flush explicitly when mipmapping
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 1 18:37:51 UTC 2020
Module: Mesa
Branch: master
Commit: 7de4b98193d5bcad1d0a057a9c8d865bf93be9db
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7de4b98193d5bcad1d0a057a9c8d865bf93be9db
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Wed May 20 14:33:38 2020 -0400
panfrost: Don't flush explicitly when mipmapping
The reorder work already takes cares of this nicely.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284>
---
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;
}
More information about the mesa-commit
mailing list