Mesa (main): panfrost: Warn on going out of AFBC
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 14 18:05:14 UTC 2021
Module: Mesa
Branch: main
Commit: bcd915622b23ed194e92f810ceb9bd89c27fedd5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bcd915622b23ed194e92f810ceb9bd89c27fedd5
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Mon Jul 12 13:56:16 2021 -0400
panfrost: Warn on going out of AFBC
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11830>
---
src/gallium/drivers/panfrost/pan_context.c | 3 ++-
src/gallium/drivers/panfrost/pan_resource.c | 4 +++-
src/gallium/drivers/panfrost/pan_resource.h | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 00f5bfd93ff..9f82998dc8b 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -265,7 +265,8 @@ panfrost_set_shader_images(
/* Images don't work with AFBC, since they require pixel-level granularity */
if (drm_is_afbc(rsrc->image.layout.modifier)) {
pan_resource_modifier_convert(ctx, rsrc,
- DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED);
+ DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED,
+ "Shader image");
}
util_copy_image_view(&ctx->images[shader][start_slot+i], image);
diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index 594c5b51962..14baf909aaf 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -986,10 +986,12 @@ panfrost_ptr_map(struct pipe_context *pctx,
void
pan_resource_modifier_convert(struct panfrost_context *ctx,
struct panfrost_resource *rsrc,
- uint64_t modifier)
+ uint64_t modifier, const char *reason)
{
assert(!rsrc->modifier_constant);
+ perf_debug_ctx(ctx, "Disabling AFBC with a blit. Reason: %s", reason);
+
struct pipe_resource *tmp_prsrc =
panfrost_resource_create_with_modifier(
ctx->base.screen, &rsrc->base, modifier);
diff --git a/src/gallium/drivers/panfrost/pan_resource.h b/src/gallium/drivers/panfrost/pan_resource.h
index a3cd7bf14e1..6150e161956 100644
--- a/src/gallium/drivers/panfrost/pan_resource.h
+++ b/src/gallium/drivers/panfrost/pan_resource.h
@@ -156,6 +156,6 @@ panfrost_translate_texture_dimension(enum pipe_texture_target t) {
void
pan_resource_modifier_convert(struct panfrost_context *ctx,
struct panfrost_resource *rsrc,
- uint64_t modifier);
+ uint64_t modifier, const char *reason);
#endif /* PAN_RESOURCE_H */
More information about the mesa-commit
mailing list