[PATCH weston] gl-renderer: allow EGL_NATIVE_VISUAL_ID to be 0 in configs
Bryce Harrington
bryce at osg.samsung.com
Sat Nov 7 13:40:18 PST 2015
On Wed, Nov 04, 2015 at 10:16:27PM +0100, Manuel Bachmann wrote:
> Hi Derek, and thanks for your answer,
>
> You are right, maybe we could search a config with matching visual_id, and
> if one does not exist, then fallback to a "0" config.
>
> I can rework the patch to do this ; but if you already started working on a
> new one, I will wait and be happy to test it :).
Thanks for reviewing derek's patch
> PS : it is Mesa 10.3.7.
>
>
>
> Regards,
>
> *Manuel Bachmann, Graphics Engineer www.iot.bzh <http://iot.bzh> *
>
>
> 2015-11-04 21:45 GMT+01:00 Derek Foreman <derekf at osg.samsung.com>:
>
> > On 04/11/15 01:44 PM, Bryce Harrington wrote:
> > > On Wed, Nov 04, 2015 at 02:57:11PM +0100, Manuel Bachmann wrote:
> > >> Accept 0 as a valid value for the EGL_NATIVE_VISUAL_ID
> > >> attribute in EGL configurations, just as we did before
> > >> commit e76f185.
> > >>
> > >> (fixes running Weston with DRM backend and gl-renderer
> > >> on Lenovo ThinkPad with i915 driver)
> > >>
> > >> Signed-off-by: Manuel Bachmann <manuel.bachmann at iot.bzh>
> > >
> > > Confirmed; the code prior to that refactor was allowing id == 0 through.
> > >
> > > Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
> > > Cc: Derek Foreman <derekf at osg.samsung.com>
> > >
> > >> ---
> > >> src/gl-renderer.c | 2 +-
> > >> 1 file changed, 1 insertion(+), 1 deletion(-)
> > >>
> > >> diff --git a/src/gl-renderer.c b/src/gl-renderer.c
> > >> index d7231f4..85c69f3 100644
> > >> --- a/src/gl-renderer.c
> > >> +++ b/src/gl-renderer.c
> > >> @@ -2194,7 +2194,7 @@ match_config_to_visual(EGLDisplay egl_display,
> > >> &id))
> > >> continue;
> > >>
> > >> - if (id == visual_id)
> > >> + if (id == 0 || id == visual_id)
> >
> > I think this could potentially pick the wrong id on some systems?
> >
> > Seems like it's theoretically possible for visuals with a native id of 0
> > to be tested before the ones with legitimate ids... I think we should
> > always prefer a visual with a matching id if at all possible.
> >
> > Just out of curiosity, what version of Mesa are you using?
> >
> > I'll post an alternative patch shortly - I can't reproduce your bug, so
> > it'd be great if you could try it...
> >
> > >> return i;
> > >> }
> > >>
> > >> --
> > >> 1.8.3.1
> > >>
> > >> _______________________________________________
> > >> wayland-devel mailing list
> > >> wayland-devel at lists.freedesktop.org
> > >> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> >
> >
More information about the wayland-devel
mailing list