From 89c6108531e603bdc81faf2ea860f318a2e94a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 19 Oct 2007 16:21:54 -0400 Subject: Fix software GL to provide a list of supported fbconfigs like the DRI case. --- GL/glx/glxscreens.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'GL/glx/glxscreens.c') diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c index 511aa8ad9..2c8f810e6 100644 --- a/GL/glx/glxscreens.c +++ b/GL/glx/glxscreens.c @@ -469,8 +469,6 @@ addFullSet(__GLXscreen *pGlxScreen) return; } - ErrorF("addFullSet, setting numVisuals to %d\n", pGlxScreen->numFBConfigs); - pGlxScreen->numVisuals = pGlxScreen->numFBConfigs; for (i = 0, config = pGlxScreen->fbconfigs; config; config = config->next, i++) { pGlxScreen->visuals[i] = config; @@ -500,10 +498,24 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) glxGeneration = serverGeneration; } + pGlxScreen->pScreen = pScreen; + pGlxScreen->GLextensions = xstrdup(GLServerExtensions); + pGlxScreen->GLXvendor = xstrdup(GLXServerVendorName); + pGlxScreen->GLXversion = xstrdup(GLXServerVersion); + pGlxScreen->GLXextensions = xstrdup(GLXServerExtensions); + + pGlxScreen->PositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = glxPositionWindow; + + pGlxScreen->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = glxCloseScreen; + i = 0; for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next) { m->fbconfigID = FakeClientID(0); m->visualID = findVisualForConfig(pScreen, m); + ErrorF("mapping fbconfig id 0x%02lx to visual id 0x%02lx\n", + m->fbconfigID, m->visualID); i++; } pGlxScreen->numFBConfigs = i; @@ -526,18 +538,6 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) break; } - pGlxScreen->pScreen = pScreen; - pGlxScreen->GLextensions = xstrdup(GLServerExtensions); - pGlxScreen->GLXvendor = xstrdup(GLXServerVendorName); - pGlxScreen->GLXversion = xstrdup(GLXServerVersion); - pGlxScreen->GLXextensions = xstrdup(GLXServerExtensions); - - pGlxScreen->PositionWindow = pScreen->PositionWindow; - pScreen->PositionWindow = glxPositionWindow; - - pGlxScreen->CloseScreen = pScreen->CloseScreen; - pScreen->CloseScreen = glxCloseScreen; - pScreen->devPrivates[glxScreenPrivateIndex].ptr = (pointer) pGlxScreen; } -- cgit v1.2.1