[Mesa-dev] [PATCH] egl/x11: Send invalidate to the driver on dri2_copy_region

Michel Dänzer michel at daenzer.net
Thu Apr 26 08:30:40 UTC 2018


On 2018-04-25 07:49 PM, Deepak Rawat wrote:
> Similar to what is done in dri2_x11_swap_buffers_msc send invalidate
> to the driver because egl/X11 is not watching for for server's
> invalidate events. The dri2_copy_region path is trigerred when
> server supports DRI2 version minor 1.
> 
> Tested with piglit egl tests for regression.
> 
> Cc: <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Deepak Rawat <drawat at vmware.com>
> Reviewed-by: Thomas Hellstrom <thellstrom at vmware.com>
> ---
>  src/egl/drivers/dri2/platform_x11.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
> index 6c287b4d06..e99434ea3a 100644
> --- a/src/egl/drivers/dri2/platform_x11.c
> +++ b/src/egl/drivers/dri2/platform_x11.c
> @@ -841,6 +841,13 @@ dri2_copy_region(_EGLDriver *drv, _EGLDisplay *disp,
>  					   render_attachment);
>     free(xcb_dri2_copy_region_reply(dri2_dpy->conn, cookie, NULL));
>  
> +   /*
> +    * Just like as done in dri2_x11_swap_buffers_msc we aren't watching for
> +    * server's invalidate events, so just send invalidate to driver.
> +    */
> +   if (dri2_dpy->flush->base.version >= 3 && dri2_dpy->flush->invalidate)
> +      dri2_dpy->flush->invalidate(dri2_surf->dri_drawable);
> +
>     return EGL_TRUE;
>  }

Why is invalidate needed after copy_region? That's surprising, I suspect
it just papers over the real problem.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list