[Mesa-dev] Mesa commit a5e733c

Rob Clark robdclark at gmail.com
Wed Dec 21 19:42:17 UTC 2016


On Wed, Dec 21, 2016 at 12:32 PM, Charmaine Lee <charmainel at vmware.com> wrote:
>
> Hi Rob,
>
> Your mesa commit a5e733c mesa: drop current draw/read buffer when ctx is released
> is causing rendering issue when running with vmware svga driver.
>
> The problem is when the winsys draw/read buffers are unreferenced, the whole object
> including the underlying resource can be prematurely destroyed. When the buffers are bound
> to a context again, the whole object hierarchy is recreated but we already lost the previous
> content, hence causing rendering corruption.

It's possible perhaps that something else needs to be holding a
reference to the corresponding EGL level object?  IIRC the EGL level
object was freed but not mesa/st level object, leading to new EGL
surface being allocated w/ same ptr address and confusing mesa/st.
Which *definitely* seems wrong.

> I believe the winsys draw/read buffers are purposely there to be not unreferenced at
> context unbind time. There are timestamps in st_framebuffer and st_framebuffer_iface
> to keep track of when the frame buffer needs to be re-validated. Could it be
> somehow those stamps are out-of-sync in your case? Is there a better fix
> to your original problem?

*Maybe* but I don't totally understand how the timestamp thing is
expected to work.  But it is already a couple months ago that I was
debugging it and I won't really have the android setup again for a
while.

But somehow we either need to hold reference to the EGL surface while
we have a ptr to it or drop the reference so we don't have a stale ptr
that we can be confused by after a new EGL surface is created.

BR,
-R

>
> -Charmaine


More information about the mesa-dev mailing list