On 07.11.2015 05:52, Eric Anholt wrote:
> We used to cache the EGLImage to be able to return an fd again faster,
> but now we keep the gbm bo on hand to do so.
>
> One concern might be if the early destruction of the EGLImage meant
> orphaning. However, the EGL_KHR_image_base spec text says:
>
> Once destroyed, <image> may not be used to create any additional
> EGLImage target resources within any client API contexts, although
> existing EGLImage siblings may continue to be used.
>
> and, even more clearly in the issues section:
>
> Note that the EGLImage source and any EGLImage target resources
> will still be EGLImage siblings, even if the EGLImage object is
> destroyed by a call to DestroyImageKHR.
>
> Signed-off-by: Eric Anholt <[email protected]>
[...]
> @@ -591,8 +564,10 @@ glamor_egl_close_screen(ScreenPtr screen)
> screen_pixmap = screen->GetScreenPixmap(screen);
> pixmap_priv = glamor_get_pixmap_private(screen_pixmap);
>
> - eglDestroyImageKHR(glamor_egl->display, pixmap_priv->image);
> - pixmap_priv->image = NULL;
> + if (pixmap_priv->gbm) {
> + gbm_bo_destroy(pixmap_priv->gbm);
> + pixmap_priv->gbm = NULL;
> + }
Should this pixmap_priv->gbm block be added in patch 10?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel