[Mesa-dev] [PATCHv2] 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 --- Difference between v1 and v2: just modify the call in dispatch_GetDriverConfig rather than adding glXGetDriverConfig and always adding dri_glx to build system. --- 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 56d894eda..5b65afc86 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 } -- 2.15.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCHv2] glx: fix non-dri build
On 15.01.2018 15:38, Samuel Thibault wrote: 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 --- Difference between v1 and v2: just modify the call in dispatch_GetDriverConfig rather than adding glXGetDriverConfig and always adding dri_glx to build system. Thanks! We usually add the version difference as part of the commit message. Reviewed-by: Nicolai Hähnle You may want to wait a while though to see if somebody else speaks up. Cheers, Nicolai --- 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 56d894eda..5b65afc86 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 } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCHv2] glx: fix non-dri build
Hi, On 15-01-18 15:38, Samuel Thibault wrote: 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 Seems sensible to me and thank you for fixing this up after me :) : Reviewed-by: Hans de Goede Regards, Hans --- Difference between v1 and v2: just modify the call in dispatch_GetDriverConfig rather than adding glXGetDriverConfig and always adding dri_glx to build system. --- 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 56d894eda..5b65afc86 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 } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCHv2] glx: fix non-dri build
On 15 January 2018 at 14:38, Samuel Thibault wrote: > 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 > > --- > Difference between v1 and v2: just modify the call in > dispatch_GetDriverConfig rather than adding glXGetDriverConfig and > always adding dri_glx to build system. > --- Thanks Samuel - I like the approach used in v2. Reviewed and pushed to master. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev