A patch applied to resolve the error GLX drawable type is not supported. https://gitlab.freedesktop.org/mesa/mesa/-/issues/5726

This commit is contained in:
Reza Jahanbakhshi 2021-12-07 17:52:28 +01:00
parent 3b86357b28
commit 5e16b5c846
3 changed files with 39 additions and 5 deletions

View File

@ -1,6 +1,6 @@
pkgbase = mesa-git pkgbase = mesa-git
pkgdesc = an open-source implementation of the OpenGL specification, git version pkgdesc = an open-source implementation of the OpenGL specification, git version
pkgver = 22.0.0_devel.147684.6e7ffa760f3 pkgver = 22.0.0_devel.147797.92d84f189c7
pkgrel = 1 pkgrel = 1
url = https://www.mesa3d.org url = https://www.mesa3d.org
arch = x86_64 arch = x86_64
@ -62,9 +62,12 @@ pkgbase = mesa-git
conflicts = mesa-libgl conflicts = mesa-libgl
source = mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git#branch=main source = mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git#branch=main
source = LICENSE source = LICENSE
source = fix-pbuffer.patch
md5sums = SKIP md5sums = SKIP
md5sums = 5c65a0fe315dd347e09b1f2826a1df5a md5sums = 5c65a0fe315dd347e09b1f2826a1df5a
md5sums = 4ced312d276450afb43d5296458b5e0e
sha512sums = SKIP sha512sums = SKIP
sha512sums = 25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2 sha512sums = 25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2
sha512sums = 921e6ef4a883e51604ec5a76bf7a3805633dc60178578faae9caeec840535cac91e4d6ce0d5826553340d8c76a1d369d92725ec89c346a270335b45ae6a4dade
pkgname = mesa-git pkgname = mesa-git

View File

@ -12,7 +12,7 @@
pkgname=mesa-git pkgname=mesa-git
pkgdesc="an open-source implementation of the OpenGL specification, git version" pkgdesc="an open-source implementation of the OpenGL specification, git version"
pkgver=22.0.0_devel.147684.6e7ffa760f3 pkgver=22.0.0_devel.147797.92d84f189c7
pkgrel=1 pkgrel=1
arch=('x86_64') arch=('x86_64')
makedepends=('git' 'python-mako' 'xorgproto' makedepends=('git' 'python-mako' 'xorgproto'
@ -26,11 +26,14 @@ conflicts=('mesa' 'opencl-mesa' 'vulkan-intel' 'vulkan-radeon' 'vulkan-mesa-laye
url="https://www.mesa3d.org" url="https://www.mesa3d.org"
license=('custom') license=('custom')
source=('mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git#branch=main' source=('mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git#branch=main'
'LICENSE') 'LICENSE'
'fix-pbuffer.patch')
md5sums=('SKIP' md5sums=('SKIP'
'5c65a0fe315dd347e09b1f2826a1df5a') '5c65a0fe315dd347e09b1f2826a1df5a'
'4ced312d276450afb43d5296458b5e0e')
sha512sums=('SKIP' sha512sums=('SKIP'
'25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2') '25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2'
'921e6ef4a883e51604ec5a76bf7a3805633dc60178578faae9caeec840535cac91e4d6ce0d5826553340d8c76a1d369d92725ec89c346a270335b45ae6a4dade')
# NINJAFLAGS is an env var used to pass commandline options to ninja # 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. # NOTE: It's your responbility to validate the value of $NINJAFLAGS. If unsure, don't set it.
@ -90,6 +93,8 @@ prepare() {
if [ -d _build ]; then if [ -d _build ]; then
rm -rf _build rm -rf _build
fi fi
patch --directory=mesa --forward --strip=1 --input="${srcdir}/fix-pbuffer.patch"
} }
build () { build () {

26
fix-pbuffer.patch Normal file
View File

@ -0,0 +1,26 @@
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);