Mesa (master): glx: fix non-dri build

Emil Velikov evelikov at kemper.freedesktop.org
Tue Jan 16 16:31:01 UTC 2018


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

Author: Samuel Thibault <samuel.thibault at ens-lyon.org>
Date:   Mon Jan 15 15:38:25 2018 +0100

glx: fix non-dri build

glXGetDriverConfig parameters do not provide a context to dynamically
check for the presence of the function, so the dispatcher directly calls
glXGetDriverConfig, but in non-dri builds dri_glx.c didn't provide
glXGetDriverConfig.

This change make it just return NULL in that case.

Fixes: 84f764a7591 "glxglvnddispatch: Add missing dispatch for GetDriverConfig
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

---

 src/glx/g_glxglvnddispatchfuncs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/glx/g_glxglvnddispatchfuncs.c b/src/glx/g_glxglvnddispatchfuncs.c
index 56d894eda7..5b65afc860 100644
--- a/src/glx/g_glxglvnddispatchfuncs.c
+++ b/src/glx/g_glxglvnddispatchfuncs.c
@@ -338,11 +338,15 @@ static Display *dispatch_GetCurrentDisplayEXT(void)
 
 static const char *dispatch_GetDriverConfig(const char *driverName)
 {
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
     /*
      * The options are constant for a given driverName, so we do not need
      * a context (and apps expect to be able to call this without one).
      */
     return glXGetDriverConfig(driverName);
+#else
+    return NULL;
+#endif
 }
 
 




More information about the mesa-commit mailing list