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

Neil Roberts neil at linux.intel.com
Fri Oct 4 07:48:03 PDT 2013

Neil Roberts <neil at linux.intel.com> 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 the moment because as far as I
> can tell the gl-renderer immediately queues the buffer release when you
> attach a new one rather than waiting for the swap to actually
> complete.

Thanks to some explanation from Kristian and Pekka I now understand that
this is the expected behaviour. The assumption is that it will be up to
the GL driver or hardware to ensure that GL commands submitted by the
client will be executed after those submitted by the compositor so the
compositor is free to release straight after the eglSwapBuffer call. If the
hardware doesn't just do this naturally then it would still be possible
for a driver's buffer sharing implementation to also transfer fence
objects so that it can ensure these semantics in the driver.

- Neil
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

More information about the wayland-devel mailing list