Replace the temporary patch for GLX drawable type is not supported issue and applied the patch from https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14120
Patch application is automatic now based on the sources variable. Combined hash of patch files are added to the version string.
This commit is contained in:
parent
5e16b5c846
commit
647f4acdb5
8
.SRCINFO
8
.SRCINFO
@ -1,6 +1,6 @@
|
||||
pkgbase = mesa-git
|
||||
pkgdesc = an open-source implementation of the OpenGL specification, git version
|
||||
pkgver = 22.0.0_devel.147797.92d84f189c7
|
||||
pkgver = 22.0.0_devel.147865.cdc480585c9.72594e4e5a9fbb575c2fce1a871bb4c9
|
||||
pkgrel = 1
|
||||
url = https://www.mesa3d.org
|
||||
arch = x86_64
|
||||
@ -62,12 +62,12 @@ pkgbase = mesa-git
|
||||
conflicts = mesa-libgl
|
||||
source = mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git#branch=main
|
||||
source = LICENSE
|
||||
source = fix-pbuffer.patch
|
||||
source = 0001-glx-fix-regression-for-drawable-type-detection.patch
|
||||
md5sums = SKIP
|
||||
md5sums = 5c65a0fe315dd347e09b1f2826a1df5a
|
||||
md5sums = 4ced312d276450afb43d5296458b5e0e
|
||||
md5sums = a3e0a0d14546591186b2f40dc9fb29a3
|
||||
sha512sums = SKIP
|
||||
sha512sums = 25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2
|
||||
sha512sums = 921e6ef4a883e51604ec5a76bf7a3805633dc60178578faae9caeec840535cac91e4d6ce0d5826553340d8c76a1d369d92725ec89c346a270335b45ae6a4dade
|
||||
sha512sums = 111679f418790e1c7d82e447b800dec2db8d092643774e9f6e5063a6d6787d368d48afd78821731414d28910ebe30fd3438f9058fab2f620ee86ea33e1930780
|
||||
|
||||
pkgname = mesa-git
|
||||
|
54
0001-glx-fix-regression-for-drawable-type-detection.patch
Normal file
54
0001-glx-fix-regression-for-drawable-type-detection.patch
Normal file
@ -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
|
||||
|
31
PKGBUILD
31
PKGBUILD
@ -12,7 +12,7 @@
|
||||
|
||||
pkgname=mesa-git
|
||||
pkgdesc="an open-source implementation of the OpenGL specification, git version"
|
||||
pkgver=22.0.0_devel.147797.92d84f189c7
|
||||
pkgver=22.0.0_devel.147865.cdc480585c9.72594e4e5a9fbb575c2fce1a871bb4c9
|
||||
pkgrel=1
|
||||
arch=('x86_64')
|
||||
makedepends=('git' 'python-mako' 'xorgproto'
|
||||
@ -27,13 +27,13 @@ url="https://www.mesa3d.org"
|
||||
license=('custom')
|
||||
source=('mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git#branch=main'
|
||||
'LICENSE'
|
||||
'fix-pbuffer.patch')
|
||||
'0001-glx-fix-regression-for-drawable-type-detection.patch')
|
||||
md5sums=('SKIP'
|
||||
'5c65a0fe315dd347e09b1f2826a1df5a'
|
||||
'4ced312d276450afb43d5296458b5e0e')
|
||||
'a3e0a0d14546591186b2f40dc9fb29a3')
|
||||
sha512sums=('SKIP'
|
||||
'25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2'
|
||||
'921e6ef4a883e51604ec5a76bf7a3805633dc60178578faae9caeec840535cac91e4d6ce0d5826553340d8c76a1d369d92725ec89c346a270335b45ae6a4dade')
|
||||
'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.
|
||||
@ -83,8 +83,20 @@ esac
|
||||
|
||||
pkgver() {
|
||||
cd mesa
|
||||
local _ver
|
||||
read -r _ver <VERSION
|
||||
echo ${_ver/-/_}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
|
||||
|
||||
local _patchver
|
||||
local _patchfile
|
||||
for _patchfile in "${source[@]}"; do
|
||||
_patchfile="${_patchfile%%::*}"
|
||||
_patchfile="${_patchfile##*/}"
|
||||
[[ $_patchfile = *.patch ]] || continue
|
||||
_patchver="${_patchver}$(md5sum ${srcdir}/${_patchfile} | cut -c1-32)"
|
||||
done
|
||||
_patchver="$(echo -n $_patchver | md5sum | cut -c1-32)"
|
||||
|
||||
echo ${_ver/-/_}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD).${_patchver}
|
||||
}
|
||||
|
||||
prepare() {
|
||||
@ -94,7 +106,14 @@ prepare() {
|
||||
rm -rf _build
|
||||
fi
|
||||
|
||||
patch --directory=mesa --forward --strip=1 --input="${srcdir}/fix-pbuffer.patch"
|
||||
local _patchfile
|
||||
for _patchfile in "${source[@]}"; do
|
||||
_patchfile="${_patchfile%%::*}"
|
||||
_patchfile="${_patchfile##*/}"
|
||||
[[ $_patchfile = *.patch ]] || continue
|
||||
echo "Applying patch $_patchfile..."
|
||||
patch --directory=mesa --forward --strip=1 --input="${srcdir}/${_patchfile}"
|
||||
done
|
||||
}
|
||||
|
||||
build () {
|
||||
|
@ -1,26 +0,0 @@
|
||||
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
|
||||
index 0be684dda95..a700956f292 100644
|
||||
--- a/src/glx/dri_common.c
|
||||
+++ b/src/glx/dri_common.c
|
||||
@@ -390,20 +390,7 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable)
|
||||
* case which use the same XID for both X pixmap and GLX drawable.
|
||||
*/
|
||||
|
||||
- /* 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");
|
||||
- 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.
|
||||
- */
|
||||
- type = GLX_PBUFFER_BIT | GLX_WINDOW_BIT;
|
||||
- }
|
||||
-
|
||||
+ type = GLX_PBUFFER_BIT | GLX_WINDOW_BIT;
|
||||
pdraw = psc->driScreen->createDrawable(psc, glxDrawable, glxDrawable,
|
||||
type, config);
|
||||
|
Loading…
Reference in New Issue
Block a user