src/libANGLE/renderer/gl/egl/DisplayEGL.cpp


Log

Author Commit Date CI Message
Geoff Lang b6e2e8a0 2021-11-16T13:13:14 GL: Fix share groups for display texture sharing. Chrome uses display-level texture share groups for WebGL contexts. When this extension is in use, make sure all internal contexts are created in the same share group. Bug: chromium:1268830, chromium:1268389, chromium:1268218 Change-Id: I3925dffb9bb23fbbc7adcd3bee8cd62323b993e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3285213 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang d2c01d2c 2021-09-17T12:57:14 GL: Allow selecting virtualization groups at context creation Rewrite EGL_ANGLE_platform_angle_context_virtualization to EGL_ANGLE_context_virtualization, changing the context virtualization parameter to an identifier for what virtualization group the frontend context should be added to. This allows ANGLE's GL backend to be used by multiple threads if the user creates contexts with different virtualization groups. Bug: angleproject:6406 Change-Id: I7414d4705ce10bdf63a9b824043d5dd040dad875 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3169193 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4e22c2c3 2021-01-19T12:42:38 EGL: Merge DisplayAndroid/Gmb into DisplayEGL. These classes classes have a lot of duplicated code for no reason. DisplayGmb still needs more work. Bug: angleproject:5563 Change-Id: Ia3d3d7f0bd7c03b4ac1aece4369c49118426b9de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3140498 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Maksim Sisov <msisov@igalia.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jeff Vigil 22fc9523 2021-02-03T15:32:48 EGL: implement EGL_EXT_buffer_age Add extension flag. Add Validation check to surface query. Enable extension for vulkan. Modify AcquireNextImage to ++frame count and tag images with frame number. Buffer age is the difference between current frame count and the tagged frame number on the buffer. getBuffeAge may need to trigger AcquireNextImage to be current. Pass through egl extension and query. Add EGLBufferAgeTest Test: angle_end2end_test --gtest_filter=EGLBufferAgeTest Test: angle_deqp_egl_tests --deqp-case=dEQP-EGL.functional.buffer_age.* Bug: angleproject:3529 Change-Id: I0cb94be1c3e85d6f33e82a6a1ccdc9731b6a7f23 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2684724 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov 73afaf1e 2021-02-26T18:08:08 Add EGL_WINDOW_BIT to all Ozone configs' EGL_SURFACE_TYPE Ozone's EGL windows are emulated, so we can always create one, thus setting EGL_WINDOW_BIT in all configs is safe. This is now required because in http://crrev.com/c/2378922 EGL_WINDOW_BIT becomes a requirement to be able to run tests. Previously Ozone's configs copied native EGL_SURFACE_TYPE, which was either 0 or having just EGL_PBUFFER_BIT. Bug: chromium:1181952, chromium:1034840 Change-Id: Ic2b14b43b3c32b47ea05d9d8da9fba7439f14d19 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2725273 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Corentin Wallez 2d3402eb 2021-02-18T09:05:02 Revert "EGL: Merge DisplayAndroid into DisplayEGL." This reverts commit 2cb6671534ddc6efe9664a2fb30be2b2fb13c8ef. Reason for revert: Make DisplayGbm fail to compile. See: https://ci.chromium.org/ui/p/chromium/builders/try/linux-chromeos-compile-dbg/636833/overview Original change's description: > EGL: Merge DisplayAndroid into DisplayEGL. > > These two classes have a lot of duplicated code for no reason. > > Bug: angleproject:5563 > Change-Id: Ia9d8efeb50f3e52ffb1df6a6e462efdb20fd4a9a > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2636678 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Peng Huang <penghuang@chromium.org> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Bug: angleproject:5563 Change-Id: Ic39071130727b37cc2a168d4b8e3c50f3e7184a5 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2704051 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 2cb66715 2021-01-19T12:42:38 EGL: Merge DisplayAndroid into DisplayEGL. These two classes have a lot of duplicated code for no reason. Bug: angleproject:5563 Change-Id: Ia9d8efeb50f3e52ffb1df6a6e462efdb20fd4a9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2636678 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Peng Huang <penghuang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Geoff Lang 393c44f1 2021-02-01T15:45:24 EGL: Trim requested config parameters to EGL. ANGLE requests a config with several uneccessary parameters. I suspect these parameters are causing issues in the wild where eglChooseConfig fails. Try requesting ES3 then fall back to ES2 configs. Skip config caveats, floating point configs and multisample configs, we provided the default parameters. The resulting config is very similiar to the one Chrome requests in gl_surface_egl.cc Bug: chromium:1173161 Change-Id: Ifa78ff8081e3d86e823036981e1e2b5f8f751fed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2665888 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Peng Huang <penghuang@chromium.org>
Jonah Ryan-Davis e174c358 2021-02-04T15:14:10 GL: Consolidate glGetString calls First step for cacheing the result of glGetString calls is mostly cleanup. Bug: chromium:1173672 Change-Id: I47281a09b9bd5859655d16376977a6eabcfbb3c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2676203 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 0be050a4 2020-09-23T15:12:56 Pass GL_VERSION info through ANGLE's GL_RENDERER string Chrome needs ANGLE to pass through the underlying driver vendor and version, which cannot always be determined by the SystemInfo library. This is done by construction GL_RENDERER in the frontend through combining GL_VENDOR, GL_RENDERER, and GL_VERSION from the backends. Example changes are in the doc: https://docs.google.com/document/d/1p0dvrLlu8NKhO-RCU5gqlQ_LvcQj-ZqhvfwSk1n3Sz8/edit?usp=sharing Bug: chromium:1126526 Bug: chromium:1131248 Bug: chromium:1134669 Bug: chromium:1169861 Change-Id: Ia618ebcd7f3caaeb376b4b6a03446732efdaeecb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2427383 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@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 6e9018bd 2020-06-25T12:58:14 GL: Clean up Display code related to multithreading Rename mCurrentData to mCurrentNativeContexts, and clean up some logic to be easier to read. Bug: angleproject:4724 Change-Id: I6fd6d99d4f9a3af808d0baa665edfbdde7fb0500 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2267424 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill 56663dbf 2020-11-19T21:21:19 EGL: Expose device query as a client extension. This matches the extension spec. Previously we were exposing the ext as a normal display extension. The extension should work without needing a display. Because the extension requires a non-null device for every display we also add a MockDevice class to handle back-ends which don't implement any attribute query extensions. By default the device query ext does not expose any way to use devices so this works fine. Bug: angleproject:5372 Change-Id: I474310a86aff6a83bd6f9a6b21c8a07c649f306d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551543 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
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>
Ian Elliott 08142700 2020-10-01T19:30:03 Work-around test runner & DebugAnnotator Note: This precedes another CL that needs this change. DebugAnnotator uses a global variable. The test runner doesn't change state between testing different back-ends. This works-around the problem by setting the global variable when the context is switched. Because the GL back-end doesn't have its own DebugAnnotator sub-class, add a Display* to DisplayImpl::makeCurrent(), so that DisplayGL::makeCurrent() can install the front-end-Display's DebugAnnotator. Note: the Vulkan back-end gets this fix even though the new DebugAnnotatorVk class will be added in a follow-on CL. Bug: b/162068318 Bug: b/169243237 Bug: angleproject:5121 Change-Id: If08626a5310f9b4e3210e1a897a6886248e4d8ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451423 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Kai Ninomiya da61c40e 2020-10-06T01:57:55 Revert "Work-around test runner & DebugAnnotator" This reverts commit e44c94d96a9b65615fe8f5038e124763ac8c45e5. Reason for revert: Breaks build of DisplayGbm on ChromeOS: src/libANGLE/renderer/gl/egl/gbm/DisplayGbm.{h,cpp} First failing builds: https://ci.chromium.org/p/chromium/builders/ci/ChromeOS%20FYI%20Release%20%28amd64-generic%29/1608 https://ci.chromium.org/p/chromium/builders/ci/ChromeOS%20FYI%20Release%20%28kevin%29/2212 Original change's description: > Work-around test runner & DebugAnnotator > > Note: This precedes another CL that needs this change. > > DebugAnnotator uses a global variable. The test runner doesn't change > state between testing different back-ends. This works-around the > problem by setting the global variable when the context is switched. > > Because the GL back-end doesn't have its own DebugAnnotator sub-class, > add a Display* to DisplayImpl::makeCurrent(), so that > DisplayGL::makeCurrent() can install the front-end-Display's > DebugAnnotator. > > Note: the Vulkan back-end gets this fix even though the new > DebugAnnotatorVk class will be added in a follow-on CL. > > Bug: b/162068318 > Bug: b/169243237 > Bug: angleproject:5121 > Change-Id: I748e8a1fd09b72e07242ac7fb39154537dcce534 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444095 > Reviewed-by: Ian Elliott <ianelliott@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> > Commit-Queue: Ian Elliott <ianelliott@google.com> TBR=courtneygo@google.com,ianelliott@google.com,jmadill@chromium.org Change-Id: I99df2716951726ead24961dc3d27a7ec63aeda80 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: b/162068318 Bug: b/169243237 Bug: angleproject:5121 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2451420 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Ian Elliott e44c94d9 2020-10-01T19:30:03 Work-around test runner & DebugAnnotator Note: This precedes another CL that needs this change. DebugAnnotator uses a global variable. The test runner doesn't change state between testing different back-ends. This works-around the problem by setting the global variable when the context is switched. Because the GL back-end doesn't have its own DebugAnnotator sub-class, add a Display* to DisplayImpl::makeCurrent(), so that DisplayGL::makeCurrent() can install the front-end-Display's DebugAnnotator. Note: the Vulkan back-end gets this fix even though the new DebugAnnotatorVk class will be added in a follow-on CL. Bug: b/162068318 Bug: b/169243237 Bug: angleproject:5121 Change-Id: I748e8a1fd09b72e07242ac7fb39154537dcce534 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2444095 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Mohan Maiya c99c22bb 2020-09-15T16:53:26 EGL: Add support for EGL_ANDROID_create_native_client_buffer This EGL extension will add support for creating EGLClientBuffer backed by an Android window buffer (struct ANativeWindowBuffer) which can be later used to create an EGLImage. Bug: angleproject:5018 Tests: angle_end2end_tests --gtest_filter=ImageTest.SourceNativeClientBufferTarget* Change-Id: If78ed7b80ad09629b8c5f5b5a0eb07a548e82e6e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2404320 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Cody Northrop b328e044 2020-09-16T10:30:05 EGL: Add another config for Mali Test: angle_end2end_tests Bug: angleproject:5053 Change-Id: I7aef6b5babe8f582e7500464f53e65721eaf0520 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2414733 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Peng Huang 4cf2501c 2020-07-27T13:19:27 Add extension EGL_ANGLE_display_semaphore_share_group For sharing semaphores globally. Bug: angleproject:4877 Change-Id: I472e0902fd04ca8350d74e6c0ae6925ee930ccf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2319370 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 3c8f6094 2020-06-26T12:42:37 EGL: Add basic multithreading support Adds first step to allowing multithreaded contexts: letting multiple threads use ANGLE as long as only one thread has a current context at a time. Bug: angleproject:4724 Bug: angleproject:4725 Change-Id: I4f606bdb15386cff9e3cb84d4120781e24e15fe4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2269864 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Geoff Lang 59656899 2020-06-15T12:48:23 Don't expose pixmap support from DisplayEGL. BUG=angleproject:4560 BUG=chromium:1094634 Change-Id: Iebab16207eb21175b6d2f1236502bb8a26c43d90 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2246322 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jiajia Qin 85ae836f 2020-03-30T16:03:47 GL: Implement EGL_EXT_image_dma_buf_import Add support for the EGL_EXT_image_dma_buf_import on EGL implementations that support it natively. This extensin is used on ozone to import native compositing buffers. This patch also adds new tokens in EGL_EXT_image_dma_buf_import_modifiers which are used in eglCreateImageKHR. BUG=angleproject:4529 Change-Id: I49bff831b591fb19fcdcec1145c7a61f5d8020c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2128190 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Mohan Maiya dac5cc3b 2020-04-08T18:26:46 EGL: Add support for EGL_EXT_image_gl_colorspace extension Add support for creating images with custom colorspace. Bug: angleproject:3756 Tests: angle_end2end_tests --gtest_filter=ImageTest* Change-Id: I9c332c012541c094728d9d9bde7add4189084a33 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2104088 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Julien Isorce a889d30f 2020-02-04T23:08:55 Reland "Provide default implementation of rx::DisplayEGL" This is a reland of 123fd97000bb9fd912159bb9ccc62308b763aead 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: I92a1ded9e09e65de8bb83710274e0a73ecdff0a4 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2061168 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:4328 Change-Id: I02046613324e9283ba8f2ed02dd9c7ce703e0fde Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2063045 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 90c9f66c 2020-02-19T12:51:01 Revert "Provide default implementation of rx::DisplayEGL" This reverts commit 123fd97000bb9fd912159bb9ccc62308b763aead. Reason for revert: Causes GL creation failure on Linux FYI Ozone (Intel) 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: I92a1ded9e09e65de8bb83710274e0a73ecdff0a4 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2061168 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,julien.isorce@chromium.org Change-Id: Ia55180ed83386fe1a158ccefda6155b33d779e98 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:4328 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2062604 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Julien Isorce 123fd970 2020-02-04T23:08:55 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: I92a1ded9e09e65de8bb83710274e0a73ecdff0a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2061168 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
Julien Isorce 5641d193 2020-02-04T21:31:47 Move generic code from rx::DisplayAndroid/Ozone to rx::DisplayEGL This CL is intended to move and factorize code only. Move DisplayAndroid::generateConfigs to DisplayEGL::generateConfigs because the code is generic and not Android specific. It will be useful later to provide a default implementation of rx::DisplayEGL. Same for createWindowSurface and createPbufferSurface, they have been moved without changes from DisplayAndroid to DisplayEGL. Unimplemented functions in DisplayOzone and DisplayAndroid have been moved to DisplayEGL. Bug: angleproject:4328 Change-Id: Ibbd36f99ea457cbd69391beb4a83f23403bc40fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2038286 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Mohan Maiya df0203a9 2020-01-15T14:05:33 EGL: Add support for EGL_EXT_pixel_format_float extension Add support for floating point configs. On backends that support rendering to floating point formats, add them to EGL's frambuffer config list Bug: angleproject:3958 Tests: dEQP-EGL.functional.wide_color.*fp16* angle_end2end_tests --gtest_filter=EGLFloatSurfaceTest* Change-Id: Ie65f63013483267985c2b308567bf5025acf750e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1993686 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jeff Vigil 8c0bbfbb 2019-11-25T14:48:11 EGL: Implement EGL_ANDROID_framebuffer_target Add attribute to configs. Add attribute matching logic. Does not set attribute in Vulkan configs, need solution to query Android for which formats are valid. anglebug.com/4208 New end2end test. Bug: angleproject:3961 Test: angle_end2end_tests --gtest_filter=EGLAndroidFramebufferTargetTest* Change-Id: I7e14c47b39e9539f6181c3c1d75c76fe63ca0f8c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1960508 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Mohan Maiya 942d9152 2019-12-23T15:31:52 EGL: Add support for EGL_KHR_gl_colorspace extension If the Vulkan backend supports VK_EXT_swapchain_colorspace extension, enable the option for applications to create surfaces with non-linear formats. Not all formats have non-linear versions and is platform specific. Tests: dEQP-EGL.functional.wide_color.* angle_deqp_egl_tests --use-angle=vulkan --deqp-gl-context-type=egl --deqp-case=dEQP-EGL.functional.wide_color.* Bug: angleproject:2514 Change-Id: I441ee797cceef92c84473bfa18605c4fd8180de1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1951963 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jeff Vigil a7003d5f 2019-07-19T11:43:34 Reland "EGL: Implement EGL_KHR_no_config_context" Add extension string and flag to all renderers that pass Modify eglCreateContext to accept EGL_NO_CONFIG Modify eglQueryContext per specification Modify eglMakeCurrent to bypass surface-context config compatibility checks Add check for client API Create new end2end test EGLNoConfigContextTest Disable on most renderers to prevent possible fail with future configs Bug: angleproject:3635 Test: dEQP-EGL.functional.create_context.no_config* angle_end2end_tests --gtest_filter=EGLNoConfigContextTest* Change-Id: I88c1922a1e75afcc49922a9eccb4f1ae046c024a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1806140 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Zhenyao Mo d32dae1b 2019-09-13T22:06:56 Revert "EGL: Implement EGL_KHR_no_config_context" This reverts commit c4b1fbd69b12c0af30a58d0810f88d1301b8dabd. Reason for revert: https://crbug.com/1003971 Original change's description: > EGL: Implement EGL_KHR_no_config_context > > Add extension string and flag to all renderers that pass > Modify eglCreateContext to accept EGL_NO_CONFIG > Modify eglQueryContext per specification > Modify eglMakeCurrent to bypass surface-context config compatibility checks > Add check for client API > Create new end2end test EGLNoConfigContextTest > Disable on most renderers to prevent possible fail with future configs > > Bug: angleproject:3635 > Test: dEQP-EGL.functional.create_context.no_config* > angle_end2end_tests --gtest_filter=EGLNoConfigContextTest* > Change-Id: I7fbb137f1222ae7eebff4192013b7d3c5fcf0436 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762709 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,timvp@google.com,jmadill@chromium.org,m.maiya@samsung.com,j.vigil@samsung.com Change-Id: I849aa796803e3cda9b480a39be813ef9105325bb No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:3635 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1803789 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Jeff Vigil c4b1fbd6 2019-07-19T11:43:34 EGL: Implement EGL_KHR_no_config_context Add extension string and flag to all renderers that pass Modify eglCreateContext to accept EGL_NO_CONFIG Modify eglQueryContext per specification Modify eglMakeCurrent to bypass surface-context config compatibility checks Add check for client API Create new end2end test EGLNoConfigContextTest Disable on most renderers to prevent possible fail with future configs Bug: angleproject:3635 Test: dEQP-EGL.functional.create_context.no_config* angle_end2end_tests --gtest_filter=EGLNoConfigContextTest* Change-Id: I7fbb137f1222ae7eebff4192013b7d3c5fcf0436 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1762709 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 69e46a18 2019-07-03T14:43:32 GL: Implement EGL_ANDROID_native_fence_sync This extension allows Chrome to use ANGLE on newer Android devices. BUG=angleproject:3643 Change-Id: I5456d61749399ca2bbc11cc5e98b9120f8702406 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1687121 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3fd0b2db 2018-09-20T15:59:54 Implement EGL_ANDROID_get_native_client_buffer. BUG=angleproject:2508 Change-Id: I21e6251cd1341c1f85f1ba16ba08f5876a8ff8de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1238885 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Cody Northrop 7d6923de 2019-07-01T03:22:42 Revert "Vulkan: pipeline cache not populated as blob cache is not set" This reverts commit 134d6eed2a7d1f148a42c78c8e5da3cfc2df288e. Reason for revert: glmark2 is unable to start on Android-Q when using ANGLE as the driver. Original change's description: > Vulkan: pipeline cache not populated as blob cache is not set > > 1. Use vkMergePipelineCaches in eglSetBlobCacheFuncsANDROID as > blob cache callbacks are set after eglInititalize. > 2. Use a more proper way to save the cache data to disk. > > Bug: angleproject:3318 > Change-Id: Ieb5d10ab93e7afb2aab4446b387d7f36c878a686 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1559671 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=syoussefi@chromium.org,jmadill@chromium.org,fei.yang@arm.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:3318 Change-Id: I51e49bf103142e80b2c9028b3af6d3bb58cf6348 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1683820 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Fei Yang 134d6eed 2019-04-09T14:50:23 Vulkan: pipeline cache not populated as blob cache is not set 1. Use vkMergePipelineCaches in eglSetBlobCacheFuncsANDROID as blob cache callbacks are set after eglInititalize. 2. Use a more proper way to save the cache data to disk. Bug: angleproject:3318 Change-Id: Ieb5d10ab93e7afb2aab4446b387d7f36c878a686 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1559671 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 5313c8a8 2019-01-14T17:02:52 Implement EGL_KHR_fence_sync and EGL_KHR_wait_sync EGL_KHR_fence_sync introduces the EGLSync object and associated create/destroy/clientWait functions. EGL_KHR_wait_sync adds the serverWait function on top of that. Bug: angleproject:2466 Change-Id: Iebb239a85c4471ea18b3c3a8a83b793af555e31d Reviewed-on: https://chromium-review.googlesource.com/c/1412261 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 a100d8f4 2018-12-29T16:39:55 ParallelCompile: add GL backend support For GL backend, at first each worker thread must have a naitve context for its own to work in. These worker contexts have to be shared from the main context, so that all shader and program objects are seen in any context. This extends backend displays to create and destroy the worker contexts. RendererGL manages and allocates them to the worker threads. ShaderImpl has a new compile method added to do the actual glCompile work in worker thread. The ProgramGL's link method is broken down by introducing the LinkEventGL class. Bug: chromium:849576 Change-Id: Idc2c51b4b6c978781ae77810e62c480acc67ebb5 Reviewed-on: https://chromium-review.googlesource.com/c/1373015 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 6ba22ee1 2018-10-26T16:15:40 GL: Implement EGL_ANDROID_get_frame_timestamps. BUG=angleproject:2936 Change-Id: I758d797d185b2de330cce3401bfeef76c7df590e Reviewed-on: https://chromium-review.googlesource.com/c/1302836 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang ad8fe588 2018-10-26T13:06:42 Don't set native blob cache callbacks if the driver doesn't support it. BUG=angleproject:2516 Change-Id: I147705e22a7c694d1f22088a9270c579b0941c7d Reviewed-on: https://chromium-review.googlesource.com/c/1302113 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang c3ee7ec0 2018-09-21T16:15:03 Implement EGL_ANDROID_image_native_buffer. BUG=angleproject:2508 Change-Id: I8ef2ce8320edeb336727905055f47bb299dec2ea Reviewed-on: https://chromium-review.googlesource.com/c/1238886 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 9137adea 2018-08-27T14:22:37 Add support for EGL_ANDROID_blob_cache The functionality of MemoryProgramCache is divided up in two. BlobCache is now a generic binary cache, which interfaces with the callbacks from EGL_ANDROID_blob_cache. MemoryProgramCache handles program [de]serialization and interacts with BlobCache. Bug: angleproject:2516 Change-Id: Ie4328a2e56a26338e033d84f4e53a1103411937d Reviewed-on: https://chromium-review.googlesource.com/1194285 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang dbd16127 2018-07-19T11:30:21 EGL: Implement EGL Image extensions. BUG=angleproject:2507 Change-Id: Ica33166e9e23e933977c3ab034d4f5a8cada9fb1 Reviewed-on: https://chromium-review.googlesource.com/1143454 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 89ef177f 2018-07-10T11:19:43 EGL: Fix binding EGL_NO_SURFACE without surfaceless support. It was possible for ANGLE to call eglMakeCurrent with EGL_NO_SURFACE and a valid context when the client called eglMakeCurrent with EGL_NO_SURFACE and EGL_NO_CONTEXT. Fix this by always binding a surface when the driver has no native surfaceless support. Don't expose the surfaceless extension when it's not possible to support it (unvirtualized contexts and no native surfaceless support). BUG=860800 BUG=angleproject:2464 Change-Id: Id8af9638d4356dbd710c453c9f196b9f25a2bbf9 Reviewed-on: https://chromium-review.googlesource.com/1131555 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
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>
Courtney Goeltzenleuchter 1ee33552 2018-06-28T10:22:49 Emulate eglSwapBuffersWithDamageKHR when needed When driver does not support the EGL_KHR_swap_buffers_with_damage extension, call regular eglSwapBuffers instead. BUG=angleproject:2464 Change-Id: Ie3a395d37b61ef5ac65b098b312e9ead1c8bc799 Reviewed-on: https://chromium-review.googlesource.com/1117832 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5da6690f 2018-06-05T12:24:06 Hold RendererGL objects with a shared_ptr. To support both virtualized and unvirtualized contexts, the RendererGL object represents the native context. Update ContexGL and the various DisplayGLs to hold RendererGL with a shared_ptr so that deletion of the renderer happens at the correct time. Update RendererGL to take ownership of FunctionsGL. BUG=angleproject:2464 Change-Id: Id040a8053973d73936c0a7ff0ab5edb1a3f16dc6 Reviewed-on: https://chromium-review.googlesource.com/1085851 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1da46774 2018-05-14T14:30:30 Add support for EGL_ANDROID_presentation_time. BUG=angleproject:2506 Change-Id: I46b3c6ac7f259eabfdd8ea5799da6ef563ff81ee Reviewed-on: https://chromium-review.googlesource.com/1057997 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang 3f1eba94 2018-05-10T15:53:22 Support EGL_KHR_swap_buffers_with_damage in the EGL backend. Update the EXT extension to KHR in ANGLE. BUG=angleproject:2544 Change-Id: Ia647191c3e762d658b0f7e28a34a9ce2cc545f48 Reviewed-on: https://chromium-review.googlesource.com/1054415 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang b433e872 2017-10-05T14:01:47 Change robust resource init into a context creation attribute. Enabled support on OpenGL even through the extension is not fully implemented so that testing with Chromium/Passthrough commmand decoder is still possible. BUG=angleproject:1635 Change-Id: Ia417b1779aace1eae19514325701a79cd33f4ef3 Reviewed-on: https://chromium-review.googlesource.com/678479 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang e159717d 2017-10-05T12:02:30 Filter EGL attributes before passing them to the native driver. Adding extensions that are not native driver extensions would cause surface creation to fail. BUG=angleproject:1635 Change-Id: I2f683ee0560e463aa06f3ba92d0bf3f3d8c8927d Reviewed-on: https://chromium-review.googlesource.com/701602 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang bb6e6643 2017-08-21T10:57:15 Implement EGL_surfaceless_context for Android/ChromeOS and optimize eglMakeCurrent BUG=angleproject:1651 Change-Id: I13c1a669d83098e22c0d7fb003d13beacc20c4ae Reviewed-on: https://chromium-review.googlesource.com/623947 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yuly Novikov c4d18aac 2017-03-09T18:45:02 Use ErrorStream everywhere Eliminates one more usage of FormatString and its static initializer. Add more ErrorStream types and replace gl::Error and egl::Error with them. BUG=angleproject:1644 Change-Id: Ib498d0ae4b81a332ec71aed7cf709993b154e6bb Reviewed-on: https://chromium-review.googlesource.com/505429 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang ce02f086 2017-02-06T16:46:21 Add an extension to share textures at the display level. BUG=angleproject:1639 Change-Id: If9140142ebce89f33921c13d9d212c17d1894162 Reviewed-on: https://chromium-review.googlesource.com/437618 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3311d474 2017-01-02T17:55:02 Display: Add a shared state object. This will allow us to manage the SurfaceSet in the GL layer. BUG=angleproject:1684 Change-Id: Iab8243157710beab2667ef10275571078ce9ae8e Reviewed-on: https://chromium-review.googlesource.com/424228 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov a6426d67 2016-06-03T00:18:38 Android GL backend and end2end tests Just the bare minimum implementation for end2end tests to run. BUG=angleproject:1362 TEST=angle_end2end_tests on Nexus 5X Change-Id: I92293e0f8bdc2ffaa5d4661927750d7cb3d931e6 Reviewed-on: https://chromium-review.googlesource.com/349353 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>