Hi Zhongmin Wu,

Above all, a bit of a disclaimer: I'm by no means an expert on the
topic so take the following with a pinch of salt.

On 10 July 2017 at 03:11, Zhongmin Wu <zhongmin...@intel.com> wrote:
> Before we queued the buffer with a invalid fence (-1), it will
> make some benchmarks failed to test such as flatland.
>
> Now we get the out fence during the flushing buffer and then pass
> it to SurfaceFlinger in eglSwapbuffer function.
>
Having a closer look it seems that the issue can be summarised as follows:
 - flatland intercepts/interacts ANativeWindow::{de,}queueBuffer (how
about ANativeWindow::cancelBuffer?)
 - the program expects that a sync fd is available for both dequeue and queue

At the same time:
 - the ANativeWindow documentation does _not_ state such requirement
 - even if it did, that will be somewhat wrong, since
ANativeWindow::queueBuffer is called by eglSwapBuffers()
Where the latter documentation clearly states - "... performs an
implicit flush ... glFlush ... vgFlush"

My take is that if flatland/Android framework does want an explicit
sync point it should insert one with the EGL API.
There could be alternative solutions, but the proposed patch seems wrong IMHO.

Regards,
Emil
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to