<div dir="ltr">Hello Kristian,<div>I'm don't using mesa, we have a Vivante driver stack on imx6 which also uses a proprietary wayland protocol to send a buffer to the compositor</div><div>and it's EGL implementation don't creates a separate event queue it uses the main wayland display queue and will call wl_display_dispatch function.</div>
<div>But thanks for the hint, i suppose the current mesa implementation should answer all my questions above.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/21 Kristian Høgsberg <span dir="ltr"><<a href="mailto:krh@bitplanet.net" target="_blank">krh@bitplanet.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sat, Oct 19, 2013 at 10:31 AM, Eugen Friedrich <<a href="mailto:friedrix@gmail.com">friedrix@gmail.com</a>> wrote:<br>
> Ok! this sounds very promising this should decouple the rendering thread<br>
> and the input handling thread.<br>
> so i can set to the wl_seat client object a new queue and then pass this<br>
> queue to wl_display_dispatch_queue call in the input thread.<br>
><br>
> but one question to this: the documentation of wl_display_dispatch_queue<br>
> says:<br>
> "For other threads this will block until the main thread queues events on<br>
> the queue passed as argument."<br>
><br>
> So will pass the events in the queue or how to achieve this it the second<br>
> thread( rendering thread is sleeping)??<br>
><br>
> In my use case the input thread should wake up when input event arrives from<br>
> the compositor also when all other thread of the client are idle.<br>
<br>
</div>None of this should be necessary. The EGL implementation already uses<br>
its own queue (if your mesa is new enough) and should be able to loop<br>
all by itself without the main event queue being processed. You can<br>
still use a custom queue for your input events, but if you only care<br>
about separating EGL into a separate thread, you shouldn't need to do<br>
anything.<br>
<span class="HOEnZb"><font color="#888888"><br>
Kristian<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> 2013/10/19 Giulio Camuffo <<a href="mailto:giuliocamuffo@gmail.com">giuliocamuffo@gmail.com</a>><br>
>><br>
>> You can move a client-side wayland object to a queue using the function<br>
>> void wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue<br>
>> *queue).<br>
>> All the client-side objects are really wl_proxy, so you can safely cast<br>
>> them.<br>
>> If you move to a queue an object which creates new objects and<br>
>> dispatches them through<br>
>> an event those objects will be in the same queue too.<br>
>><br>
>><br>
>> 2013/10/18 Eugen Friedrich <<a href="mailto:friedrix@gmail.com">friedrix@gmail.com</a>>:<br>
>> > Hallo Giulio,<br>
>> > thanks a lot for the fast replay.<br>
>> ><br>
>> > if my understanding is correct the frame callbacks and the input<br>
>> > handling<br>
>> > events are coming from the compositor to the main wayland display queue<br>
>> > on<br>
>> > the client side.<br>
>> > So how i can get the different queues on the client site or is there a<br>
>> > possibility to get a separate queue for input events?<br>
>> ><br>
>> ><br>
>> > 2013/10/18 Giulio Camuffo <<a href="mailto:giuliocamuffo@gmail.com">giuliocamuffo@gmail.com</a>><br>
>> >><br>
>> >> Oh, I sent my mail before the second one arrived.<br>
>> >><br>
>> >> Yeah, you need to use different wl_event_queues, and the relative<br>
>> >> functions like<br>
>> >> wl_display_dispatch_queue.<br>
>> >><br>
>> >> 2013/10/18 Giulio Camuffo <<a href="mailto:giuliocamuffo@gmail.com">giuliocamuffo@gmail.com</a>>:<br>
>> >> > And what is it that doesn't work? As a wild bet I'd say you probably<br>
>> >> > want to look at wl_event_queue.<br>
>> >> > See<br>
>> >> ><br>
>> >> > <a href="http://wayland.freedesktop.org/docs/html/chap-Library.html#sect-Library-Client" target="_blank">http://wayland.freedesktop.org/docs/html/chap-Library.html#sect-Library-Client</a><br>
>> >> ><br>
>> >> > Giulio<br>
>> >> ><br>
>> >> > 2013/10/18 Eugen Friedrich <<a href="mailto:friedrix@gmail.com">friedrix@gmail.com</a>>:<br>
>> >> >> Hallo dear Wayland developer,<br>
>> >> >><br>
>> >> >> I thing i have a very common use case and currently i don't now how<br>
>> >> >> to<br>
>> >> >> get<br>
>> >> >> it work in wayland.<br>
>> >> >><br>
>> >> >> We have a wayland client application with 2 threads:<br>
>> >> >><br>
>> >> >> thread1 - rendering thread - the eglSwapbuffer will call<br>
>> >> >> wl_display_dispatch internally:<br>
>> >> >> thread2 - input thread - this should wait for wayland input events<br>
>> >> >><br>
>> >> >><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" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
>> >> >><br>
>> ><br>
>> ><br>
><br>
><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" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
><br>
</div></div></blockquote></div><br></div>