aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxdri.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-15 22:49:12 +0000
committermarha <marha@users.sourceforge.net>2011-03-15 22:49:12 +0000
commit8285341e69cd721c6871b553e45437c767200545 (patch)
tree551508bddc84d1c16c15d961878cd2d2f6edb365 /xorg-server/glx/glxdri.c
parent52b8618bfdaa4725fc403f50fe682d02e7f16435 (diff)
parent5e633abcca598289d0423d89bb400b41e6417259 (diff)
downloadvcxsrv-8285341e69cd721c6871b553e45437c767200545.tar.gz
vcxsrv-8285341e69cd721c6871b553e45437c767200545.tar.bz2
vcxsrv-8285341e69cd721c6871b553e45437c767200545.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/glx/glxdri.c')
-rw-r--r--xorg-server/glx/glxdri.c44
1 files changed, 6 insertions, 38 deletions
diff --git a/xorg-server/glx/glxdri.c b/xorg-server/glx/glxdri.c
index faa0cb978..2c0406d70 100644
--- a/xorg-server/glx/glxdri.c
+++ b/xorg-server/glx/glxdri.c
@@ -861,8 +861,6 @@ static const __DRIextension *loader_extensions[] = {
-static const char dri_driver_path[] = DRI_DRIVER_PATH;
-
static Bool
glxDRIEnterVT (int index, int flags)
{
@@ -974,13 +972,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
drm_handle_t hFB;
int junk;
__GLXDRIscreen *screen;
- char filename[128];
Bool isCapable;
size_t buffer_size;
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
const __DRIconfig **driConfigs;
- const __DRIextension **extensions;
- int i;
if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") ||
!DRIQueryDirectRenderingCapable(pScreen, &isCapable) ||
@@ -1055,42 +1050,15 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
goto handle_error;
}
- snprintf(filename, sizeof filename, "%s/%s_dri.so",
- dri_driver_path, driverName);
-
- screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
+ screen->driver = glxProbeDriver(driverName,
+ (void **)&screen->core,
+ __DRI_CORE, __DRI_CORE_VERSION,
+ (void **)&screen->legacy,
+ __DRI_LEGACY, __DRI_LEGACY_VERSION);
if (screen->driver == NULL) {
- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
- filename, dlerror());
goto handle_error;
}
-
- extensions = dlsym(screen->driver, __DRI_DRIVER_EXTENSIONS);
- if (extensions == NULL) {
- LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
- driverName, dlerror());
- goto handle_error;
- }
- for (i = 0; extensions[i]; i++) {
- if (strcmp(extensions[i]->name, __DRI_CORE) == 0 &&
- extensions[i]->version >= __DRI_CORE_VERSION) {
- screen->core = (__DRIcoreExtension *) extensions[i];
- }
-
- if (strcmp(extensions[i]->name, __DRI_LEGACY) == 0 &&
- extensions[i]->version >= __DRI_LEGACY_VERSION) {
- screen->legacy = (__DRIlegacyExtension *) extensions[i];
- }
- }
-
- if (screen->core == NULL || screen->legacy == NULL) {
- LogMessage(X_ERROR,
- "AIGLX error: %s does not export required DRI extension\n",
- driverName);
- goto handle_error;
- }
-
/*
* Get device-specific info. pDevPriv will point to a struct
* (such as DRIRADEONRec in xfree86/driver/ati/radeon_dri.h) that
@@ -1175,7 +1143,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
pScrn->LeaveVT = glxDRILeaveVT;
LogMessage(X_INFO,
- "AIGLX: Loaded and initialized %s\n", filename);
+ "AIGLX: Loaded and initialized %s\n", driverName);
return &screen->base;