Some fixes for GLX_INDIRECT_RENDERING only build
authorJon TURNEY <jon.turney@dronecode.org.uk>
Mon, 9 Aug 2010 13:47:26 +0000 (14:47 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 7 Sep 2010 16:33:11 +0000 (12:33 -0400)
This fixes some of the build issues with GLX_INDIRECT_RENDERING but !GLX_DIRECT_RENDERING due to recent changes.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
src/glx/glx_pbuffer.c
src/glx/glxcmds.c
src/glx/glxext.c

index 15bfb1591916e1cd0c51a7cd65027e190fb0c3f7..d065f4bb6c02609014b86094e49507d741e1f70a 100644 (file)
@@ -86,7 +86,9 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
                         const CARD32 * attribs, size_t num_attribs)
 {
    struct glx_display *priv = __glXInitialize(dpy);
+#ifdef GLX_DIRECT_RENDERING
    __GLXDRIdrawable *pdraw;
+#endif
    CARD32 *output;
    CARD8 opcode;
    int i;
@@ -95,8 +97,6 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
       return;
    }
 
-   pdraw = GetGLXDRIDrawable(dpy, drawable);
-
    opcode = __glXSetupForCommand(dpy);
    if (!opcode)
       return;
@@ -133,6 +133,9 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
    UnlockDisplay(dpy);
    SyncHandle();
 
+#ifdef GLX_DIRECT_RENDERING
+   pdraw = GetGLXDRIDrawable(dpy, drawable);
+
    for (i = 0; i < num_attribs; i++) {
       switch(attribs[i * 2]) {
       case GLX_EVENT_MASK:
@@ -141,6 +144,7 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
         break;
       }
    }
+#endif
 
    return;
 }
index d4aa8b5866893690710f515af70a9927ae22a585..5cd928753fafc09e848bbf32c14860046325d6f0 100644 (file)
@@ -2161,9 +2161,9 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
 {
 #ifdef GLX_DIRECT_RENDERING
    __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
-#endif
    struct glx_screen *psc = pdraw ? pdraw->psc : NULL;
    int ret;
+#endif
 
 
    /* The OML_sync_control spec says these should "generate a GLX_BAD_VALUE
@@ -2193,9 +2193,9 @@ __glXWaitForSbcOML(Display * dpy, GLXDrawable drawable,
 {
 #ifdef GLX_DIRECT_RENDERING
    __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
-#endif
    struct glx_screen *psc = pdraw ? pdraw->psc : NULL;
    int ret;
+#endif
 
    /* The OML_sync_control spec says this should "generate a GLX_BAD_VALUE
     * error", but the return type in the spec is Bool.
index 9e42d83c4d5a35f6f1a25560d0747f0192d4e0d3..7ba4666187ac1d2bd296566aa6f3f7cdcc3a6bd0 100644 (file)
@@ -249,9 +249,9 @@ glx_display_free(struct glx_display *priv)
    if (priv->serverGLXversion)
       Xfree((char *) priv->serverGLXversion);
 
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
    __glxHashDestroy(priv->drawHash);
 
-#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
    /* Free the direct rendering per display data */
    if (priv->driswDisplay)
       (*priv->driswDisplay->destroyDisplay) (priv->driswDisplay);