[vlc-devel] [PATCH 1/2] egl: Import GLES symbols with a direct library dlopen
Rémi Denis-Courmont
remi at remlab.net
Tue May 22 17:52:27 CEST 2018
Le tiistaina 22. toukokuuta 2018, 18.35.45 EEST Thomas Guillem a écrit :
> On Tue, May 22, 2018, at 17:19, Rémi Denis-Courmont wrote:
> > Le tiistaina 22. toukokuuta 2018, 18.08.14 EEST Thomas Guillem a écrit :
> > > VLC uses eglGetProcAddress() to fetch core symbols.
> >
> > There are no such bugs in the EGL plugin AFAICT.
> >
> > There are a lot potential of issues in the GL(ES) plugin though.
> > GET_PROC_ADDR_CORE() seems counter-sensical.
>
> OK, the culprit is
> http://git.videolan.org/?p=vlc.git;a=commit;h=744ac6ec380ef07db7cb6f6ed07d4
> c9ba9708798 then
>
> We should not use eglGetProcAddress() to fetch core symbols but
> dlopen+dlsym.
No. There are no portable ways to get dlsym() in the dependent libraries.
POSIX specifies no such thing. Linux has no such thing (neither RTLD_DEFAULT
nor RTLD_NEXT match). FreeBSD seems to have something (NULL) but who cares.
The simplest solution is to check for GLX_ARB_get_proc_address v1.1 or
EGL_KHR_get_all_proc_addresses respectively.
If you give a damn about the non-extended clients, then you need to reference
the symbols directly in the GL provider. It will be tedious and so I must
advise against it.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list