From e013ce8d0d91f6558af50f285e6a96ab697ec90c Mon Sep 17 00:00:00 2001 From: Zhongmin Wu Date: Fri, 15 Sep 2017 18:32:42 +0100 Subject: egl: Allow creation of per surface out fence Add plumbing to allow creation of per display surface out fence. This can be used to implement explicit sync. One user of which is Android - which will be addressed with next commit. Signed-off-by: Zhongmin Wu Signed-off-by: Yogesh Marathe Reviewed-by: Emil Velikov Reviewed-by: Tomasz Figa [Emil Velikov: reorder so there's no intermetent regressions, split] Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/egl_dri2.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/egl/drivers/dri2/egl_dri2.h') diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 4a52b490a87..10a41518172 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -327,6 +327,8 @@ struct dri2_egl_surface __DRIimage *front; unsigned int visual; #endif + int out_fence_fd; + EGLBoolean enable_out_fence; }; struct dri2_egl_config @@ -462,4 +464,11 @@ dri2_egl_surface_alloc_local_buffer(struct dri2_egl_surface *dri2_surf, void dri2_egl_surface_free_local_buffers(struct dri2_egl_surface *dri2_surf); +EGLBoolean +dri2_init_surface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type, + _EGLConfig *conf, const EGLint *attrib_list, EGLBoolean enable_out_fence); + +void +dri2_fini_surface(_EGLSurface *surf); + #endif /* EGL_DRI2_INCLUDED */ -- cgit v1.2.3