struct dri2_screen {
__GLXscreenConfigs base;
- __GLXDRIscreen driScreen;
+ __DRIscreen *driScreen;
+ __GLXDRIscreen vtable;
const __DRIdri2Extension *dri2;
const __DRIcoreExtension *core;
pcp->psc = &psc->base;
pcp->driContext =
- (*psc->dri2->createNewContext) (psc->base.__driScreen,
+ (*psc->dri2->createNewContext) (psc->driScreen,
config->driConfig, shared, pcp);
gc->__driContext = pcp->driContext;
pdraw->have_back = 0;
if (psc->config)
- psc->config->configQueryi(psc->base.__driScreen,
+ psc->config->configQueryi(psc->driScreen,
"vblank_mode", &vblank_mode);
switch (vblank_mode) {
pdp = (struct dri2_display *)dpyPriv->dri2Display;;
/* Create a new drawable */
pdraw->base.driDrawable =
- (*psc->dri2->createNewDrawable) (psc->base.__driScreen,
+ (*psc->dri2->createNewDrawable) (psc->driScreen,
config->driConfig, pdraw);
if (!pdraw->base.driDrawable) {
struct dri2_screen *psc = (struct dri2_screen *) base;
/* Free the direct rendering per screen data */
- (*psc->core->destroyScreen) (psc->base.__driScreen);
+ (*psc->core->destroyScreen) (psc->driScreen);
close(psc->fd);
- base->__driScreen = NULL;
Xfree(psc);
}
struct dri2_screen *psc = (struct dri2_screen *) priv->base.psc;
if (psc->config)
- psc->config->configQueryi(psc->base.__driScreen,
+ psc->config->configQueryi(psc->driScreen,
"vblank_mode", &vblank_mode);
switch (vblank_mode) {
/* If the server does not support the protocol for
* DRI2GetBuffersWithFormat, don't supply that interface to the driver.
*/
- psc->base.__driScreen =
+ psc->driScreen =
psc->dri2->createNewScreen(screen, psc->fd,
(const __DRIextension **)
&pdp->loader_extensions[0],
&driver_configs, psc);
- if (psc->base.__driScreen == NULL) {
+ if (psc->driScreen == NULL) {
ErrorMessageF("failed to create dri screen\n");
goto handle_error;
}
- extensions = psc->core->getExtensions(psc->base.__driScreen);
+ extensions = psc->core->getExtensions(psc->driScreen);
driBindCommonExtensions(&psc->base, extensions);
dri2BindExtensions(psc, extensions);
psc->base.driver_configs = driver_configs;
- psp = &psc->driScreen;
+ psp = &psc->vtable;
psc->base.driScreen = psp;
psp->destroyScreen = dri2DestroyScreen;
psp->createContext = dri2CreateContext;
{
__GLXscreenConfigs base;
- __GLXDRIscreen driScreen;
+ __DRIscreen *driScreen;
+ __GLXDRIscreen vtable;
const __DRIlegacyExtension *legacy;
const __DRIcoreExtension *core;
const __DRIswapControlExtension *swapControl;
}
pcp->driContext =
- (*psc->legacy->createNewContext) (psc->base.__driScreen,
+ (*psc->legacy->createNewContext) (psc->driScreen,
config->driConfig,
renderType, shared, hwContext, pcp);
if (pcp->driContext == NULL) {
/* Create a new drawable */
pdraw->driDrawable =
- (*psc->legacy->createNewDrawable) (psc->base.__driScreen,
+ (*psc->legacy->createNewDrawable) (psc->driScreen,
config->driConfig,
hwDrawable,
GLX_WINDOW_BIT,
struct dri_screen *psc = (struct dri_screen *) base;
/* Free the direct rendering per screen data */
- if (psc->base.__driScreen)
- (*psc->core->destroyScreen) (psc->base.__driScreen);
- psc->base.__driScreen = NULL;
+ if (psc->driScreen)
+ (*psc->core->destroyScreen) (psc->driScreen);
+ psc->driScreen = NULL;
if (psc->driver)
dlclose(psc->driver);
}
}
pdp = (struct dri_display *) priv->driDisplay;
- psc->base.__driScreen =
+ psc->driScreen =
CallCreateNewScreen(psc->base.dpy, screen, psc, pdp);
- if (psc->base.__driScreen == NULL) {
+ if (psc->driScreen == NULL) {
dlclose(psc->driver);
Xfree(psc);
return NULL;
}
- extensions = psc->core->getExtensions(psc->base.__driScreen);
+ extensions = psc->core->getExtensions(psc->driScreen);
driBindExtensions(psc, extensions);
driBindCommonExtensions(&psc->base, extensions);
- psp = &psc->driScreen;
+ psp = &psc->vtable;
psc->base.driScreen = psp;
if (psc->base.driCopySubBuffer)
psp->copySubBuffer = driCopySubBuffer;
{
__GLXscreenConfigs base;
- __GLXDRIscreen driScreen;
+ __DRIscreen *driScreen;
+ __GLXDRIscreen vtable;
const __DRIcoreExtension *core;
const __DRIswrastExtension *swrast;
void *driver;
pcp->psc = &psc->base;
pcp->driContext =
- (*psc->core->createNewContext) (psc->base.__driScreen,
+ (*psc->core->createNewContext) (psc->driScreen,
config->driConfig, shared, pcp);
if (pcp->driContext == NULL) {
Xfree(pcp);
/* Create a new drawable */
pdraw->driDrawable =
- (*swrast->createNewDrawable) (psc->base.__driScreen,
+ (*swrast->createNewDrawable) (psc->driScreen,
config->driConfig, pdp);
if (!pdraw->driDrawable) {
struct drisw_screen *psc = (struct drisw_screen *) base;
/* Free the direct rendering per screen data */
- (*psc->core->destroyScreen) (psc->base.__driScreen);
- psc->base.__driScreen = NULL;
+ (*psc->core->destroyScreen) (psc->driScreen);
+ psc->driScreen = NULL;
if (psc->driver)
dlclose(psc->driver);
}
goto handle_error;
}
- psc->base.__driScreen =
+ psc->driScreen =
psc->swrast->createNewScreen(screen, loader_extensions,
&driver_configs, psc);
- if (psc->base.__driScreen == NULL) {
+ if (psc->driScreen == NULL) {
ErrorMessageF("failed to create dri screen\n");
goto handle_error;
}
- extensions = psc->core->getExtensions(psc->base.__driScreen);
+ extensions = psc->core->getExtensions(psc->driScreen);
driBindCommonExtensions(&psc->base, extensions);
psc->base.configs =
psc->base.driver_configs = driver_configs;
- psp = &psc->driScreen;
+ psp = &psc->vtable;
psc->base.driScreen = psp;
psp->destroyScreen = driDestroyScreen;
psp->createContext = driCreateContext;
/**
* Per screen direct rendering interface functions and data.
*/
- __DRIscreen *__driScreen;
__glxHashTable *drawHash;
Display *dpy;
int scr;