Re: [PATCH v2] Post buffer release events instead of queue when no frame callback

2013-10-04 Thread Neil Roberts
Neil Roberts writes: > I think that would mean you could cause tearing if you are using > eglSwapInterval(0) because you could write into the released buffer > while the GPU is actually still rendering the previous frame using the > buffer in a texture. > > I think this doesn't actually happen at

Re: [PATCH v2] Post buffer release events instead of queue when no frame callback

2013-10-03 Thread Jason Ekstrand
Neil, After further consideration, I think your approach is exactly what we need. Not only are there more possible (backend-dependant) release algorithms than the two I listed but determining whether to queue or post may be more complicated. For instance, if a frame is offscreen it may have frame c

Re: [PATCH v2] Post buffer release events instead of queue when no frame callback

2013-10-02 Thread Jason Ekstrand
On Oct 2, 2013 10:06 AM, "Neil Roberts" wrote: > > I don't think this function would help in cases where the buffer is > released after the frame is drawn but the compositor is not drawing > anything else. Ie, if the events were like this: > > 1 - client attaches a buffer and waits for the next re

Re: [PATCH v2] Post buffer release events instead of queue when no frame callback

2013-10-02 Thread Neil Roberts
I don't think this function would help in cases where the buffer is released after the frame is drawn but the compositor is not drawing anything else. Ie, if the events were like this: 1 - client attaches a buffer and waits for the next release 2 - compositor redraws a frame 3 - the redraw complet

Re: [PATCH v2] Post buffer release events instead of queue when no frame callback

2013-10-02 Thread Jason Ekstrand
All, Perhaps a simpler approach would be better. We could add a function to wayland-server called wl_client_post_event_queue which would simply set the wants_flush flag on the client connection. This function would be fast ,require no I/O, and safe to call multiple times so Weston could simply cal

Re: [PATCH v2] Post buffer release events instead of queue when no frame callback

2013-09-25 Thread Tomeu Vizoso
On 16 September 2013 17:28, Neil Roberts wrote: > > Here is a second version of the patch to do the posting. It makes the > patch for doing the queue disabling redundant. > Have done some testing on the RPi and this patch allows me not having to sync in a loop while waiting for buffer releases i

Re: [PATCH v2] Post buffer release events instead of queue when no frame callback

2013-09-17 Thread Pekka Paalanen
On Mon, 16 Sep 2013 16:28:31 +0100 Neil Roberts wrote: > Pekka Paalanen wrote: > > > Instead of all this, could you not have made Weston simply use > > wl_resource_post_event() instead of wl_resource_queue_event()? > > Yes, posting the event rather than queuing it when there are no frame > call

[PATCH v2] Post buffer release events instead of queue when no frame callback

2013-09-16 Thread Neil Roberts
Pekka Paalanen wrote: > Instead of all this, could you not have made Weston simply use > wl_resource_post_event() instead of wl_resource_queue_event()? Yes, posting the event rather than queuing it when there are no frame callbacks (is that what you meant?) is a lot simpler than having the queue