diff options
author | Eric Anholt <[email protected]> | 2013-09-23 14:44:10 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-10-24 14:04:20 -0700 |
commit | fcb57a8210e819cc14a39c79f23530eb22296da0 (patch) | |
tree | 306eca1c0435a67820adffbc553737868e07d911 /src/glx/drisw_glx.c | |
parent | 6868923702d5cdb93d06627ea4f40abe99cda75a (diff) |
glx: Add an optional function call for getting the DRI driver interface.
The previous interface relied on a static struct, which meant that the
driver didn't get a chance to edit the struct before the struct got used.
For megadrivers, I want struct specific to the driver being loaded.
v2: Fix the prototype in the docs (caught by Marek). Since the driver
name was in the function, we didn't need to also pass it in.
v3: Fix asprintf error checking (caught by Matt's gcc).
Reviewed-by: Matt Turner <[email protected]> (v1)
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/glx/drisw_glx.c')
-rw-r--r-- | src/glx/drisw_glx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 393be205d88..a7d08434877 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -664,11 +664,9 @@ driswCreateScreen(int screen, struct glx_display *priv) if (psc->driver == NULL) goto handle_error; - extensions = dlsym(psc->driver, __DRI_DRIVER_EXTENSIONS); - if (extensions == NULL) { - ErrorMessageF("driver exports no extensions (%s)\n", dlerror()); + extensions = driGetDriverExtensions(psc->driver, SWRAST_DRIVER_NAME); + if (extensions == NULL) goto handle_error; - } for (i = 0; extensions[i]; i++) { if (strcmp(extensions[i]->name, __DRI_CORE) == 0) |