<div dir="ltr"><div><div><div>Hi Derek, and thanks for your answer,<br><br></div>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.<br><br></div><div>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 :). <br></div><div><br></div>PS : it is Mesa 10.3.7.<br><br></div><div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Regards,<br><span><div><div dir="ltr"><span><font color="#888888"><div><i><small>Manuel Bachmann, Graphics Engineer<br>
<a href="http://iot.bzh" target="_blank"> www.iot.bzh</a>
</small></i></div>
</font></span><div>
</div></div></div></span><br></div></div></div>
<br><div class="gmail_quote">2015-11-04 21:45 GMT+01:00 Derek Foreman <span dir="ltr"><<a href="mailto:derekf@osg.samsung.com" target="_blank">derekf@osg.samsung.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 04/11/15 01:44 PM, Bryce Harrington wrote:<br>
> On Wed, Nov 04, 2015 at 02:57:11PM +0100, Manuel Bachmann wrote:<br>
>> Accept 0 as a valid value for the EGL_NATIVE_VISUAL_ID<br>
>> attribute in EGL configurations, just as we did before<br>
>> commit e76f185.<br>
>><br>
>> (fixes running Weston with DRM backend and gl-renderer<br>
>> on Lenovo ThinkPad with i915 driver)<br>
>><br>
>> Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh><br>
><br>
> Confirmed; the code prior to that refactor was allowing id == 0 through.<br>
><br>
> Reviewed-by: Bryce Harrington <<a href="mailto:bryce@osg.samsung.com">bryce@osg.samsung.com</a>><br>
> Cc: Derek Foreman <<a href="mailto:derekf@osg.samsung.com">derekf@osg.samsung.com</a>><br>
><br>
>> ---<br>
>> src/gl-renderer.c | 2 +-<br>
>> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
>><br>
>> diff --git a/src/gl-renderer.c b/src/gl-renderer.c<br>
>> index d7231f4..85c69f3 100644<br>
>> --- a/src/gl-renderer.c<br>
>> +++ b/src/gl-renderer.c<br>
>> @@ -2194,7 +2194,7 @@ match_config_to_visual(EGLDisplay egl_display,<br>
>> &id))<br>
>> continue;<br>
>><br>
>> - if (id == visual_id)<br>
>> + if (id == 0 || id == visual_id)<br>
<br>
</span>I think this could potentially pick the wrong id on some systems?<br>
<br>
Seems like it's theoretically possible for visuals with a native id of 0<br>
to be tested before the ones with legitimate ids... I think we should<br>
always prefer a visual with a matching id if at all possible.<br>
<br>
Just out of curiosity, what version of Mesa are you using?<br>
<br>
I'll post an alternative patch shortly - I can't reproduce your bug, so<br>
it'd be great if you could try it...<br>
<div class="HOEnZb"><div class="h5"><br>
>> return i;<br>
>> }<br>
>><br>
>> --<br>
>> 1.8.3.1<br>
>><br>
>> _______________________________________________<br>
>> wayland-devel mailing list<br>
>> <a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
>> <a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
<br>
</div></div></blockquote></div><br></div>