src/tests/egl_tests/EGLDisplayTest.cpp


Log

Author Commit Date CI Message
Igor Nazarov c95ffadf 2023-07-24T13:00:32 Perform Display terminate(InternalCleanup) from makeCurrent() Current state: - Call to `eglTerminate()` is canceled if there are Contexts current. - All not current Contexts are invalidated in `eglTerminate()` call. - Full Display termination will happen only when last Context is actually destroyed in `eglDestroyContext()` or last active thread terminates (Android only). Problem: - Context is not marked invalid after it is unmade from current when `eglTerminate()` was already called. - If `eglDestroyContext()` was called while context was current, it will be destroyed when unmade from current - in this case actual Display termination will NOT happen. After this change: - Context immediately invalidated after it is unmade from current when `eglTerminate()` was already called. - Full Display termination will happen after the last Context is unmade from current (all Contexts are invalid). Bug: angleproject:6798 Test: angle_end2end_tests --gtest_filter=EGLDisplayTest.ContextLeakAfterTerminate* Change-Id: Idcce94b041649db58d3d879858fba99109347baf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4708328 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jason Macnak 2de99d47 2022-11-17T12:19:35 Reset instance/device extensions in RendererVk::onDestroy() RendererVk::initialize() adds a nullptr to the end of RendererVk::mEnabledInstanceExtensions (presumably to ensure the VK implementation crashes if it tries to read past?). If RendererVk::onDestroy() fails to clear this nullptr, it can lead to a crash when sorting the extension lists when the renderer is re-initialized the second time. Bug: b/249457381 Test: cvd start --gpu_mode=guest_swiftshader Test: EGLDisplayTest.InitalizeTerminateInitalize/ES3_Vulkan_NoFixture Change-Id: Ib24af11024cad6b28284f3a75cc862c48abec258 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4035646 Commit-Queue: Jason Macnak <natsu@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>