[PATCH xserver 11/11] glamor: Stop holding on to the EGLImage for textures.

Michel Dänzer michel at daenzer.net
Mon Nov 9 22:56:56 PST 2015


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 <eric at anholt.net>

[...]

> @@ -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


More information about the xorg-devel mailing list