freedreno: Add perf warning for WC readback

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176>
This commit is contained in:
Rob Clark 2021-06-18 11:37:11 -07:00 committed by Marge Bot
parent 7e088d3621
commit 8c6e789c24
3 changed files with 10 additions and 0 deletions

View file

@ -445,6 +445,12 @@ fd_bo_size(struct fd_bo *bo)
return bo->size;
}
bool
fd_bo_is_cached(struct fd_bo *bo)
{
return !!(bo->alloc_flags & FD_BO_CACHED_COHERENT);
}
void *
fd_bo_map(struct fd_bo *bo)
{

View file

@ -210,6 +210,7 @@ uint32_t fd_bo_size(struct fd_bo *bo);
void *fd_bo_map(struct fd_bo *bo);
int fd_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op);
void fd_bo_cpu_fini(struct fd_bo *bo);
bool fd_bo_is_cached(struct fd_bo *bo);
#ifdef __cplusplus
} /* end of extern "C" */

View file

@ -824,6 +824,9 @@ resource_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc,
return buf;
}
} else if ((usage & PIPE_MAP_READ) && !fd_bo_is_cached(rsc->bo)) {
perf_debug_ctx(ctx, "wc readback: prsc=%p, level=%u, usage=%x, box=%dx%d+%d,%d",
prsc, level, usage, box->width, box->height, box->x, box->y);
}
if (usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE) {