On 03/06/2014 15:19, Aaron Watry wrote:
On Tue, Jun 3, 2014 at 8:14 AM, Jon TURNEY <jon.tur...@dronecode.org.uk> wrote:
Some untangling to fix building in the dri_platform=none, --enable-driglx-direct
case, where only driswast can be used.

Turn the test for including the glXGetScreenDriver()/glXGetScreenDriver()
interface used by xdriinfo from !GLX_USE_APPLEGL into a positive form, as it is
only useful when dri_platform=drm

Add additional GLX_USE_DRM tests so DRI[123] renderers are only used when
dri_platform=drm

Note that swrast and indirect must still be disabled in the APPLEGL case at the
moment, which makes things more complex than they need to be.  More untangling
is needed to allow that

--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -242,6 +242,7 @@ glx_display_free(struct glx_display *priv)
        (*priv->driswDisplay->destroyDisplay) (priv->driswDisplay);
     priv->driswDisplay = NULL;

+#if defined (GLX_USE_DRM)
     if (priv->driDisplay)
        (*priv->driDisplay->destroyDisplay) (priv->driDisplay);
     priv->driDisplay = NULL;
@@ -253,7 +254,8 @@ glx_display_free(struct glx_display *priv)
     if (priv->dri3Display)
        (*priv->dri3Display->destroyDisplay) (priv->dri3Display);
     priv->dri3Display = NULL;
-#endif
+#endif /* GLX_USE_DRM */
+#endif /* GLX_DIRECT_RENDERING && !GLX_USE_APPLEGL */

I'm assuming that you meant GLX_DIRECT_RENDERING && GLX_USE_DRM,
right?  The other #endif comment changes in the patch look correct,
but this one seems wrong.

I think this endif comment matches the '#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)' at line 237.

It would perhaps be more logical if that was just '#ifdef GLX_DIRECT_RENDERING', but the applegl renderer can't be used with any of the others, at the moment.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to