From 564e8a9a0b0d413d128fa2cca87e7a6e54a92be5 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 4 Jun 2025 13:15:35 +0200 Subject: [PATCH] panfrost: remove surface create/destroy hooks These should be unused now, let's get rid of them. Reviewed-by: Iago Toral Quiroga Reviewed-by: Boris Brezillon Part-of: --- src/gallium/drivers/panfrost/pan_resource.c | 34 --------------------- 1 file changed, 34 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index 752c68bf938..f1bd7da23b4 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -380,38 +380,6 @@ panfrost_flush_resource(struct pipe_context *pctx, struct pipe_resource *prsc) /* TODO */ } -static struct pipe_surface * -panfrost_create_surface(struct pipe_context *pipe, struct pipe_resource *pt, - const struct pipe_surface *surf_tmpl) -{ - struct pipe_surface *ps = NULL; - - ps = CALLOC_STRUCT(pipe_surface); - - if (ps) { - pipe_reference_init(&ps->reference, 1); - pipe_resource_reference(&ps->texture, pt); - ps->context = pipe; - ps->format = surf_tmpl->format; - - assert(surf_tmpl->level <= pt->last_level); - ps->nr_samples = surf_tmpl->nr_samples; - ps->level = surf_tmpl->level; - ps->first_layer = surf_tmpl->first_layer; - ps->last_layer = surf_tmpl->last_layer; - } - - return ps; -} - -static void -panfrost_surface_destroy(struct pipe_context *pipe, struct pipe_surface *surf) -{ - assert(surf->texture); - pipe_resource_reference(&surf->texture, NULL); - free(surf); -} - static inline bool panfrost_is_2d(const struct panfrost_resource *pres) { @@ -2307,8 +2275,6 @@ panfrost_resource_context_init(struct pipe_context *pctx) pctx->buffer_unmap = u_transfer_helper_transfer_unmap; pctx->texture_map = u_transfer_helper_transfer_map; pctx->texture_unmap = u_transfer_helper_transfer_unmap; - pctx->create_surface = panfrost_create_surface; - pctx->surface_destroy = panfrost_surface_destroy; pctx->resource_copy_region = util_resource_copy_region; pctx->blit = panfrost_blit; pctx->generate_mipmap = panfrost_generate_mipmap;