Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / glx / dri_glx.c
index 2d435f0ee192700680f72941ec8b01412b1a3329..3e0873524c065b062f70502007843548718a9d10 100644 (file)
@@ -199,15 +199,9 @@ clear_driver_config_cache()
 static char *
 get_driver_config(const char *driverName)
 {
-   void *handle = driOpenDriver(driverName);
-   const __DRIextension **extensions;
-
-   if (!handle)
-      return NULL;
-
+   void *handle;
    char *config = NULL;
-
-   extensions = driGetDriverExtensions(handle, driverName);
+   const __DRIextension **extensions = driOpenDriver(driverName, &handle);
    if (extensions) {
       for (int i = 0; extensions[i]; i++) {
          if (strcmp(extensions[i]->name, __DRI_CONFIG_OPTIONS) != 0)
@@ -387,9 +381,7 @@ static const __DRIgetDrawableInfoExtension getDrawableInfoExtension = {
 static const __DRIextension *loader_extensions[] = {
    &systemTimeExtension.base,
    &getDrawableInfoExtension.base,
-#ifdef XDAMAGE_1_1_INTERFACE
    &damageExtension.base,
-#endif
    NULL
 };
 
@@ -558,14 +550,14 @@ CallCreateNewScreen(Display *dpy, int scrn, struct dri_screen *psc,
     * non-conformant to prevent apps from picking them up accidentally.
     */
    for (visual = psc->base.visuals; visual; visual = visual->next) {
-      XVisualInfo template;
+      XVisualInfo templ;
       XVisualInfo *visuals;
       int num_visuals;
       long mask;
 
-      template.visualid = visual->visualID;
+      templ.visualid = visual->visualID;
       mask = VisualIDMask;
-      visuals = XGetVisualInfo(dpy, mask, &template, &num_visuals);
+      visuals = XGetVisualInfo(dpy, mask, &templ, &num_visuals);
 
       if (visuals) {
          if (num_visuals > 0 && visuals->depth != DefaultDepth(dpy, scrn))
@@ -918,11 +910,7 @@ driCreateScreen(int screen, struct glx_display *priv)
       goto cleanup;
    }
 
-   psc->driver = driOpenDriver(driverName);
-   if (psc->driver == NULL)
-      goto cleanup;
-
-   extensions = dlsym(psc->driver, __DRI_DRIVER_EXTENSIONS);
+   extensions = driOpenDriver(driverName, &psc->driver);
    if (extensions == NULL) {
       ErrorMessageF("driver exports no extensions (%s)\n", dlerror());
       goto cleanup;