Introduction and updates from NVIDIA

Daniel Stone daniel at fooishbar.org
Wed Apr 6 12:14:26 UTC 2016


Hi,

On 6 April 2016 at 09:41, Jonas Ã…dahl <jadahl at gmail.com> wrote:
> On Mon, Apr 04, 2016 at 04:27:56PM +0100, Daniel Stone wrote:
>> Again this comes down to the synchronisation. In this case, assuming a
>> mailbox stream:
>>   - wl_egl_surface_resize(w1, h1)
>>   - gl*()
>>   - eglSwapBuffers() <- commit 1
>>   - wl_egl_surface_resize(w2, h2)
>>   - gl*()
>>   - eglSwapBuffers() <- commit 2
>>
>> For this, you would need some kind of synchronisation, to ensure that
>> processing commit 1 didn't pick up on the differently-sized frames for
>> commit 2.
>
> Just to point out the obvious, using wl_egl_surface_resize as a
> barrier/separator/synchronization-triggerer is not enough for this. The
> mailbox vs FIFO mode needs to be tightly coupled with subsurface
> asynchronous/synchronous mode. For example, ignoring the resize calls
> in the above code, commit 1 and commit 2 might have drawn UI elements
> that are expected to be aligned with subsurface that were moved.

Yep, subsurface in particular. It sounds like FIFO mode will DTRT with
some adjustments to the patches, but I just can't for the life of me
see how mailbox mode would work properly in all cases. You'd really
need some kind of explicit synchronisation barriers with the
compositor in order to determine when it was safe to replace one frame
with a newer frame.

Cheers,
Daniel


More information about the wayland-devel mailing list