src/libANGLE/renderer/gl/egl/ContextEGL.h


Log

Author Commit Date CI Message
Shahbaz Youssefi 01ee134b 2023-08-02T13:43:36 Revert "GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE" This reverts commit 4e0250f1926d25e39023c4ad7862ed358a0ec4b6. Reason for revert: Chromium change was reverted. crbug.com/1468956 Original change's description: > GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE > > Now that Chromium no longer uses it. > > Bug: angleproject:5509 > Change-Id: Ibb8d9cdc4d67dad77ca50437423b18d81e838203 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4724768 > Reviewed-by: Peng Huang <penghuang@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:5509 Change-Id: Id8143b1715ec8162be9351437fbd34a2aa4c2e00 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4742521 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 4e0250f1 2023-07-27T10:51:07 GL: Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE Now that Chromium no longer uses it. Bug: angleproject:5509 Change-Id: Ibb8d9cdc4d67dad77ca50437423b18d81e838203 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4724768 Reviewed-by: Peng Huang <penghuang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 7ea61cb3 2023-07-23T21:53:50 GL: Complete EGL_ANGLE_external_context_and_surface This change implements two new entry points added for EGL_ANGLE_external_context_and_surface: glAcquireExternalContextANGLE and glReleaseExternalContextANGLE. These functions remove the need to overload eglMakeCurrent for the purposes of syncing to and from the external context. Bug: angleproject:5509 Change-Id: I5d46299ee0c8addaef7066914a8a8aacb0ea2c17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4706027 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Colin Blundell 3625b749 2023-04-27T08:19:05 [ContextEGL] Synchronize state only when first making current ContextEGL::onMakeCurrent() can be called when this context is already current, which introduces complexities for the case where this context is wrapping an external context. This CL ensures that in this case we save state from the native context only when first transitioning this context to be current. To test: Exercise the repro steps in crbug.com/1434657: No assert should go off. Bug: chromium:1434657 Change-Id: I9690a76917fcb6d0fa31361bfbd3766bb6074d41 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4483695 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Auto-Submit: Colin Blundell <blundell@chromium.org>
Colin Blundell cf91a5e6 2023-04-20T09:07:41 [ContextEGL] Restore default FBO ID in onUnmakeCurrent() When making an external context current, ContextEGL sets the default FBO ID to that bound by the external context. However, we don't currently restore it to its previous value (expected to be 0) in onUnmakeCurrent(). Aside from being generally problematic, this specifically causes an assert to go off when later destroying this framebuffer (see the linked bug). This CL adds this restoration. This should be sufficient to resolve the linked bug, as we don't expect ANGLE to process destruction of an external context while it is current due to the GL spec [1]. [1] https://bugs.chromium.org/p/chromium/issues/detail?id=1434315#c6 Bug: chromium:1434315 Change-Id: I6da1880aea4c5245f1506ccc22f92370babd1917 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4451908 Commit-Queue: Geoff Lang <geofflang@chromium.org> Auto-Submit: Colin Blundell <blundell@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Peng Huang 043fcf18 2021-01-07T13:23:57 Support create ANGLE EGLContext from an external EGLContext For Android WebView, Android creates an EGLContext, EGLSurface and FBO, and makeCurrent on them, and then calls WebView draw function to draw the WebView content on the current EGLSurface or binded FBO. So to use ANGLE in WebView, this CL adds a way to create ANGLE EGLContext from an external EGLContext, and save and restore GL state in eglMakeCurrent(). Bug: angleproject:5509 Change-Id: I874986813117f125e23e975ea1adc51ac5b3a631 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2615239 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Jonah Ryan-Davis 96a49a48 2020-10-06T13:34:09 GLX, EGL: Support NV_robustness_video_memory_purge Chrome is showing rendering issues on Linux/Nvidia after returning from the lock screen. This could be related to the fact that Nvidia drivers are not able to guarantee conformance after certain events. By exposing this extension, we can instruct Chrome to reinitialize contexts after they are purged by the driver. If this is not explicitly requested, we can still generate an UnknownContextReset to tell apps to discard the invalid context anyway. Bug: chromium:1113040 Change-Id: Ie99b6356cc27fea33643d61b1d74f4f68a271d70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2453689 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Corentin Wallez 59126651 2020-02-17T09:52:05 Revert "Provide default implementation of rx::DisplayEGL" This reverts commit e82ab75a4ca8f4389a5f23b3a51d9388a92428e2. Reason for revert: crbug.com/1052772 Original change's description: > Provide default implementation of rx::DisplayEGL > > Will allow to use EGL instead of GLX on X11. > > Meant to be used on modern EGL so it requires the extensions > EGL_KHR_no_config_context and EGL_KHR_surfaceless_context. > This keeps the default implementation simple (no pBuffer > fallback) > > Also provide simple WorkerContextEGL. > > Bug: angleproject:4328 > Change-Id: I825c6998e4a3727a13e533ede3d9fb1820edc804 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2031699 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=geofflang@chromium.org,syoussefi@chromium.org,jonahr@google.com,jmadill@chromium.org,julien.isorce@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:4328 Change-Id: I62436cad1e6aae0c5e072acb1dab0bd10b2cf722 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2058952 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Julien Isorce e82ab75a 2020-02-12T13:49:22 Provide default implementation of rx::DisplayEGL Will allow to use EGL instead of GLX on X11. Meant to be used on modern EGL so it requires the extensions EGL_KHR_no_config_context and EGL_KHR_surfaceless_context. This keeps the default implementation simple (no pBuffer fallback) Also provide simple WorkerContextEGL. Bug: angleproject:4328 Change-Id: I825c6998e4a3727a13e533ede3d9fb1820edc804 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2031699 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 859ca039 2019-10-24T12:55:08 Enable "-Wshadow-field". This warning verifies we don't give variables names that shadow fields. This is another good warning to enable that Skia requires. This CL also fixes a small number of points in code that used this bad pattern. We have to disable the warning for Glslang for now. Bug: angleproject:4046 Change-Id: I072a686e3023b60cfafa778525fe712ce1fb5a50 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877476 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0c667215 2019-01-01T14:40:36 Pass ErrorSet to ContextImpl constructor. This removes the need for the setErrorSet method. Also update some egl::Error TODO bugs. Bug: angleproject:2491 Change-Id: I0aba07c4a53b579835a88c3dacae294f752e6b17 Reviewed-on: https://chromium-review.googlesource.com/c/1392393 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c3dc5d48 2018-12-30T12:12:04 Merge gl::Context and gl::ContextState. This reduces the number of indrections when accessing the Extensions or Caps structures. It will provide a small speed-up to some methods. It also cleans up the code. Bug: angleproject:2966 Change-Id: Idddac70758c42c1c2b75c885d0cacc8a5c458685 Reviewed-on: https://chromium-review.googlesource.com/c/1392391 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
Geoff Lang 258e8718 2018-06-21T17:29:19 EGL: Support unvirtualized contexts and unsafe multithreading. -Add a new renderer and context type to own native EGL contexts and handle destruction. -Track the current EGL surface and context per-thread. -Support unvirtualized contexts by creating a new context for every client context. BUG=angleproject:2464 Change-Id: Ib2efa1d88c771b4a78625e0e3546f6ed95678c91 Reviewed-on: https://chromium-review.googlesource.com/1110943 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>