[Mesa-maintainers] Recommendations for building Mesa with LIBGLVND support

Kyle Brenneman kbrenneman at nvidia.com
Tue Mar 21 18:16:48 UTC 2017


On 03/21/2017 09:35 AM, Stefan Dirsch wrote:
> On Thu, Mar 16, 2017 at 04:58:18PM +0000, Emil Velikov wrote:
>> That aside:
>>
>>   - build mesa with --enable-glvnd
>> it will produce a libGLX_mesa.so and the usual "conflicting" libGLES*
>> and libEGL files.
>>   - former is fine, while for the latter you'll need your current workaround(s).
> I guess I misunderstood that a bit. ;-) With former you've likely meant
>
>    * it will produce a libGLX_mesa.so
>
> with latter
>
>    * the usual "conflicting" libGLES* and libEGL files
>
> The conflicting libEGL files issue has been addressed by a NVIDIA employee
> apparently: Kyle Brenneman <kbrenneman at nvidia.com>
>
>    https://lists.freedesktop.org/archives/mesa-dev/2017-January/139578.html
>    https://lists.freedesktop.org/archives/mesa-dev/2017-January/139727.html
>
> Not upstreamed yet, but received at least a reviewed by
>
>    Adam Jackson <ajax at redhat.com>
>
> in January after after Dylan Baker reviewed the patch already in September
>
>    https://lists.freedesktop.org/archives/mesa-dev/2016-September/128716.html
>
> I've applied both patches and it apparently fixes the libEGL conflict issue
> for me. If I understood correctly you planned to add NVIDIA's libglvnd EGL
> support to Mesa 17.1 - after polishing it.
>
> So what's missing is GLES support for libglvnd builds in Mesa. At least this
> is my understanding with NVIDIA and maybe also other vendors replacing these
> libs with theirs.
>
> Adding NVIDIA at this point. Kyle and Daniel. Hope that's ok.
>
> Thanks,
> Stefan
>
> Public Key available
> ------------------------------------------------------
> Stefan Dirsch (Res. & Dev.)   SUSE LINUX GmbH
> Tel: 0911-740 53 0            Maxfeldstraße 5
> FAX: 0911-740 53 479          D-90409 Nürnberg
> http://www.suse.de            Germany
> ---------------------------------------------------------------
> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham
> Norton, HRB 21284 (AG Nürnberg)
> ---------------------------------------------------------------

Ah, I'd forgotten to address libGLES* in my EGL patch.

As far as I can tell, the libGLES libraries in Mesa are just dispatch 
stubs, and nothing within Mesa depends on them. That is, if an 
application looked up every GLES function using eglGetProcAddress, then 
you could remove the libGLES*.so libraries entirely and it would still 
run fine.

If that's true, then a libglvnd-based build of Mesa could just skip 
building the libGLES*.so libraries, because libglvnd basically does look 
up every GLES function through the vendor library's eglGetProcAddress.

-Kyle



More information about the Mesa-maintainers mailing list