Mesa (master): glx: Remove GLX_USE_APPLEGL cruft in extension string handling

Ian Romanick idr at kemper.freedesktop.org
Mon Dec 19 22:56:29 UTC 2011


Module: Mesa
Branch: master
Commit: c66242a6c69f266eef5c6a5f2a1cece911ea9568
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c66242a6c69f266eef5c6a5f2a1cece911ea9568

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Wed Nov 30 10:55:54 2011 -0800

glx: Remove GLX_USE_APPLEGL cruft in extension string handling

All of the extensions require that both libGL and either the server or
the direct rendering driver (or both) enable the extension before it's
advertised.  It seems safe to assume that none of the other components
on OS X will enable these extensions, so all the #ifdef blocks here
just clutter the code.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Cc: Jeremy Huddleston <jeremyhu at apple.com>

---

 src/glx/glxextensions.c |   38 ++------------------------------------
 1 files changed, 2 insertions(+), 36 deletions(-)

diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c
index 0558aab..819fffc 100644
--- a/src/glx/glxextensions.c
+++ b/src/glx/glxextensions.c
@@ -74,60 +74,26 @@ static const struct extension_info known_glx_extensions[] = {
    { GLX(ARB_get_proc_address),        VER(1,4), Y, N, Y, N },
    { GLX(ARB_multisample),             VER(1,4), Y, Y, N, N },
    { GLX(ATI_pixel_format_float),      VER(0,0), N, N, N, N },
-#ifdef GLX_USE_APPLEGL
-   { GLX(EXT_import_context),          VER(0,0), N, N, N, N },
-   { GLX(EXT_visual_info),             VER(0,0), N, N, N, N },
-#else
    { GLX(EXT_import_context),          VER(0,0), Y, Y, N, N },
    { GLX(EXT_visual_info),             VER(0,0), Y, Y, N, N },
-#endif
    { GLX(EXT_visual_rating),           VER(0,0), Y, Y, N, N },
    { GLX(EXT_framebuffer_sRGB),        VER(0,0), Y, Y, N, N },
-#ifdef GLX_USE_APPLEGL
-   { GLX(MESA_copy_sub_buffer),        VER(0,0), N, N, N, N },
-#else
    { GLX(MESA_copy_sub_buffer),        VER(0,0), Y, N, N, N },
-#endif
    { GLX(MESA_multithread_makecurrent),VER(0,0), Y, N, Y, N },
-#ifdef GLX_USE_APPLEGL
-   { GLX(MESA_swap_control),           VER(0,0), N, N, N, N },
-#else
    { GLX(MESA_swap_control),           VER(0,0), Y, N, N, Y },
-#endif
    { GLX(NV_float_buffer),             VER(0,0), N, N, N, N },
-#ifdef GLX_USE_APPLEGL
-   { GLX(OML_swap_method),             VER(0,0), N, N, N, N },
-   { GLX(OML_sync_control),            VER(0,0), N, N, N, N },
-   { GLX(SGI_make_current_read),       VER(1,3), N, N, N, N },
-   { GLX(SGI_swap_control),            VER(0,0), N, N, N, N },
-   { GLX(SGI_video_sync),              VER(0,0), N, N, N, N },
-#else
    { GLX(OML_swap_method),             VER(0,0), Y, Y, N, N },
    { GLX(OML_sync_control),            VER(0,0), Y, N, N, Y },
    { GLX(SGI_make_current_read),       VER(1,3), Y, N, N, N },
    { GLX(SGI_swap_control),            VER(0,0), Y, N, N, N },
    { GLX(SGI_video_sync),              VER(0,0), Y, N, N, Y },
-#endif
-#ifdef GLX_USE_APPLEGL
-   { GLX(SGIS_multisample),            VER(0,0), N, N, N, N },
-#else
    { GLX(SGIS_multisample),            VER(0,0), Y, Y, N, N },
-#endif
    { GLX(SGIX_fbconfig),               VER(1,3), Y, Y, N, N },
-#ifdef GLX_USE_APPLEGL
-   { GLX(SGIX_pbuffer),                VER(1,3), N, N, N, N },
-#else
    { GLX(SGIX_pbuffer),                VER(1,3), Y, Y, N, N },
-#endif
    { GLX(SGIX_swap_barrier),           VER(0,0), N, N, N, N },
    { GLX(SGIX_swap_group),             VER(0,0), N, N, N, N },
-#ifdef GLX_USE_APPLEGL
-   { GLX(SGIX_visual_select_group),    VER(0,0), N, N, N, N },
-   { GLX(EXT_texture_from_pixmap),     VER(0,0), N, N, N, N },
-#else
    { GLX(SGIX_visual_select_group),    VER(0,0), Y, Y, N, N },
    { GLX(EXT_texture_from_pixmap),     VER(0,0), Y, N, N, N },
-#endif
    { GLX(INTEL_swap_event),            VER(0,0), Y, N, N, N },
    { NULL }
 };
@@ -608,7 +574,7 @@ __glXCalculateUsableExtensions(struct glx_screen * psc,
     * support for GLX 1.3, enable support for the extensions that can be
     * "emulated" as well.
     */
-
+#ifndef GLX_USE_APPLEGL
    if (minor_version >= 3) {
       SET_BIT(server_support, EXT_visual_info_bit);
       SET_BIT(server_support, EXT_visual_rating_bit);
@@ -624,7 +590,7 @@ __glXCalculateUsableExtensions(struct glx_screen * psc,
 
       SET_BIT(server_support, EXT_import_context_bit);
    }
-
+#endif
 
    /* An extension is supported if the client-side (i.e., libGL) supports
     * it and the "server" supports it.  In this case that means that either




More information about the mesa-commit mailing list