From bf20076bafcf0809529ae470fb12af5eae12b33d Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 28 Jan 2014 17:03:03 -0800 Subject: egl/dri2: Dispatch eglCreatePbufferSurface by display, not driver Add dri2_egl_display_vtbl::create_pbuffer_surface, set it for each platform, and let egl_dri2 dispatch eglCreatePbufferSurface to that. This prepares for the EGL platform extensions. Reviewed-by: Ian Romanick Signed-off-by: Chad Versace --- src/egl/drivers/dri2/egl_dri2.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/egl/drivers/dri2/egl_dri2.c') diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 0c8b4ff45eb..18b1c713982 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1033,6 +1033,14 @@ dri2_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *dpy, attrib_list); } +static _EGLSurface* +dri2_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *dpy, + _EGLConfig *conf, const EGLint *attrib_list) +{ + struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy); + return dri2_dpy->vtbl->create_pbuffer_surface(drv, dpy, conf, attrib_list); +} + static EGLBoolean dri2_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint interval) @@ -2078,6 +2086,7 @@ _eglBuiltInDriverDRI2(const char *args) dri2_drv->base.API.MakeCurrent = dri2_make_current; dri2_drv->base.API.CreateWindowSurface = dri2_create_window_surface; dri2_drv->base.API.CreatePixmapSurface = dri2_create_pixmap_surface; + dri2_drv->base.API.CreatePbufferSurface = dri2_create_pbuffer_surface; dri2_drv->base.API.GetProcAddress = dri2_get_proc_address; dri2_drv->base.API.WaitClient = dri2_wait_client; dri2_drv->base.API.WaitNative = dri2_wait_native; -- cgit v1.2.3