xorg-server: added mesa-10 compat patch.
This commit is contained in:
parent
c8cba5f266
commit
429d8c904d
|
@ -0,0 +1,68 @@
|
||||||
|
From 7ecfab47eb221dbb996ea6c033348b8eceaeb893 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eric Anholt <eric@anholt.net>
|
||||||
|
Date: Tue, 22 Oct 2013 21:22:04 +0000
|
||||||
|
Subject: glx: Add support for the new DRI loader entrypoint.
|
||||||
|
|
||||||
|
This is going to be exposed (and not the old entrypoint) for some DRI
|
||||||
|
drivers once the megadrivers series lands, and the plan is to
|
||||||
|
eventually transition all drivers to that. Hopefully this is
|
||||||
|
unobtrusive enough to merge to stable X servers so that they can be
|
||||||
|
compatible with new Mesa versions.
|
||||||
|
|
||||||
|
v2: typo fix in the comment
|
||||||
|
|
||||||
|
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||||
|
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||||
|
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||||
|
---
|
||||||
|
diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c
|
||||||
|
index b027f24..0ab3e30 100644
|
||||||
|
--- glx/glxdricommon.c
|
||||||
|
+++ glx/glxdricommon.c
|
||||||
|
@@ -211,6 +211,14 @@ glxConvertConfigs(const __DRIcoreExtension * core,
|
||||||
|
|
||||||
|
static const char dri_driver_path[] = DRI_DRIVER_PATH;
|
||||||
|
|
||||||
|
+/* Temporary define to allow building without a dri_interface.h from
|
||||||
|
+ * updated Mesa. Some day when we don't care about Mesa that old any
|
||||||
|
+ * more this can be removed.
|
||||||
|
+ */
|
||||||
|
+#ifndef __DRI_DRIVER_GET_EXTENSIONS
|
||||||
|
+#define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions"
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
void *
|
||||||
|
glxProbeDriver(const char *driverName,
|
||||||
|
void **coreExt, const char *coreName, int coreVersion,
|
||||||
|
@@ -219,7 +227,8 @@ glxProbeDriver(const char *driverName,
|
||||||
|
int i;
|
||||||
|
void *driver;
|
||||||
|
char filename[PATH_MAX];
|
||||||
|
- const __DRIextension **extensions;
|
||||||
|
+ char *get_extensions_name;
|
||||||
|
+ const __DRIextension **extensions = NULL;
|
||||||
|
|
||||||
|
snprintf(filename, sizeof filename, "%s/%s_dri.so",
|
||||||
|
dri_driver_path, driverName);
|
||||||
|
@@ -231,7 +240,18 @@ glxProbeDriver(const char *driverName,
|
||||||
|
goto cleanup_failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
- extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
|
||||||
|
+ if (asprintf(&get_extensions_name, "%s_%s",
|
||||||
|
+ __DRI_DRIVER_GET_EXTENSIONS, driverName) != -1) {
|
||||||
|
+ const __DRIextension **(*get_extensions)(void);
|
||||||
|
+
|
||||||
|
+ get_extensions = dlsym(driver, get_extensions_name);
|
||||||
|
+ if (get_extensions)
|
||||||
|
+ extensions = get_extensions();
|
||||||
|
+ free(get_extensions_name);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (!extensions)
|
||||||
|
+ extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
|
||||||
|
if (extensions == NULL) {
|
||||||
|
LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
|
||||||
|
driverName, dlerror());
|
||||||
|
--
|
||||||
|
cgit v0.9.0.2-2-gbebe
|
|
@ -1,7 +1,7 @@
|
||||||
# Template build file for 'xorg-server'.
|
# Template build file for 'xorg-server'.
|
||||||
pkgname=xorg-server
|
pkgname=xorg-server
|
||||||
version=1.14.4
|
version=1.14.4
|
||||||
revision=1
|
revision=2
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--enable-ipv6 --enable-xcsecurity --enable-record
|
configure_args="--enable-ipv6 --enable-xcsecurity --enable-record
|
||||||
--enable-xnest --enable-xephyr --enable-composite --enable-xvfb
|
--enable-xnest --enable-xephyr --enable-composite --enable-xvfb
|
||||||
|
@ -20,7 +20,7 @@ distfiles="${XORG_SITE}/xserver/${pkgname}-${version}.tar.bz2"
|
||||||
checksum=608ccfaafb845f6e559884a30f946d365209172416710d687b190e9e1ff65dc3
|
checksum=608ccfaafb845f6e559884a30f946d365209172416710d687b190e9e1ff65dc3
|
||||||
|
|
||||||
hostmakedepends="pkg-config perl flex"
|
hostmakedepends="pkg-config perl flex"
|
||||||
makedepends="damageproto inputproto>=2.2 glproto>=1.4.15 xproto>=7.0.22
|
makedepends="libfl-devel damageproto inputproto>=2.2 glproto>=1.4.15 xproto>=7.0.22
|
||||||
dri2proto>=2.1 xf86driproto randrproto videoproto compositeproto scrnsaverproto
|
dri2proto>=2.1 xf86driproto randrproto videoproto compositeproto scrnsaverproto
|
||||||
resourceproto>=1.2.0 xineramaproto xcmiscproto bigreqsproto libudev-devel>=183
|
resourceproto>=1.2.0 xineramaproto xcmiscproto bigreqsproto libudev-devel>=183
|
||||||
openssl-devel libX11-devel libXext-devel libdmx-devel libpciaccess-devel
|
openssl-devel libX11-devel libXext-devel libdmx-devel libpciaccess-devel
|
||||||
|
@ -28,10 +28,6 @@ makedepends="damageproto inputproto>=2.2 glproto>=1.4.15 xproto>=7.0.22
|
||||||
libXaw-devel libdrm-devel libXtst-devel libXres-devel libxkbui-devel
|
libXaw-devel libdrm-devel libXtst-devel libXres-devel libxkbui-devel
|
||||||
libxkbfile-devel libXxf86dga-devel libXv-devel pixman-devel xkeyboard-config"
|
libxkbfile-devel libXxf86dga-devel libXv-devel pixman-devel xkeyboard-config"
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
|
||||||
makedepends+=" libfl-devel"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Package build options
|
# Package build options
|
||||||
build_options="opengl"
|
build_options="opengl"
|
||||||
desc_option_opengl="Enable support for OpenGL/GLX and DRI"
|
desc_option_opengl="Enable support for OpenGL/GLX and DRI"
|
||||||
|
@ -43,7 +39,7 @@ fi
|
||||||
|
|
||||||
if [ "$build_option_opengl" ]; then
|
if [ "$build_option_opengl" ]; then
|
||||||
configure_args+=" --enable-dri --enable-dri2 --enable-glx-tls --enable-glx"
|
configure_args+=" --enable-dri --enable-dri2 --enable-glx-tls --enable-glx"
|
||||||
makedepends+=" MesaLib-devel>=9.2.1_2"
|
makedepends+=" MesaLib-devel>=10.0"
|
||||||
else
|
else
|
||||||
configure_args+=" --disable-dri --disable-dri2 --disable-glx"
|
configure_args+=" --disable-dri --disable-dri2 --disable-glx"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue