On Wed, Nov 26, 2008 at 21:52, RALOVICH, Kristóf
<[EMAIL PROTECTED]> wrote:
> On Wed, Nov 26, 2008 at 18:04, Brian Paul
> <[EMAIL PROTECTED]> wrote:
>> RALOVICH, Kristóf wrote:
>>>
>>> On Wed, Nov 26, 2008 at 16:33, Brian Paul
>>> <[EMAIL PROTECTED]> wrote:
>>>>
>>>> Did you see my email yesterday, Kristóf?
>>>>
>>>> I was hoping you could send me your patches in a tarball.
>>>>
>>>> -Brian
>>>>
>>>
>>> Brian,
>>>
>>> sorry for my late reply, I was busy today, but the tarball has just been
>>> sent.
>>>
>>> Thanks,
>>> Kristóf
>>
>>
>> No problem. I just committed/pushed the patches.
>>
>> -Brian
>>
>>
>
> Building master with --enable-xcb is currently BROKEN!
>
> Unfortunately I have spotted at least one bug related to my code
> already. I don't know how I got past by it when testing stuff. It is
> in glxext.c in getFBConfigs improperly calling
> createConfigsFromProperties.
>
> Since the cause is not that trivial, I am working on finding it.
>
> Kristof
>

I have reverted two of my changes for now. With these, the problem is
gone, --enable-xcb builds and runs glxinfo & glxgears all right.
Please apply!

Thanks,
Kristóf
From 073cb2826f11aabdabdb6b56e864edf5ed1bafbf Mon Sep 17 00:00:00 2001
From: =?utf-8?q?RALOVICH,=20Krist=C3=B3f?= <[EMAIL PROTECTED]>
Date: Thu, 27 Nov 2008 12:53:19 +0100
Subject: [PATCH] Revert "glx: revert using nonexsisten XCB version of glXGetFBConfigsSGIX"

