Date: Friday, June 3, 2016 @ 10:03:28 Author: lcarlier Revision: 268864
upgpkg: xorg-server 1.18.3-2 Fix glamor failling to initialize with mesa git e8b38ca Added: xorg-server/trunk/call-eglBindAPI-after-eglInitialize.patch Modified: xorg-server/trunk/PKGBUILD -------------------------------------------+ PKGBUILD | 14 ++++++-- call-eglBindAPI-after-eglInitialize.patch | 48 ++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-06-03 07:31:30 UTC (rev 268863) +++ PKGBUILD 2016-06-03 08:03:28 UTC (rev 268864) @@ -5,7 +5,7 @@ pkgbase=xorg-server pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-xwayland' 'xorg-server-common' 'xorg-server-devel') pkgver=1.18.3 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') license=('custom') groups=('xorg') @@ -19,7 +19,8 @@ 'libxshmfence' 'libunwind') source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2{,.sig} xvfb-run - xvfb-run.1) + xvfb-run.1 + call-eglBindAPI-after-eglInitialize.patch) validpgpkeys=('7B27A3F1A6E18CD9588B4AE8310180050905E40C' 'C383B778255613DFDB409D91DB221A6900000011' 'DD38563A8A8224537D1F90E45B8A2D50A0ECD0D3') @@ -26,8 +27,15 @@ sha256sums=('ea739c22517cdbe2b5f7c0a5fd05fe8a10ac0629003e71c0c7862f4bb60142cd' 'SKIP' 'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9' - '2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776') + '2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776' + '45fdc2a1241d458756c41a93c01846e04cc75f3c75f81f48b61533d08280918d') +prepare() { + cd "${pkgbase}-${pkgver}" + + patch -Np1 -i ../call-eglBindAPI-after-eglInitialize.patch +} + build() { cd "${pkgbase}-${pkgver}" ./configure --prefix=/usr \ Added: call-eglBindAPI-after-eglInitialize.patch =================================================================== --- call-eglBindAPI-after-eglInitialize.patch (rev 0) +++ call-eglBindAPI-after-eglInitialize.patch 2016-06-03 08:03:28 UTC (rev 268864) @@ -0,0 +1,48 @@ +diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c +index 4bcd3ce..16a20a7 100644 +--- a/glamor/glamor_egl.c ++++ b/glamor/glamor_egl.c +@@ -770,11 +770,6 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) + + glamor_egl->has_gem = glamor_egl_check_has_gem(fd); + +-#ifndef GLAMOR_GLES2 +- eglBindAPI(EGL_OPENGL_API); +-#else +- eglBindAPI(EGL_OPENGL_ES_API); +-#endif + if (!eglInitialize + (glamor_egl->display, &glamor_egl->major, &glamor_egl->minor)) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, "eglInitialize() failed\n"); +@@ -782,6 +777,12 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd) + goto error; + } + ++#ifndef GLAMOR_GLES2 ++ eglBindAPI(EGL_OPENGL_API); ++#else ++ eglBindAPI(EGL_OPENGL_ES_API); ++#endif ++ + version = eglQueryString(glamor_egl->display, EGL_VERSION); + xf86Msg(X_INFO, "%s: EGL version %s:\n", glamor_name, version); + +diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c +index ad66cf6..73ccd71 100644 +--- a/hw/xwayland/xwayland-glamor.c ++++ b/hw/xwayland/xwayland-glamor.c +@@ -298,12 +298,13 @@ xwl_drm_init_egl(struct xwl_screen *xwl_screen) + return; + } + +- eglBindAPI(EGL_OPENGL_API); + if (!eglInitialize(xwl_screen->egl_display, &major, &minor)) { + ErrorF("eglInitialize() failed\n"); + return; + } + ++ eglBindAPI(EGL_OPENGL_API); ++ + version = eglQueryString(xwl_screen->egl_display, EGL_VERSION); + ErrorF("glamor: EGL version %s:\n", version); +