Re: [Mesa-dev] [PATCH] glx: fix non-dri build
Nicolai Hähnle, on lun. 15 janv. 2018 15:07:03 +0100, wrote: > On 13.01.2018 12:36, 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 makes it provide a NULL-returning stub in non-dri builds. > > > > Fixes: 84f764a7591 "glxglvnddispatch: Add missing dispatch for > > GetDriverConfig" > > Would it be possible to instead modify dispatch_GetDriverConfig with an: > > #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) >... > #else >return NULL; > #endif Sure! There is just one thing: src/glx/g_glxglvnddispatchfuncs.c reads * THIS FILE IS AUTOMATICALLY GENERATED BY gen_scrn_dispatch.pl * DO NOT EDIT!! I didn't find that script... Samuel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] glx: fix non-dri build
On 15.01.2018 15:15, Samuel Thibault wrote: Nicolai Hähnle, on lun. 15 janv. 2018 15:07:03 +0100, wrote: On 13.01.2018 12:36, 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 makes it provide a NULL-returning stub in non-dri builds. Fixes: 84f764a7591 "glxglvnddispatch: Add missing dispatch for GetDriverConfig" Would it be possible to instead modify dispatch_GetDriverConfig with an: #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) ... #else return NULL; #endif Sure! There is just one thing: src/glx/g_glxglvnddispatchfuncs.c reads * THIS FILE IS AUTOMATICALLY GENERATED BY gen_scrn_dispatch.pl * DO NOT EDIT!! I didn't find that script... Good point. Then again, that file isn't actually generated as part of the build (and as you write, that Perl script is missing), and the problem you're trying to fix originates in a manual edit of that file. So I vote to fix this by changing the original manual edit, though I'd welcome other suggestions, especially ones that fix the confusion around whether that file is automatically generated... Cheers, Nicolai Samuel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] glx: fix non-dri build
On 13.01.2018 12:36, 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 makes it provide a NULL-returning stub in non-dri builds. Fixes: 84f764a7591 "glxglvnddispatch: Add missing dispatch for GetDriverConfig" Would it be possible to instead modify dispatch_GetDriverConfig with an: #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) ... #else return NULL; #endif That seems a lighter-weight approach to fixing the build error. Cheers, Nicolai --- Compiling dri_glx.c in non-dri builds might be frowned upon. I'll be happy to move the glXGetDriverConfig to another file if somebody tells me which file would be the proper place. --- src/glx/Makefile.am | 2 +- src/glx/dri_glx.c | 11 ++- src/glx/glxclient.h | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am index 5448a0907..0ae403403 100644 --- a/src/glx/Makefile.am +++ b/src/glx/Makefile.am @@ -59,6 +59,7 @@ libglx_la_SOURCES = \ clientinfo.c \ compsize.c \ create_context.c \ + dri_glx.c \ eval.c \ glxclient.h \ glxcmds.c \ @@ -123,7 +124,6 @@ libglx_la_SOURCES += \ dri2_glx.c \ dri2.h \ dri2_priv.h \ - dri_glx.c \ dri_sarea.h \ XF86dri.c \ xf86dri.h \ diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c index 5c4346cec..893cb4acd 100644 --- a/src/glx/dri_glx.c +++ b/src/glx/dri_glx.c @@ -32,12 +32,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "glxclient.h" + #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) #include #include #include -#include "glxclient.h" #include "xf86dri.h" #include "dri2.h" #include "dri_sarea.h" @@ -1020,4 +1021,12 @@ driCreateDisplay(Display * dpy) return >base; } +#else /* GLX_DIRECT_RENDERING */ + +_GLX_PUBLIC const char * +glXGetDriverConfig(const char *driverName) +{ + return NULL; +} + #endif /* GLX_DIRECT_RENDERING */ diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index f3a36cf10..a1925a5fe 100644 --- a/src/glx/glxclient.h +++ b/src/glx/glxclient.h @@ -169,10 +169,10 @@ extern unsigned dri2GetSwapEventType(Display *dpy, XID drawable); */ extern const char *glXGetScreenDriver(Display * dpy, int scrNum); -extern const char *glXGetDriverConfig(const char *driverName); - #endif +extern const char *glXGetDriverConfig(const char *driverName); + // #define __GL_CLIENT_ATTRIB_STACK_DEPTH 16 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] glx: fix non-dri build
Dylan Baker, on dim. 14 janv. 2018 09:37:49 -0800, wrote: > I don't know enough about glx to know if this is correct, but you'll need to > add the c files to the meson.build as well Oh, mesa now also uses meson. Ok, now commited that to my tree. Samuel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] glx: fix non-dri build
I don't know enough about glx to know if this is correct, but you'll need to add the c files to the meson.build as well On January 13, 2018 3:36:30 AM PST, Samuel Thibaultwrote: >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 makes it provide a NULL-returning stub in non-dri builds. > >Fixes: 84f764a7591 "glxglvnddispatch: Add missing dispatch for >GetDriverConfig" > >--- >Compiling dri_glx.c in non-dri builds might be frowned upon. I'll be >happy to move the glXGetDriverConfig to another file if somebody tells >me which file would be the proper place. >--- > src/glx/Makefile.am | 2 +- > src/glx/dri_glx.c | 11 ++- > src/glx/glxclient.h | 4 ++-- > 3 files changed, 13 insertions(+), 4 deletions(-) > >diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am >index 5448a0907..0ae403403 100644 >--- a/src/glx/Makefile.am >+++ b/src/glx/Makefile.am >@@ -59,6 +59,7 @@ libglx_la_SOURCES = \ > clientinfo.c \ > compsize.c \ > create_context.c \ >+ dri_glx.c \ > eval.c \ > glxclient.h \ > glxcmds.c \ >@@ -123,7 +124,6 @@ libglx_la_SOURCES += \ > dri2_glx.c \ > dri2.h \ > dri2_priv.h \ >- dri_glx.c \ > dri_sarea.h \ > XF86dri.c \ > xf86dri.h \ >diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c >index 5c4346cec..893cb4acd 100644 >--- a/src/glx/dri_glx.c >+++ b/src/glx/dri_glx.c >@@ -32,12 +32,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE >SOFTWARE. > * > */ > >+#include "glxclient.h" >+ > #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) > > #include > #include > #include >-#include "glxclient.h" > #include "xf86dri.h" > #include "dri2.h" > #include "dri_sarea.h" >@@ -1020,4 +1021,12 @@ driCreateDisplay(Display * dpy) >return >base; > } > >+#else /* GLX_DIRECT_RENDERING */ >+ >+_GLX_PUBLIC const char * >+glXGetDriverConfig(const char *driverName) >+{ >+ return NULL; >+} >+ > #endif /* GLX_DIRECT_RENDERING */ >diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h >index f3a36cf10..a1925a5fe 100644 >--- a/src/glx/glxclient.h >+++ b/src/glx/glxclient.h >@@ -169,10 +169,10 @@ extern unsigned dri2GetSwapEventType(Display >*dpy, XID drawable); > */ > extern const char *glXGetScreenDriver(Display * dpy, int scrNum); > >-extern const char *glXGetDriverConfig(const char *driverName); >- > #endif > >+extern const char *glXGetDriverConfig(const char *driverName); >+ >// > > #define __GL_CLIENT_ATTRIB_STACK_DEPTH 16 >-- >2.15.1 > >___ >mesa-dev mailing list >mesa-dev@lists.freedesktop.org >https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] 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 makes it provide a NULL-returning stub in non-dri builds. Fixes: 84f764a7591 "glxglvnddispatch: Add missing dispatch for GetDriverConfig" --- Compiling dri_glx.c in non-dri builds might be frowned upon. I'll be happy to move the glXGetDriverConfig to another file if somebody tells me which file would be the proper place. --- src/glx/Makefile.am | 2 +- src/glx/dri_glx.c | 11 ++- src/glx/glxclient.h | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am index 5448a0907..0ae403403 100644 --- a/src/glx/Makefile.am +++ b/src/glx/Makefile.am @@ -59,6 +59,7 @@ libglx_la_SOURCES = \ clientinfo.c \ compsize.c \ create_context.c \ + dri_glx.c \ eval.c \ glxclient.h \ glxcmds.c \ @@ -123,7 +124,6 @@ libglx_la_SOURCES += \ dri2_glx.c \ dri2.h \ dri2_priv.h \ - dri_glx.c \ dri_sarea.h \ XF86dri.c \ xf86dri.h \ diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c index 5c4346cec..893cb4acd 100644 --- a/src/glx/dri_glx.c +++ b/src/glx/dri_glx.c @@ -32,12 +32,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include "glxclient.h" + #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) #include #include #include -#include "glxclient.h" #include "xf86dri.h" #include "dri2.h" #include "dri_sarea.h" @@ -1020,4 +1021,12 @@ driCreateDisplay(Display * dpy) return >base; } +#else /* GLX_DIRECT_RENDERING */ + +_GLX_PUBLIC const char * +glXGetDriverConfig(const char *driverName) +{ + return NULL; +} + #endif /* GLX_DIRECT_RENDERING */ diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index f3a36cf10..a1925a5fe 100644 --- a/src/glx/glxclient.h +++ b/src/glx/glxclient.h @@ -169,10 +169,10 @@ extern unsigned dri2GetSwapEventType(Display *dpy, XID drawable); */ extern const char *glXGetScreenDriver(Display * dpy, int scrNum); -extern const char *glXGetDriverConfig(const char *driverName); - #endif +extern const char *glXGetDriverConfig(const char *driverName); + // #define __GL_CLIENT_ATTRIB_STACK_DEPTH 16 -- 2.15.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev