aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-10-24 08:15:59 +0200
committermarha <marha@users.sourceforge.net>2013-10-24 08:15:59 +0200
commit285b1bd8933288fc56259cfb3de61207c8e35d9e (patch)
tree2107aaa7f683f16a9a1a73e5f6f2d7ba53710f32 /xorg-server/glx
parentc665b6e88274f8bc603b0f14f92bf09d2023bd4d (diff)
parent4eb0b643ad978d94837e2d587a5d4358f974a25c (diff)
downloadvcxsrv-285b1bd8933288fc56259cfb3de61207c8e35d9e.tar.gz
vcxsrv-285b1bd8933288fc56259cfb3de61207c8e35d9e.tar.bz2
vcxsrv-285b1bd8933288fc56259cfb3de61207c8e35d9e.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa xserver git update 24 oct 2013 Conflicts: xorg-server/glx/glxdricommon.c
Diffstat (limited to 'xorg-server/glx')
-rwxr-xr-x[-rw-r--r--]xorg-server/glx/glxdricommon.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/xorg-server/glx/glxdricommon.c b/xorg-server/glx/glxdricommon.c
index 79922154a..50e6419a2 100644..100755
--- a/xorg-server/glx/glxdricommon.c
+++ b/xorg-server/glx/glxdricommon.c
@@ -224,6 +224,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,
@@ -232,7 +240,8 @@ glxProbeDriver(const char *driverName,
int i;
void *driver;
char filename[PATH_MAX];
- const __DRIextension **extensions;
+ char *get_extensions_name;
+ const __DRIextension **extensions = NULL;
#ifdef _MSC_VER
#define DLLNAME "%s%s_dri.dll"
@@ -252,10 +261,25 @@ glxProbeDriver(const char *driverName,
goto cleanup_failure;
}
+ if (asprintf(&get_extensions_name, "%s_%s",
+ __DRI_DRIVER_GET_EXTENSIONS, driverName) != -1) {
+ const __DRIextension **(*get_extensions)(void);
+
+#ifdef _MSC_VER
+ get_extensions = (const __DRIextension **(*get_extensions)(void))GetProcAddress(driver, get_extensions_name);
+#else
+ get_extensions = dlsym(driver, get_extensions_name);
+#endif
+ if (get_extensions)
+ extensions = get_extensions();
+ free(get_extensions_name);
+ }
+
+ if (!extensions)
#ifdef _MSC_VER
- extensions = (const __DRIextension **)GetProcAddress(driver, __DRI_DRIVER_EXTENSIONS);
+ extensions = (const __DRIextension **)GetProcAddress(driver, __DRI_DRIVER_EXTENSIONS);
#else
- extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
+ extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
#endif
if (extensions == NULL) {
LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
@@ -286,7 +310,7 @@ glxProbeDriver(const char *driverName,
cleanup_failure:
if (driver)
#ifdef _MSC_VER
- FreeLibrary(driver);
+ FreeLibrary(driver);
#else
dlclose(driver);
#endif