zink: break out surface destroy function into a screen function
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9665>
This commit is contained in:
parent
c56fe22064
commit
a9ab5b4f16
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue