aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxdri2.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
committermarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
commita0b4a1330be6a36ad095222d2ea83927cd33514d (patch)
tree616920ca608751e843c92c9815069f43789e3097 /xorg-server/glx/glxdri2.c
parent45710577f374972946a8eb37833a9c94e5a299bf (diff)
downloadvcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.gz
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.bz2
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.zip
mesa xserver pixman git update 25 nov 2011
Diffstat (limited to 'xorg-server/glx/glxdri2.c')
-rw-r--r--xorg-server/glx/glxdri2.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/xorg-server/glx/glxdri2.c b/xorg-server/glx/glxdri2.c
index e8722585b..8187a3edd 100644
--- a/xorg-server/glx/glxdri2.c
+++ b/xorg-server/glx/glxdri2.c
@@ -73,6 +73,7 @@ struct __GLXDRIscreen {
const __DRIcopySubBufferExtension *copySubBuffer;
const __DRIswapControlExtension *swapControl;
const __DRItexBufferExtension *texBuffer;
+ const __DRIconfig **driConfigs;
unsigned char glx_enable_bits[__GLX_EXT_BYTES];
};
@@ -363,6 +364,8 @@ static __GLXtextureFromPixmap __glXDRItextureFromPixmap = {
static void
__glXDRIscreenDestroy(__GLXscreen *baseScreen)
{
+ int i;
+
__GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
(*screen->core->destroyScreen)(screen->driScreen);
@@ -371,6 +374,12 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen)
__glXScreenDestroy(baseScreen);
+ if (screen->driConfigs) {
+ for (i = 0; screen->driConfigs[i] != NULL; i++)
+ free((__DRIconfig **)screen->driConfigs[i]);
+ free(screen->driConfigs);
+ }
+
free(screen);
}
@@ -688,7 +697,6 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__GLXDRIscreen *screen;
size_t buffer_size;
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- const __DRIconfig **driConfigs;
screen = calloc(1, sizeof *screen);
if (screen == NULL)
@@ -720,7 +728,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
(*screen->dri2->createNewScreen)(pScreen->myNum,
screen->fd,
loader_extensions,
- &driConfigs,
+ &screen->driConfigs,
screen);
if (screen->driScreen == NULL) {
@@ -731,7 +739,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
initializeExtensions(screen);
- screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs,
+ screen->base.fbconfigs = glxConvertConfigs(screen->core, screen->driConfigs,
GLX_WINDOW_BIT |
GLX_PIXMAP_BIT |
GLX_PBUFFER_BIT);