Module: Mesa Branch: master Commit: 5295df63ad7822e14e7dabfc107bc416271bfcdc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5295df63ad7822e14e7dabfc107bc416271bfcdc
Author: Daniel Stone <dani...@collabora.com> Date: Sat Jun 10 14:54:44 2017 +0100 egl/wayland: Use MIN2 for wl_drm version Use a slightly more explicit version cap for binding wl_drm, so we can add other interfaces with different versioning schemes later. Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- src/egl/drivers/dri2/platform_wayland.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index b3574e03b2..ee68284217 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -986,11 +986,9 @@ registry_handle_global_drm(void *data, struct wl_registry *registry, { struct dri2_egl_display *dri2_dpy = data; - if (version > 1) - version = 2; if (strcmp(interface, "wl_drm") == 0) { dri2_dpy->wl_drm = - wl_registry_bind(registry, name, &wl_drm_interface, version); + wl_registry_bind(registry, name, &wl_drm_interface, MIN2(version, 2)); wl_drm_add_listener(dri2_dpy->wl_drm, &drm_listener, dri2_dpy); } } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit