Files
godot-angle-static/include
Yuxin Hu 497440cdcb Make egl surface uncurrent when being destroyed
This is to workaround errors when app does below behaviors:

1) while there is a context still bound to the current
rendering thread and the surface, call eglDestroySurface()
2) create a new surface eglCreateWindowSurface()
3) call eglMakeCurrent() with the surface created in step 2)
4) does work on the new surface

The old surface won't be destroyed in step 1) because
it was still bound by the context of the current rendering
thread. When creating new surface on step 2), some hardware
will return error code EGL_BAD_ALLOC, because the old egl
surface is still associated with the native window.

To workaround, when destroying surface, if the surface
is still bound by the context of the current rendering
thread, release the context and surface by passing
EGL_NO_CONTEXT and EGL_NO_SURFACE to eglMakeCurrent().

The workaround is controlled by a frontend feature
uncurrentEglSurfaceUponSurfaceDestroy. This feature
is only enabled on vulkan and gl backends.

Bug: b/292285899
Change-Id: I872d2e116ba6860f58d1176f011a5ef7c5a5af4e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851255
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Yuxin Hu <yuxinhu@google.com>
2023-09-13 01:08:41 +00:00
..
2021-10-07 06:08:03 +00:00
2023-08-29 21:28:42 +00:00
2021-04-07 12:30:01 +00:00
2021-04-07 12:30:01 +00:00
2021-02-24 15:38:53 +00:00