summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_state.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-05-12 16:05:44 -0700
committerEric Anholt <[email protected]>2017-09-27 10:21:49 -0700
commita8fd58eae59607ac42eaa7187b0d9e6c51b83af9 (patch)
tree0adfc15b49ea1fc60eaf84691f18dcce4069e83f /src/gallium/drivers/vc4/vc4_state.c
parent673dda8330769309a319d3e7f24a029cd72a1caf (diff)
vc4: Add labels to BOs for debug builds or with VC4_DEBUG=surf set.
This has proven to be incredibly useful for debugging CMA allocation failures and driving memory management improvements. However, we don't want to burden entry and exit from the BO cache with the labeling ioctl's overhead on release builds.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_state.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c
index d6d44793e38..17aa7eb3971 100644
--- a/src/gallium/drivers/vc4/vc4_state.c
+++ b/src/gallium/drivers/vc4/vc4_state.c
@@ -587,6 +587,9 @@ vc4_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc,
return NULL;
}
rsc = vc4_resource(prsc);
+ vc4_bo_label(vc4_screen(pctx->screen), rsc->bo,
+ "tiling shadow %dx%d",
+ tmpl.width0, tmpl.height0);
/* Flag it as needing update of the contents from the parent. */
rsc->writes = shadow_parent->writes - 1;