From c2b515379bfc669660133bb2d25e50bb04ac0d66 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 15 Nov 2018 14:22:16 -0800 Subject: glx: Move DRI extensions pointer loading to driOpenDriver(). The only thing you do with a dri driver handle is get the extensions pointer, so just fold it in to simplify the callers. v2: Add the declaration of driGetDriverExtensions() that got lost in a rebase. Reviewed-by: Eric Engestrom (v1) Reviewed-by: Emil Velikov (v1) --- src/glx/drisw_glx.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/glx/drisw_glx.c') diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index a2777100a32..7b99e49f000 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -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; -- cgit v1.2.3