[Mesa-dev] [PATCH] Revert "wayland: Block for the frame callback in get_back_bo not dri2_swap_buffers"

Derek Foreman derekf at osg.samsung.com
Wed Nov 9 19:48:06 UTC 2016


On 31/10/16 09:30 AM, Daniel Stone wrote:
> On 24 October 2016 at 20:42, Daniel Stone <daniels at collabora.com> wrote:
>> This reverts commit 25cc889004aad6d1cab9edd76db898658e347b97, though
>> since the code has changed, it was applied manually.
>>
>> The intent of moving blocking from SwapBuffers to get_back_bo, was to
>> avoid unnecessary triple-buffering by ensuring that the compositor had
>> fully processed the previous frame before we started rendering. This
>> means that the only time we would have to resort to triple-buffering
>> would be when the buffer is directly scanned out, thus saving an extra
>> buffer for composition anyway.
>>
>> The 'repaint window' changes introduced in Weston since then, however,
>> have narrowed the window of time between the frame event being sent and
>> the repaint loop needing to conclude, to 7ms by default, in order to
>> reduce latency. This means however that blocking in get_back_bo gives a
>> maximum of 7ms for the entire GL submission to begin and complete.
>>
>> Not only this, but if a client is using buffer_age to avoid full
>> repaints, the buffer-age request will stall in get_back_bo until the
>> frame callback completes, meaning that the client cannot even calculate
>> the repaint area before the 7ms window.
>>
>> The combination of the two meant that WebKit-GTK+ was failing to
>> achieve full framerate on a Minnowboard, due to spending a great deal of
>> its time attempting to query the age of the next buffer before redraw.
>>
>> Revert to the previous behaviour of allowing rendering to begin but
>> delaying SwapBuffers, unless and until we can find a more gentle
>> behaviour.
>
> Ping - adding a couple more CCs.

This looks correct to me.  I've done some testing with weston and 
enlightenment and various EFL clients, and note no regressions.

Reviewed-by: Derek Foreman <derekf at osg.samsung.com>
Tested-by: Derek Foreman <derekf at osg.samsung.com>

Thanks,
Derek

> Cheers,
> Daniel
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>



More information about the mesa-dev mailing list