diff --git a/src/gallium/drivers/zink/zink_surface.c b/src/gallium/drivers/zink/zink_surface.c index 2e3309f43df..2f11bd05e62 100644 --- a/src/gallium/drivers/zink/zink_surface.c +++ b/src/gallium/drivers/zink/zink_surface.c @@ -177,11 +177,9 @@ zink_create_surface(struct pipe_context *pctx, return zink_get_surface(zink_context(pctx), pres, templ, &ivci); } -static void -zink_surface_destroy(struct pipe_context *pctx, - struct pipe_surface *psurface) +void +zink_destroy_surface(struct zink_screen *screen, struct pipe_surface *psurface) { - struct zink_screen *screen = zink_screen(pctx->screen); struct zink_surface *surface = zink_surface(psurface); simple_mtx_lock(&screen->surface_mtx); struct hash_entry *he = _mesa_hash_table_search_pre_hashed(&screen->surface_cache, surface->hash, &surface->ivci); @@ -193,6 +191,13 @@ zink_surface_destroy(struct pipe_context *pctx, FREE(surface); } +static void +zink_surface_destroy(struct pipe_context *pctx, + struct pipe_surface *psurface) +{ + zink_destroy_surface(zink_screen(pctx->screen), psurface); +} + void zink_context_surface_init(struct pipe_context *context) { diff --git a/src/gallium/drivers/zink/zink_surface.h b/src/gallium/drivers/zink/zink_surface.h index afed99d8143..61bc9c94fc4 100644 --- a/src/gallium/drivers/zink/zink_surface.h +++ b/src/gallium/drivers/zink/zink_surface.h @@ -44,6 +44,9 @@ zink_surface(struct pipe_surface *pipe) return (struct zink_surface *)pipe; } +void +zink_destroy_surface(struct zink_screen *screen, struct pipe_surface *psurface); + void zink_context_surface_init(struct pipe_context *context);