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);
+ if (extensions == NULL)
goto handle_error;
- }
for (i = 0; extensions[i]; i++) {
if (strcmp(extensions[i]->name, __DRI_CORE) == 0)
return handle;
}
+_X_HIDDEN const __DRIextension **
+driGetDriverExtensions(void *handle)
+{
+ const __DRIextension **extensions = NULL;
+
+ extensions = dlsym(handle, __DRI_DRIVER_EXTENSIONS);
+ if (extensions == NULL) {
+ ErrorMessageF("driver exports no extensions (%s)\n", dlerror());
+ return NULL;
+ }
+
+ return extensions;
+}
+
static GLboolean
__driGetMSCRate(__DRIdrawable *draw,
int32_t * numerator, int32_t * denominator,
extern void *driOpenDriver(const char *driverName);
+extern const __DRIextension **driGetDriverExtensions(void *handle);
+
extern bool
dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
unsigned *major_ver, unsigned *minor_ver,