[vlc-devel] [PATCH 2/2] opengl: Avoid getting GL symbols directly for GLES to avoid override
Paul Kocialkowski
paul.kocialkowski at bootlin.com
Tue May 22 16:48:41 CEST 2018
Hi,
On Tue, 2018-05-22 at 16:47 +0200, Thomas Guillem wrote:
>
> On Tue, May 22, 2018, at 16:32, Paul Kocialkowski wrote:
> > Since some gl-prefixed functions are common between GLES and GL, it may
> > occur that these symbols get overridden when loading one library after
> > the other. More specifically, it happens when loading video output
> > modules (that use GLES) and the Qt interface (that may use GL instead of
> > GLES) in that order. The video output calls to gl* functions then result
> > in calls to their GL implementations, not GLES (and thus fails because
> > of the missing context).
> >
> > Getting the symbols from the GetSymbol callback of the windowing module
> > ensures that we always get the right symbols.
> >
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski at bootlin.com>
> > ---
> > modules/video_output/opengl/vout_helper.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/modules/video_output/opengl/vout_helper.c b/modules/
> > video_output/opengl/vout_helper.c
> > index 56f5be7bc3..89aa40b802 100644
> > --- a/modules/video_output/opengl/vout_helper.c
> > +++ b/modules/video_output/opengl/vout_helper.c
> > @@ -738,7 +738,7 @@ vout_display_opengl_t
> > *vout_display_opengl_New(video_format_t *fmt,
> >
> > vgl->gl = gl;
> >
> > -#if defined(USE_OPENGL_ES2) || defined(HAVE_GL_CORE_SYMBOLS)
> > +#if defined(HAVE_GL_CORE_SYMBOLS)
>
> Fine with me,
> But I need to test on Android and iOS.
>
> Maybe we can define HAVE_GL_CORE_SYMBOLS for libegl_android_plugin to avoid possible regressions ?
That's definitely fine with me, will craft the next version with that in
mind.
Cheers,
Paul
> > #define GET_PROC_ADDR_CORE(name) vgl->vt.name = gl##name
> > #else
> > #define GET_PROC_ADDR_CORE(name) GET_PROC_ADDR_EXT(name, true)
> > --
> > 2.17.0
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
Paul Kocialkowski, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180522/cf661973/attachment.sig>
More information about the vlc-devel
mailing list