glx: fix non-dri build
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 15 Jan 2018 14:38:25 +0000 (15:38 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 16 Jan 2018 16:27:19 +0000 (16:27 +0000)
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@amd.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/glx/g_glxglvnddispatchfuncs.c

index 56d894eda7283cb7010985e6424dc1bbeb479dec..5b65afc86021143f2626a803760d92263d170a20 100644 (file)
@@ -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
 }