diff options
author | Lone_Wolf | 2021-12-08 15:15:36 +0100 |
---|---|---|
committer | Lone_Wolf | 2021-12-08 15:15:36 +0100 |
commit | 470b2289fb63e5d0751ab27df2cea4e5fa5fb4bc (patch) | |
tree | 2fa8d1ecbccb92de2c1ec542ec7b613a24fd8634 | |
parent | 45726b16e1722fcfd4a4f16531413b6b4c3bbc48 (diff) | |
download | aur-470b2289fb63e5d0751ab27df2cea4e5fa5fb4bc.tar.gz |
patch applied from https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14120
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | 0001-glx-fix-regression-for-drawable-type-detection.patch | 54 | ||||
-rw-r--r-- | PKGBUILD | 12 |
3 files changed, 67 insertions, 6 deletions
@@ -1,7 +1,7 @@ pkgbase = lib32-mesa-minimal-git pkgdesc = an open-source implementation of the OpenGL specification, git version - pkgver = 21.3.0_devel.145043.1a6c01a61b1 - pkgrel = 1 + pkgver = 22.0.0_devel.147864.420170fabc1 + pkgrel = 2 url = https://www.mesa3d.org arch = x86_64 license = custom @@ -52,11 +52,14 @@ pkgbase = lib32-mesa-minimal-git source = mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git source = LICENSE source = llvm32.native + source = 0001-glx-fix-regression-for-drawable-type-detection.patch md5sums = SKIP md5sums = 5c65a0fe315dd347e09b1f2826a1df5a md5sums = 6b4a19068a323d7f90a3d3cd315ed1f9 + md5sums = a3e0a0d14546591186b2f40dc9fb29a3 sha512sums = SKIP sha512sums = 25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2 sha512sums = c7dbb390ebde291c517a854fcbe5166c24e95206f768cc9458ca896b2253aabd6df12a7becf831998721b2d622d0c02afdd8d519e77dea8e1d6807b35f0166fe + sha512sums = 111679f418790e1c7d82e447b800dec2db8d092643774e9f6e5063a6d6787d368d48afd78821731414d28910ebe30fd3438f9058fab2f620ee86ea33e1930780 pkgname = lib32-mesa-minimal-git diff --git a/0001-glx-fix-regression-for-drawable-type-detection.patch b/0001-glx-fix-regression-for-drawable-type-detection.patch new file mode 100644 index 000000000000..0ff1c812a05d --- /dev/null +++ b/0001-glx-fix-regression-for-drawable-type-detection.patch @@ -0,0 +1,54 @@ +From e3ef7eedc94fe4eb2af2f79324bfaf4e56b37961 Mon Sep 17 00:00:00 2001 +From: Qiang Yu <yuq825@gmail.com> +Date: Wed, 8 Dec 2021 10:57:45 +0800 +Subject: [PATCH] glx: fix regression for drawable type detection + +Newer version of XServer supporting GLX_DRAWABLE_TYPE query also +support query with raw X11 window ID besides GLXWindow ID. So we +should not limit the suppported type to GLXPbuffer when query +success. + +Otherwise can't start GLX application on newer XServer with: + + libGL error: GLX drawable type is not supported + libGL error: GLX drawable type is not supported + X Error of failed request: GLXBadContext + Major opcode of failed request: 149 (GLX) + Minor opcode of failed request: 5 (X_GLXMakeCurrent) + Serial number of failed request: 35 + Current serial number in output stream: 35 + +Fixes: 6625c960c58 ("glx: check drawable type before create drawble") + +Signed-off-by: Qiang Yu <yuq825@gmail.com> +--- + src/glx/dri_common.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c +index 0be684dda95..27e78fb3799 100644 +--- a/src/glx/dri_common.c ++++ b/src/glx/dri_common.c +@@ -392,15 +392,13 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable) + + /* Infer the GLX drawable type. */ + if (__glXGetDrawableAttribute(dpy, glxDrawable, GLX_DRAWABLE_TYPE, &type)) { +- if (type != GLX_PBUFFER_BIT) { +- ErrorMessageF("GLX drawable type is not supported\n"); ++ /* Xserver may support query with raw X11 window. */ ++ if (type == GLX_PIXMAP_BIT) { ++ ErrorMessageF("GLXPixmap drawable type is not supported\n"); + return NULL; + } + } else { +- /* Xserver may not implement GLX_DRAWABLE_TYPE query yet, or glxDrawable +- * is a X window. Assume it's a GLXPbuffer in former case, because we don't +- * know GLXPixmap and GLXWindow's X drawable ID anyway. +- */ ++ /* Xserver may not implement GLX_DRAWABLE_TYPE query yet. */ + type = GLX_PBUFFER_BIT | GLX_WINDOW_BIT; + } + +-- +2.34.1 + @@ -12,8 +12,8 @@ pkgname=lib32-mesa-minimal-git pkgdesc="an open-source implementation of the OpenGL specification, git version" -pkgver=21.3.0_devel.145043.1a6c01a61b1 -pkgrel=1 +pkgver=22.0.0_devel.147864.420170fabc1 +pkgrel=2 arch=('x86_64') makedepends=('python-mako' 'lib32-libxml2' 'lib32-libx11' 'xorgproto' 'lib32-gcc-libs' 'lib32-libelf' 'git' 'lib32-libglvnd' @@ -28,16 +28,17 @@ license=('custom') source=('mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git' 'LICENSE' 'llvm32.native' + '0001-glx-fix-regression-for-drawable-type-detection.patch' ) md5sums=('SKIP' '5c65a0fe315dd347e09b1f2826a1df5a' '6b4a19068a323d7f90a3d3cd315ed1f9' -) + 'a3e0a0d14546591186b2f40dc9fb29a3') sha512sums=('SKIP' '25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2' 'c7dbb390ebde291c517a854fcbe5166c24e95206f768cc9458ca896b2253aabd6df12a7becf831998721b2d622d0c02afdd8d519e77dea8e1d6807b35f0166fe' -) + '111679f418790e1c7d82e447b800dec2db8d092643774e9f6e5063a6d6787d368d48afd78821731414d28910ebe30fd3438f9058fab2f620ee86ea33e1930780') # NINJAFLAGS is an env var used to pass commandline options to ninja # NOTE: It's your responbility to validate the value of $NINJAFLAGS. If unsure, don't set it. @@ -54,6 +55,9 @@ prepare() { if [ -d _build ]; then rm -rf _build fi + + # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14120 + patch --directory=mesa --forward --strip=1 --input="${srcdir}"/0001-glx-fix-regression-for-drawable-type-detection.patch } build () { |