asahi: Print info about shadowed resources

If resource and perf debugging are both enabled, this prints resource
info for shadowed resources.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24635>
This commit is contained in:
Asahi Lina 2023-07-22 18:36:54 +09:00 committed by Marge Bot
parent ccbd125468
commit 9d668f87d3

View file

@ -688,6 +688,7 @@ agx_shadow(struct agx_context *ctx, struct agx_resource *rsrc, bool needs_copy)
if (needs_copy) {
perf_debug_ctx(ctx, "Shadowing %zu bytes on the CPU (%s)", size,
(old->flags & AGX_BO_WRITEBACK) ? "cached" : "uncached");
agx_resource_debug(rsrc, "Shadowed: ");
memcpy(new_->ptr.cpu, old->ptr.cpu, size);
}