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/dri2_glx.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/glx/dri2_glx.c') diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 91afc337505..d8c5ba25f04 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -1252,13 +1252,7 @@ dri2CreateScreen(int screen, struct glx_display * priv) driverName = loader_driverName; } - psc->driver = driOpenDriver(driverName); - if (psc->driver == NULL) { - ErrorMessageF("driver pointer missing\n"); - goto handle_error; - } - - extensions = driGetDriverExtensions(psc->driver, driverName); + extensions = driOpenDriver(driverName, &psc->driver); if (extensions == NULL) goto handle_error; -- cgit v1.2.3