Re: [Mesa-dev] [PATCH 3/3] meson: Only GLX_USE_TLS when glx is in use
Quoting Dylan Baker (2018-02-20 10:09:53) > Quoting Alexander von Gluck IV (2018-02-19 10:24:43) > > --- > > meson.build | 5 - > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/meson.build b/meson.build > > index 6fc7ec7fc9..54572a5bb8 100644 > > --- a/meson.build > > +++ b/meson.build > > @@ -331,7 +331,6 @@ if with_egl and not (with_platform_drm or > > with_platform_surfaceless) > >endif > > endif > > > > -pre_args += '-DGLX_USE_TLS' > > if with_glx != 'disabled' > >if not (with_platform_x11 and with_any_opengl) > > if with_glx == 'auto' > > @@ -365,6 +364,10 @@ if with_glvnd > >endif > > endif > > > > +if with_glx != 'disabled' > > + pre_args += '-DGLX_USE_TLS' > > +endif > > Can we fold this into the above "if with_glx != 'disabled'" check? > > With that fixed this patch is: > Reviewed-by: Dylan Baker> > Dylan I really should read patch series in backwards order... Emil's evaluation of the situation is spot on, so please do that instead. Dylan signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/3] meson: Only GLX_USE_TLS when glx is in use
Quoting Alexander von Gluck IV (2018-02-19 10:24:43) > --- > meson.build | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/meson.build b/meson.build > index 6fc7ec7fc9..54572a5bb8 100644 > --- a/meson.build > +++ b/meson.build > @@ -331,7 +331,6 @@ if with_egl and not (with_platform_drm or > with_platform_surfaceless) >endif > endif > > -pre_args += '-DGLX_USE_TLS' > if with_glx != 'disabled' >if not (with_platform_x11 and with_any_opengl) > if with_glx == 'auto' > @@ -365,6 +364,10 @@ if with_glvnd >endif > endif > > +if with_glx != 'disabled' > + pre_args += '-DGLX_USE_TLS' > +endif Can we fold this into the above "if with_glx != 'disabled'" check? With that fixed this patch is: Reviewed-by: Dylan BakerDylan signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/3] meson: Only GLX_USE_TLS when glx is in use
February 19, 2018 3:00 PM, "Emil Velikov"wrote: > On 19 February 2018 at 18:40, Alexander von Gluck IV >> Thanks to Dylan for figuring this one out. >> >> This was discussed previously on the ML >> " >> This can be applied to all GLX implementations, and in autotools this is >> guarded only by the --enable-glx-tls flag. Since this is on by default >> in autotools, and is strictly better than being off, the meson build >> doesn't even have a toggle for it. >> " >> >> Since the GLX_USE_TLS reaches beyond GLX, i'm guarding it with_glx after >> the glx auto-detection tri-state (which can disable it) > > Note: the GLX in the name is for historical purposes - toggle applies > to glapi and the way one (GLX, EGL and DRI modules in particular) > makes use of it. > > That said - we had serious issues with people tinkering with the > toggle, so Dylan's decision of omit it is spot on. > For Haiku, I would suggest the following: > - open a bug/other issue about the missing static TLS support > - set the macro for non-haiku platforms, with a clear reference to > the above report. Ah. Yup, just found an enhancement for it: https://dev.haiku-os.org/ticket/13294 I'll adjust to be a Haiku check and notate that ticket. -- Alex ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/3] meson: Only GLX_USE_TLS when glx is in use
On 19 February 2018 at 18:40, Alexander von Gluck IVwrote: > February 19, 2018 12:25 PM, "Alexander von Gluck IV" > wrote: > >> --- >> meson.build | 5 - >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/meson.build b/meson.build >> index 6fc7ec7fc9..54572a5bb8 100644 >> --- a/meson.build >> +++ b/meson.build >> @@ -331,7 +331,6 @@ if with_egl and not (with_platform_drm or >> with_platform_surfaceless) >> endif >> endif >> >> -pre_args += '-DGLX_USE_TLS' >> if with_glx != 'disabled' >> if not (with_platform_x11 and with_any_opengl) >> if with_glx == 'auto' >> @@ -365,6 +364,10 @@ if with_glvnd >> endif >> endif >> >> +if with_glx != 'disabled' >> + pre_args += '-DGLX_USE_TLS' >> +endif >> + >> # TODO: toggle for this >> with_glx_direct = true > > Some comments on this one. I was seeing problems loading static TLS binaries > on Haiku, turns out GLX_USE_TLS impacts more than just GLX. I'm guessing our > (non-glx) libGL.so is getting it via libglapi linkages. > > https://kallisti5.keybase.pub/Screenshots/meson_build_tls.png > > Thanks to Dylan for figuring this one out. > > This was discussed previously on the ML > " > This can be applied to all GLX implementations, and in autotools this is > guarded only by the --enable-glx-tls flag. Since this is on by default > in autotools, and is strictly better than being off, the meson build > doesn't even have a toggle for it. > " > > Since the GLX_USE_TLS reaches beyond GLX, i'm guarding it with_glx after > the glx auto-detection tri-state (which can disable it) > > Note: the GLX in the name is for historical purposes - toggle applies to glapi and the way one (GLX, EGL and DRI modules in particular) makes use of it. That said - we had serious issues with people tinkering with the toggle, so Dylan's decision of omit it is spot on. For Haiku, I would suggest the following: - open a bug/other issue about the missing static TLS support - set the macro for non-haiku platforms, with a clear reference to the above report. > I noticed under Fedora the Meson-built libGL differs from the system's > in terms of TLS.. not sure if relevant (or an issue) > There are a few features missing from the Meson build so I wouldn't be too surprised. For now I'd call it a non-issue ;-) -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 3/3] meson: Only GLX_USE_TLS when glx is in use
February 19, 2018 12:25 PM, "Alexander von Gluck IV"wrote: > --- > meson.build | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/meson.build b/meson.build > index 6fc7ec7fc9..54572a5bb8 100644 > --- a/meson.build > +++ b/meson.build > @@ -331,7 +331,6 @@ if with_egl and not (with_platform_drm or > with_platform_surfaceless) > endif > endif > > -pre_args += '-DGLX_USE_TLS' > if with_glx != 'disabled' > if not (with_platform_x11 and with_any_opengl) > if with_glx == 'auto' > @@ -365,6 +364,10 @@ if with_glvnd > endif > endif > > +if with_glx != 'disabled' > + pre_args += '-DGLX_USE_TLS' > +endif > + > # TODO: toggle for this > with_glx_direct = true Some comments on this one. I was seeing problems loading static TLS binaries on Haiku, turns out GLX_USE_TLS impacts more than just GLX. I'm guessing our (non-glx) libGL.so is getting it via libglapi linkages. https://kallisti5.keybase.pub/Screenshots/meson_build_tls.png Thanks to Dylan for figuring this one out. This was discussed previously on the ML " This can be applied to all GLX implementations, and in autotools this is guarded only by the --enable-glx-tls flag. Since this is on by default in autotools, and is strictly better than being off, the meson build doesn't even have a toggle for it. " Since the GLX_USE_TLS reaches beyond GLX, i'm guarding it with_glx after the glx auto-detection tri-state (which can disable it) I noticed under Fedora the Meson-built libGL differs from the system's in terms of TLS.. not sure if relevant (or an issue) meson-compiled HEAD: $ readelf -a ./src/glx/libGL.so | grep TLS L (link order), O (extra OS processing required), G (group), T (TLS), TLS0x00068d68 0x00268d68 0x00268d68 0x001e (FLAGS) SYMBOLIC STATIC_TLS 214: 0 TLS GLOBAL DEFAULT UND _glapi_tls_Dispatch 934: 8 TLS LOCAL DEFAULT 17 __glX_tls_Context 2900: 0 TLS GLOBAL DEFAULT UND _glapi_tls_Dispatch mesa-libGL-17.2.4-3.fc27.x86_64: $ readelf -a /usr/lib/libGL.so.1.0.0 | grep TLS L (link order), O (extra OS processing required), G (group), T (TLS), 0x001e (FLAGS) BIND_NOW STATIC_TLS 0005fff4 110e R_386_TLS_TPOFF _glapi_tls_Current 17: 0 TLS GLOBAL DEFAULT UND _glapi_tls_Current -- Alex ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/3] meson: Only GLX_USE_TLS when glx is in use
--- meson.build | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 6fc7ec7fc9..54572a5bb8 100644 --- a/meson.build +++ b/meson.build @@ -331,7 +331,6 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless) endif endif -pre_args += '-DGLX_USE_TLS' if with_glx != 'disabled' if not (with_platform_x11 and with_any_opengl) if with_glx == 'auto' @@ -365,6 +364,10 @@ if with_glvnd endif endif +if with_glx != 'disabled' + pre_args += '-DGLX_USE_TLS' +endif + # TODO: toggle for this with_glx_direct = true -- 2.14.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev