freedreno: delete pipe_context surface hooks

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40462>
This commit is contained in:
Mike Blumenkrantz 2026-03-16 11:07:06 -04:00 committed by Marge Bot
parent 1af551ed9f
commit 0cafd100fa
4 changed files with 0 additions and 70 deletions

View file

@ -27,7 +27,6 @@
#include "freedreno_query_hw.h"
#include "freedreno_resource.h"
#include "freedreno_screen.h"
#include "freedreno_surface.h"
#include "freedreno_util.h"
#include <errno.h>
@ -1840,8 +1839,6 @@ fd_resource_context_init(struct pipe_context *pctx)
pctx->texture_unmap = u_transfer_helper_transfer_unmap;
pctx->buffer_subdata = u_default_buffer_subdata;
pctx->texture_subdata = u_default_texture_subdata;
pctx->create_surface = fd_create_surface;
pctx->surface_destroy = fd_surface_destroy;
pctx->resource_copy_region = fd_resource_copy_region;
pctx->blit = fd_blit_pipe;
pctx->flush_resource = fd_flush_resource;

View file

@ -1,46 +0,0 @@
/*
* Copyright © 2012 Rob Clark <robclark@freedesktop.org>
* SPDX-License-Identifier: MIT
*
* Authors:
* Rob Clark <robclark@freedesktop.org>
*/
#include "freedreno_surface.h"
#include "freedreno_resource.h"
#include "freedreno_util.h"
#include "util/u_inlines.h"
#include "util/u_memory.h"
struct pipe_surface *
fd_create_surface(struct pipe_context *pctx, struct pipe_resource *ptex,
const struct pipe_surface *surf_tmpl)
{
struct pipe_surface *psurf = CALLOC_STRUCT(pipe_surface);
if (!psurf)
return NULL;
unsigned level = surf_tmpl->level;
pipe_reference_init(&psurf->reference, 1);
pipe_resource_reference(&psurf->texture, ptex);
psurf->context = pctx;
psurf->format = surf_tmpl->format;
psurf->nr_samples = surf_tmpl->nr_samples;
psurf->level = level;
psurf->first_layer = surf_tmpl->first_layer;
psurf->last_layer = surf_tmpl->last_layer;
return psurf;
}
void
fd_surface_destroy(struct pipe_context *pctx, struct pipe_surface *psurf)
{
pipe_resource_reference(&psurf->texture, NULL);
FREE(psurf);
}

View file

@ -1,19 +0,0 @@
/*
* Copyright © 2012 Rob Clark <robclark@freedesktop.org>
* SPDX-License-Identifier: MIT
*
* Authors:
* Rob Clark <robclark@freedesktop.org>
*/
#ifndef FREEDRENO_SURFACE_H_
#define FREEDRENO_SURFACE_H_
#include "pipe/p_state.h"
struct pipe_surface *fd_create_surface(struct pipe_context *pctx,
struct pipe_resource *ptex,
const struct pipe_surface *surf_tmpl);
void fd_surface_destroy(struct pipe_context *pctx, struct pipe_surface *psurf);
#endif /* FREEDRENO_SURFACE_H_ */

View file

@ -35,8 +35,6 @@ files_libfreedreno = files(
'freedreno_screen.h',
'freedreno_state.c',
'freedreno_state.h',
'freedreno_surface.c',
'freedreno_surface.h',
'freedreno_texture.c',
'freedreno_texture.h',
'freedreno_util.c',