renderer: add renderer cleanup interface

this just tears down the EGL stuff for now
macos/master
Dave Airlie 10 years ago
parent 9521a43f90
commit 3ef1317b81
  1. 9
      src/virglrenderer.c
  2. 2
      src/virglrenderer.h

@ -253,6 +253,15 @@ void virgl_renderer_poll(void)
vrend_renderer_check_fences();
}
void virgl_renderer_cleanup(void *cookie)
{
if (use_egl_context) {
virgl_egl_destroy(egl_info);
egl_info = NULL;
use_egl_context = 0;
}
}
int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks *cbs)
{
if (!cookie || !cbs)

@ -146,6 +146,8 @@ struct virgl_renderer_resource_info {
VIRGL_EXPORT int virgl_renderer_resource_get_info(int res_handle,
struct virgl_renderer_resource_info *info);
VIRGL_EXPORT void virgl_renderer_cleanup(void *cookie);
/* reset the rendererer - destroy all contexts and resource */
VIRGL_EXPORT void virgl_renderer_reset(void);
#endif

Loading…
Cancel
Save