egl/wayland: don't modify the vtbl if an extension is not available
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 15 May 2017 15:14:16 +0000 (16:14 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 29 May 2017 15:59:14 +0000 (16:59 +0100)
With previous commit we'll error out should one be using the extension
when it's not available. Thus we no longer need to modify the vtbl.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/egl/drivers/dri2/platform_wayland.c

index 174cfeeb7e915a486e4196c489f8d19063736695..0014dd4a7931064cbc152960763285a04577aab9 100644 (file)
@@ -1270,12 +1270,9 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp)
     * because the buffer of the EGLImage has likely a tiling mode the server
     * gpu won't support. These is no way to check for now. Thus do not support the
     * extension */
-   if (!dri2_dpy->is_different_gpu) {
+   if (!dri2_dpy->is_different_gpu)
       disp->Extensions.WL_create_wayland_buffer_from_image = EGL_TRUE;
-   } else {
-      dri2_wl_display_vtbl.create_wayland_buffer_from_image =
-         dri2_fallback_create_wayland_buffer_from_image;
-   }
+
    disp->Extensions.EXT_buffer_age = EGL_TRUE;
 
    disp->Extensions.EXT_swap_buffers_with_damage = EGL_TRUE;