[Mesa-dev] EGL: Question about deferred context and surface destroy

Mike Gorchak mike.gorchak.qnx at gmail.com
Tue Apr 25 19:20:06 UTC 2017


Hi all,

During a quick tests of latest Mesa3D versions at different branches 12.x,
13.x, 17.x we have found that deferred context and surface destroy doesn't
work properly.

According to docs:
https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglDestroySurface.xhtml

Description
If the EGL surface is not current to any thread, eglDestroySurface destroys
it immediately. Otherwise, surface is destroyed when it becomes not current
to any thread. Furthermore, resources associated with a pbuffer surface are
not released until all color buffers of that pbuffer bound to a texture
object have been released.

Same for context destroy:
https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglDestroyContext.xhtml

Description
If the EGL rendering context is not current to any thread,
eglDestroyContext destroys it immediately. Otherwise, context is destroyed
when it becomes not current to any thread.

Should this behavior be handled at EGL common DRI2 level or DRI2 platform
driver level or it should be handled by EGL itself? I can see some
refcounts implemented for EGL surfaces, buteglMakeCurrent seems don't
increment them for surfaces and contexts.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170425/64ac0dce/attachment.html>


More information about the mesa-dev mailing list