Mesa (main): freedreno: Update comments about PIPE_BUFFER shadowing.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 30 21:57:29 UTC 2021
Module: Mesa
Branch: main
Commit: 172082f235b5b55372c0efdf1182db2abd565f08
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=172082f235b5b55372c0efdf1182db2abd565f08
Author: Emma Anholt <emma at anholt.net>
Date: Tue Jun 22 14:55:10 2021 -0700
freedreno: Update comments about PIPE_BUFFER shadowing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11544>
---
src/gallium/drivers/freedreno/freedreno_resource.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 89d27504286..56df34f769e 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -395,7 +395,11 @@ fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc,
if (!is_renderable(prsc))
fallback = true;
- /* do shadowing back-blits on the cpu for buffers: */
+ /* do shadowing back-blits on the cpu for buffers -- requires about a page of
+ * DMA to make GPU copies worth it according to robclark. Note, if you
+ * decide to do it on the GPU then you'll need to update valid_buffer_range
+ * in the swap()s below.
+ */
if (prsc->target == PIPE_BUFFER)
fallback = true;
@@ -437,7 +441,6 @@ fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc,
DBG("shadow: %p (%d, %p) -> %p (%d, %p)", rsc, rsc->b.b.reference.count,
rsc->track, shadow, shadow->b.b.reference.count, shadow->track);
- /* TODO valid_buffer_range?? */
swap(rsc->bo, shadow->bo);
swap(rsc->layout, shadow->layout);
rsc->seqno = p_atomic_inc_return(&ctx->screen->rsc_seqno);
More information about the mesa-commit
mailing list