This reverts commit 53698765019e50172be25a4ff48c83d54f0e7981.
---
 src/glx/x11/glxext.c |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 729cf3a..90db81e 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -581,6 +581,63 @@ static GLboolean
 getFBConfigs(Display * dpy, __GLXdisplayPrivate * priv, int screen)
 {
    __GLXscreenConfigs *psc;
+#ifdef USE_XCB
+   xcb_connection_t* c = XGetXCBConnection(dpy);
+   xcb_glx_get_fb_configs_reply_t* reply_fb = NULL;
+   xcb_glx_get_fb_configs_sgix_reply_t* reply_sgix = NULL;
+   uint32_t num_fb_configs;
+   uint32_t num_properties;
+   uint32_t* props;
+
+   psc = priv->screenConfigs + screen;
+   psc->serverGLXexts = __glXQueryServerString(dpy, priv->majorOpcode,
+                                               screen, GLX_EXTENSIONS);
+   psc->configs = NULL;
+
+   if (atof(priv->serverGLXversion) >= 1.3) {
+      reply_fb = xcb_glx_get_fb_configs_reply(c,
+                                              xcb_glx_get_fb_configs(c,
+                                                                     screen),
+                                              NULL);
+      if (!reply_fb)
+         goto out;
+
+      num_fb_configs = reply_fb->num_fb_configs;
+      num_properties = reply_fb->num_properties * 2;
+      props = xcb_glx_get_fb_configs_property_list(reply_fb);
+   } else if (strstr(psc->serverGLXexts, "GLX_SGIX_fbconfig") != NULL) {
+      reply_sgix = xcb_glx_get_fb_configs_sgix_reply(
+         c,
+         xcb_glx_get_fb_configs_sgix(c,
+                                     65540, /* X_GLXvop_GetFBConfigsSGIX */
+                                     0,
+                                     screen),
+         NULL);
+
+      if (!reply_sgix)
+         goto out;
+
+      num_fb_configs = reply_sgix->num_fb_configs;
+      num_properties = reply_sgix->num_properties * 2;
+      props = xcb_glx_get_fb_configs_sgix_property_list(reply_sgix);
+   } else
+      goto out;
+
+   psc->configs = createConfigsFromProperties(props,
+                                              num_fb_configs,
+                                              num_properties,
+                                              screen,
+                                              GL_TRUE);
+
+   if (reply_fb)
+      free(reply_fb);
+
+   if (reply_sgix)
+      free(reply_sgix);
+
+out:
+   return psc->configs != NULL;
+#else /* USE_XCB */
    xGLXGetFBConfigsReq *fb_req;
    xGLXGetFBConfigsSGIXReq *sgi_req;
    xGLXVendorPrivateWithReplyReq *vpreq;
@@ -623,6 +680,7 @@ getFBConfigs(Display * dpy, __GLXdisplayPrivate * priv, int screen)
  out:
    UnlockDisplay(dpy);
    return psc->configs != NULL;
+#endif /* USE_XCB */
 }
 
 /*
-- 
1.6.0.4

From be2dc66dcab549e867c49922b1febe645363c294 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?RALOVICH,=20Krist=C3=B3f?= <[EMAIL PROTECTED]>
Date: Thu, 27 Nov 2008 12:53:43 +0100
Subject: [PATCH] Revert "glx: xcbified visual and FBConfig choosing"

This reverts commit 62688f11355cfa865d420755aa159875b425cc9b.
---
 src/glx/x11/glxext.c |  109 +++-----------------------------------------------
 1 files changed, 6 insertions(+), 103 deletions(-)

diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 90db81e..be6edf9 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -465,14 +465,8 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count,
 }
 
 static __GLcontextModes *
-createConfigsFromProperties(
-#ifdef USE_XCB
-   uint32_t* properties,
-#else
-   Display *dpy,
-#endif
-   int nvisuals, int nprops,
-   int screen, GLboolean tagged_only)
+createConfigsFromProperties(Display * dpy, int nvisuals, int nprops,
+                            int screen, GLboolean tagged_only)
 {
    INT32 buf[__GLX_TOTAL_CONFIG], *props;
    unsigned prop_size;
@@ -502,11 +496,7 @@ createConfigsFromProperties(
    /* Read each config structure and convert it into our format */
    m = modes;
    for (i = 0; i < nvisuals; i++) {
-#ifdef USE_XCB
-      memcpy(props, &properties[i*nprops], prop_size);
-#else
       _XRead(dpy, (char *) props, prop_size);
-#endif
       /* Older X servers don't send this so we default it here. */
       m->drawableType = GLX_WINDOW_BIT;
       __glXInitializeVisualConfigFromTags(m, nprops, props,
@@ -524,34 +514,8 @@ createConfigsFromProperties(
 static GLboolean
 getVisualConfigs(Display * dpy, __GLXdisplayPrivate * priv, int screen)
 {
-   __GLXscreenConfigs *psc;
-#ifdef USE_XCB
-   xcb_connection_t* c = XGetXCBConnection(dpy);
-   xcb_glx_get_visual_configs_reply_t* reply = NULL;
-   uint32_t* props;
-
-   psc = priv->screenConfigs + screen;
-   psc->visuals = NULL;
-
-   reply = xcb_glx_get_visual_configs_reply(c,
-                                            xcb_glx_get_visual_configs(c,
-                                                                       screen),
-                                            NULL);
-   if(!reply)
-      goto out;
-
-   props = xcb_glx_get_visual_configs_property_list(reply);
-   psc->visuals = createConfigsFromProperties(props,
-                                              reply->num_visuals,
-                                              reply->num_properties,
-                                              screen,
-                                              GL_FALSE);
-   free(reply);
-
-out:
-   return psc->visuals != NULL;
-#else /* USE_XCB */
    xGLXGetVisualConfigsReq *req;
+   __GLXscreenConfigs *psc;
    xGLXGetVisualConfigsReply reply;
 
    LockDisplay(dpy);
@@ -574,78 +538,19 @@ out:
  out:
    UnlockDisplay(dpy);
    return psc->visuals != NULL;
-#endif /* USE_XCB */
 }
 
 static GLboolean
 getFBConfigs(Display * dpy, __GLXdisplayPrivate * priv, int screen)
 {
-   __GLXscreenConfigs *psc;
-#ifdef USE_XCB
-   xcb_connection_t* c = XGetXCBConnection(dpy);
-   xcb_glx_get_fb_configs_reply_t* reply_fb = NULL;
-   xcb_glx_get_fb_configs_sgix_reply_t* reply_sgix = NULL;
-   uint32_t num_fb_configs;
-   uint32_t num_properties;
-   uint32_t* props;
-
-   psc = priv->screenConfigs + screen;
-   psc->serverGLXexts = __glXQueryServerString(dpy, priv->majorOpcode,
-                                               screen, GLX_EXTENSIONS);
-   psc->configs = NULL;
-
-   if (atof(priv->serverGLXversion) >= 1.3) {
-      reply_fb = xcb_glx_get_fb_configs_reply(c,
-                                              xcb_glx_get_fb_configs(c,
-                                                                     screen),
-                                              NULL);
-      if (!reply_fb)
-         goto out;
-
-      num_fb_configs = reply_fb->num_fb_configs;
-      num_properties = reply_fb->num_properties * 2;
-      props = xcb_glx_get_fb_configs_property_list(reply_fb);
-   } else if (strstr(psc->serverGLXexts, "GLX_SGIX_fbconfig") != NULL) {
-      reply_sgix = xcb_glx_get_fb_configs_sgix_reply(
-         c,
-         xcb_glx_get_fb_configs_sgix(c,
-                                     65540, /* X_GLXvop_GetFBConfigsSGIX */
-                                     0,
-                                     screen),
-         NULL);
-
-      if (!reply_sgix)
-         goto out;
-
-      num_fb_configs = reply_sgix->num_fb_configs;
-      num_properties = reply_sgix->num_properties * 2;
-      props = xcb_glx_get_fb_configs_sgix_property_list(reply_sgix);
-   } else
-      goto out;
-
-   psc->configs = createConfigsFromProperties(props,
-                                              num_fb_configs,
-                                              num_properties,
-                                              screen,
-                                              GL_TRUE);
-
-   if (reply_fb)
-      free(reply_fb);
-
-   if (reply_sgix)
-      free(reply_sgix);
-
-out:
-   return psc->configs != NULL;
-#else /* USE_XCB */
    xGLXGetFBConfigsReq *fb_req;
    xGLXGetFBConfigsSGIXReq *sgi_req;
    xGLXVendorPrivateWithReplyReq *vpreq;
    xGLXGetFBConfigsReply reply;
+   __GLXscreenConfigs *psc;
 
    psc = priv->screenConfigs + screen;
-   psc->serverGLXexts = __glXQueryServerString(dpy, priv->majorOpcode,
-                                               screen, GLX_EXTENSIONS);
+   psc->serverGLXexts = __glXQueryServerString(dpy, priv->majorOpcode, screen, GLX_EXTENSIONS);
 
    LockDisplay(dpy);
 
@@ -680,7 +585,6 @@ out:
  out:
    UnlockDisplay(dpy);
    return psc->configs != NULL;
-#endif /* USE_XCB */
 }
 
 /*
@@ -704,8 +608,7 @@ AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv)
    memset(psc, 0, screens * sizeof(__GLXscreenConfigs));
    priv->screenConfigs = psc;
 
-   priv->serverGLXversion = __glXQueryServerString(dpy, priv->majorOpcode,
-                                                   0, GLX_VERSION);
+   priv->serverGLXversion = __glXQueryServerString(dpy, priv->majorOpcode, 0, GLX_VERSION);
    if (priv->serverGLXversion == NULL) {
       FreeScreenConfigs(priv);
       return GL_FALSE;
-- 
1.6.0.4

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to