glx: Move DRI extensions pointer loading to driOpenDriver().
[mesa.git] / src / glx / drisw_glx.c
index a2777100a3219dbf3e385c09dfe903c00a5a34c2..7b99e49f000fec5204e7493668aadf779eaa379a 100644 (file)
@@ -748,17 +748,6 @@ driswDestroyScreen(struct glx_screen *base)
 
 #define SWRAST_DRIVER_NAME "swrast"
 
-static void *
-driOpenSwrast(void)
-{
-   void *driver = NULL;
-
-   if (driver == NULL)
-      driver = driOpenDriver(SWRAST_DRIVER_NAME);
-
-   return driver;
-}
-
 static const struct glx_screen_vtable drisw_screen_vtable = {
    .create_context         = drisw_create_context,
    .create_context_attribs = drisw_create_context_attribs,
@@ -837,11 +826,7 @@ driswCreateScreen(int screen, struct glx_display *priv)
       return NULL;
    }
 
-   psc->driver = driOpenSwrast();
-   if (psc->driver == NULL)
-      goto handle_error;
-
-   extensions = driGetDriverExtensions(psc->driver, SWRAST_DRIVER_NAME);
+   extensions = driOpenDriver(SWRAST_DRIVER_NAME, &psc->driver);
    if (extensions == NULL)
       goto handle_error;