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 */