summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.c
diff options
context:
space:
mode:
authorSarah Sharp <[email protected]>2014-05-06 12:10:57 -0700
committerChad Versace <[email protected]>2014-05-20 15:19:48 -0700
commitc524f3ef9155caba6cd4f9fc72485426b1da76fd (patch)
tree38b7c54d136949079e9c82477b2aa1d374ab7b99 /src/egl/drivers/dri2/egl_dri2.c
parentf6e50994e12f1135748a51bf6380dc04bd5f4907 (diff)
egl: Add EGL_CHROMIUM_sync_control extension.
Chromium defined a new GL extension (that isn't registered with Khronos). We need to add an EGL extension for it, so we can migrate ChromeOS on Intel systems to use EGL instead of GLX. http://git.chromium.org/gitweb/?p=chromium/src/third_party/khronos.git;a=commitdiff;h=27cbfdab35c601f70aa150581ad1448d0401f447 The EGL_CHROMIUM_sync_control extension is similar to the GLX extension OML_sync_control, but only defines one function, eglGetSyncValuesCHROMIUM, which is equivalent to glXGetSyncValuesOML. http://www.opengl.org/registry/specs/OML/glx_sync_control.txt Signed-off-by: Sarah Sharp <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: Jamey Sharp <[email protected]> Cc: Ian Romanick <[email protected]> Cc: Stéphane Marchesin <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index a5f71edb984..f7f2da254e2 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1389,6 +1389,15 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *ctx,
}
#endif
+static EGLBoolean
+dri2_get_sync_values_chromium(_EGLDisplay *dpy, _EGLSurface *surf,
+ EGLuint64KHR *ust, EGLuint64KHR *msc,
+ EGLuint64KHR *sbc)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ return dri2_dpy->vtbl->get_sync_values(dpy, surf, ust, msc, sbc);
+}
+
/**
* Set the error code after a call to
* dri2_egl_image::dri_image::createImageFromTexture.
@@ -2182,6 +2191,7 @@ _eglBuiltInDriverDRI2(const char *args)
dri2_drv->base.API.UnbindWaylandDisplayWL = dri2_unbind_wayland_display_wl;
dri2_drv->base.API.QueryWaylandBufferWL = dri2_query_wayland_buffer_wl;
#endif
+ dri2_drv->base.API.GetSyncValuesCHROMIUM = dri2_get_sync_values_chromium;
dri2_drv->base.Name = "DRI2";
dri2_drv->base.Unload = dri2_unload;