const __DRI2flushExtension *f;
const __DRI2configQueryExtension *config;
const __DRItexBufferExtension *texBuffer;
+ const __DRIconfig **driver_configs;
void *driver;
int fd;
/* Free the direct rendering per screen data */
(*psc->core->destroyScreen) (psc->driScreen);
+ driDestroyConfigs(psc->driver_configs);
close(psc->fd);
Xfree(psc);
}
psc->base.visuals =
driConvertConfigs(psc->core, psc->base.visuals, driver_configs);
- psc->base.driver_configs = driver_configs;
+ psc->driver_configs = driver_configs;
psp = &psc->vtable;
psc->base.driScreen = psp;
return head.next;
}
+_X_HIDDEN void
+driDestroyConfigs(const __DRIconfig **configs)
+{
+ int i;
+
+ for (i = 0; configs[i]; i++)
+ free((__DRIconfig *) configs[i]);
+ free(configs);
+}
+
/* Bind extensions common to DRI1 and DRI2 */
_X_HIDDEN void
driBindCommonExtensions(__GLXscreenConfigs *psc,
__GLcontextModes * modes,
const __DRIconfig ** configs);
+extern void driDestroyConfigs(const __DRIconfig **configs);
+
extern const __DRIsystemTimeExtension systemTimeExtension;
extern void InfoMessageF(const char *f, ...);
const __DRIcoreExtension *core;
const __DRIswapControlExtension *swapControl;
const __DRImediaStreamCounterExtension *msc;
+ const __DRIconfig **driver_configs;
void *driver;
int fd;
psc->base.visuals =
driConvertConfigs(psc->core, psc->base.visuals, driver_configs);
- psc->base.driver_configs = driver_configs;
+ psc->driver_configs = driver_configs;
/* Visuals with depth != screen depth are subject to automatic compositing
* in the X server, so DRI1 can't render to them properly. Mark them as
/* Free the direct rendering per screen data */
if (psc->driScreen)
(*psc->core->destroyScreen) (psc->driScreen);
+ driDestroyConfigs(psc->driver_configs);
psc->driScreen = NULL;
if (psc->driver)
dlclose(psc->driver);
__GLXDRIscreen vtable;
const __DRIcoreExtension *core;
const __DRIswrastExtension *swrast;
+ const __DRIconfig **driver_configs;
+
void *driver;
};
/* Free the direct rendering per screen data */
(*psc->core->destroyScreen) (psc->driScreen);
+ driDestroyConfigs(psc->driver_configs);
psc->driScreen = NULL;
if (psc->driver)
dlclose(psc->driver);
psc->base.visuals =
driConvertConfigs(psc->core, psc->base.visuals, driver_configs);
- psc->base.driver_configs = driver_configs;
+ psc->driver_configs = driver_configs;
psp = &psc->vtable;
psc->base.driScreen = psp;
__GLXDRIscreen *driScreen;
- const __DRIconfig **driver_configs;
-
#ifdef __DRI_COPY_SUB_BUFFER
const __DRIcopySubBufferExtension *driCopySubBuffer;
#endif
Xfree((char *) psc->serverGLXexts);
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
- if (psc->driver_configs) {
- unsigned int j;
- for (j = 0; psc->driver_configs[j]; j++)
- free((__DRIconfig *) psc->driver_configs[j]);
- free(psc->driver_configs);
- psc->driver_configs = NULL;
- }
if (psc->driScreen) {
psc->driScreen->destroyScreen(psc);
psc->driScreen = NULL;