Mesa (staging/20.0): glx: omit loader_loader() for macOS

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 15 18:08:49 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: fc140276b4b0352a07afd82fcc6517ff140186d6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc140276b4b0352a07afd82fcc6517ff140186d6

Author: Emil Velikov <emil.velikov at collabora.com>
Date:   Tue Apr  7 17:45:33 2020 +0100

glx: omit loader_loader() for macOS

Earlier commit added the code unconditionally, since the loader code
itself is already built on macOS.
Although it did not consider the #include mayhem that src/glx is.

In particular, none of the __GLXDRI{screen,context,drawable) are
available for macOS... those are pulled by dri_common.[ch].

Ideally we'll untangle that, but for the time being simply #ifdef out
the include/call.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2726
Fixes: b699d070a6d ("glx: set the loader_logger early and for everyone")
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4490>
(cherry picked from commit 22406da75671438bf9de68bc47e2b8871e5fa3e6)

---

 .pick_status.json | 2 +-
 src/glx/glxext.c  | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 7816f86dca5..4dbb12bce16 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -67,7 +67,7 @@
         "description": "glx: omit loader_loader() for macOS",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "b699d070a6de273fb3a964e05944b203d0b57090"
     },
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index cbc59e80921..34e86ae734d 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -50,7 +50,9 @@
 #include "glxextensions.h"
 
 #include "util/debug.h"
+#ifndef GLX_USE_APPLEGL
 #include "dri_common.h"
+#endif
 
 #include <X11/Xlib-xcb.h>
 #include <xcb/xcb.h>
@@ -908,8 +910,10 @@ __glXInitialize(Display * dpy)
 
    dpyPriv->drawHash = __glxHashCreate();
 
+#ifndef GLX_USE_APPLEGL
    /* Set the logger before the *CreateDisplay functions. */
    loader_set_logger(dri_message);
+#endif
 
    /*
     ** Initialize the direct rendering per display data and functions.



More information about the mesa-commit mailing list