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);
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)
{