Commit 959ccb9630a9aad1737b9c3146aafd7891774bd8

Igor Nazarov 2023-08-02T13:40:16

Add EGL_BAD_ACCESS validation into ValidateMakeCurrent Current code does not generate EGL_BAD_ACCESS in `eglMakeCurrent()` according to the specification: - If context is current to some other thread, or if either draw or read are bound to contexts in another thread, an EGL_BAD_ACCESS error is generated. Additional changes: - replace `Context::getRefCount()` with `isReferenced()` for consistency with added `Surface::isReferenced()` method. - remove duplicate `ValidateSurface` call for the `drawSurface` in case if `readSurface` is the same. - remove duplicate `ValidateCompatibleSurface()` call for the `readSurface` in case if `drawSurface` is different. - Fix EGLContextASANTest.DestroyContextInUse test. - Fix EGLContextSharingTestNoSyncTextureUploads.NoSync test. Bug: angleproject:8282 Change-Id: I2af0d7f50019c2445b42279bdd0e0197dd8ad20f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742382 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>