src/libANGLE/Display.cpp


Log

Author Commit Date CI Message
Greg Schlomoff 81a244de 2022-10-10T15:32:25 Adding a class to perform ASTC texture decompression on the CPU This significantly improves performance by caching and re-using the ASTC decoder context, and using multi-threaded decompression. This code was originally written for gfxstream. Bug: b/250688943 Change-Id: I1727447907f2e25cf9b854ffcc9ccfc04db2fb91 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3929008 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 8403e4c5 2022-10-10T20:59:29 EGL: Resource IDs for Surface, Context and EGL Image. This will make these classes play nicely with resource maps. As these objects are used in a lot of places, and simplified C can't handle unordered_map, it's necessary to index the maps by simple packed IDs in capture/replay code. This indirection will also have increased safety as we validate EGL resource ID handle values before accessing the memory directly. Also hides some of the other EGL capture methods behind helper methods to simplify the C code and hide assignments and other complex maps. Bug: angleproject:7758 Change-Id: Ibc7bb56430d3068bd38877c9dfb011979d4ea234 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957164 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi 025504b9 2022-10-17T17:03:03 Pass worker pools to image load functions In preparation for the ASTC decoder using threaded decoding. Bug: b/250688943 Change-Id: I70d669bcb57b900dbb633304182e174aec362203 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3961339 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Greg Schlomoff <gregschlom@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b5929ac6 2022-10-17T18:06:32 Move worker pools to Display It doesn't make sense for each context to have its own set of CPU-count workers. This change also facilitates access to the thread pools where gl::Context is not available (but egl::Display is). Bug: b/250688943 Change-Id: I240353abba26c15338d59631b4179a58dfd662f5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3961334 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 0d203aef 2022-10-16T10:08:01 EGL: Add ID types for egl::Surface and egl::Image. This is in preparation for using resource maps for Context, Surface and EGLImage. The map change will make it much easier to work with the trace fixture. It will also have a small benefit in safety as we will longer be casting raw pointers for these types. As these objects are used in a lot of places, and simplified C can't handle unordered_map, it's necessary to index the maps by simple packed IDs in capture/replay code. Bug: angleproject:7758 Change-Id: Ib1d19622a4f2a6f0458cc28f5bbe30bb9f349b98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957163 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 01285f16 2022-09-26T23:19:28 Remove Platform.h Overloaded name. Causing trouble with gles1's platform.h on case-insensitive file systems despite the different case. Bug: angleproject:3408 Change-Id: Icc1644a4c6a9c9076a2bbafbfb1d6eac578b731a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3920895 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 818a8ace 2022-09-26T19:50:03 Revert "Vulkan: Add missing part for supporting GBM Platform type" This reverts commit 43354edbe671af534c469089066e0259731563c7. Reason for revert: Fails on ChromeOS bots in Chrome. Original change's description: > Vulkan: Add missing part for supporting GBM Platform type > > Adds missing part to support GBM platform type. > > Bug: angleproject:7481 > Signed-off-by: Sungyong Choi <sywow.choi@samsung.com> > Change-Id: I46caa4a958274de1111b30b144df592ac4cdcf6e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3736243 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jeff Vigil <j.vigil@samsung.com> > Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com> Bug: angleproject:7481 Bug: angleproject:7696 Change-Id: I76fa4e38ea1f866575bc38725c23b697d17b53a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3918856 Reviewed-by: Geoff Lang <geofflang@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Sungyong Choi 43354edb 2022-06-30T10:18:41 Vulkan: Add missing part for supporting GBM Platform type Adds missing part to support GBM platform type. Bug: angleproject:7481 Signed-off-by: Sungyong Choi <sywow.choi@samsung.com> Change-Id: I46caa4a958274de1111b30b144df592ac4cdcf6e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3736243 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jeff Vigil <j.vigil@samsung.com> Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Shahbaz Youssefi 9c17232a 2022-09-02T16:05:48 Vulkan: Make robustness affect all of share group Since contexts in a share group can share their program, if any context in the share group is robust, programs in all contexts in the share group need to be created with robustness in mind. This fixes the situation when the programs are created after a robust context has been created. However, if programs are created first, then a robust context is added to a share group, there remains a bug where the old programs aren't recreated to have robust behavior. Bug: angleproject:7629 Change-Id: I4922091962a32ca75a6107343df0cd87e5e9592d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3872506 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Eddie Hatfield 3960e63b 2022-08-09T14:02:59 Infra: Enable angle_deqp_gl46_tests on SwiftShader This change disables the WGL frontend by default on Windows when building ANGLE for desktop GL. This is because the WGL frontend is not yet fully implemented and it causes some of the trace tests to fail. The WGL frontend should be enabled by default on windows when more of its functionality gets implemented. Test: angle_deqp_gl46_tests --use-angle=swiftshader Bug: angleproject:7566 Bug: angleproject:7628 Change-Id: I69c695eb56d3858f715eeb86d28cc805e25c60eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858142 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Eddie Hatfield 955adb77 2022-08-12T10:14:48 Cache compiled shader By storing the compiled shader in the blob cache, the time to recompile the same shader is reduced. Based on work by <hckim.kim@samsung.com> Bug: angleproject:7036 Change-Id: I884ae40e715c49a9ccd12903012e8327811e3557 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3808235 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Mohan Maiya 7a87e90d 2022-07-16T11:39:08 An inactive but alive thread shouldn't prevent cleanup 1. Acquire EGL global lock before thread cleanup and remove all clean up related mutexes 2. Mark contexts that are not current as invalid during terminate 3. During thread exit, if there are other active threads, terminate with TerminateReason::InternalCleanup. This gives an opportunity for well behaved threads to cleanup up invalid objects. Bug: angleproject:6723 Bug: angleproject:6798 Test: EGLContextSharingTestNoFixture.InactiveThreadDoesntPreventCleanup* Change-Id: I418e5f8b486d3d309bd58c4cfb04b7dc1149ffc1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3768667 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Peng Huang b9fd47b8 2022-08-12T10:55:49 Not use Android TLS slot for chromium In the profile, GetGlobalContext() & GetValidGlobalContext() have extra overhead for checking angle::gUseAndroidOpenGLTlsSlot. Since angle::gUseAndroidOpenGLTlsSlot is always false for now, so add a build flag to disable it for chromium build. In the profile, with angle_use_android_tls_slot = false, GetValidGlobalContext() is reduced from 0.153% to 0.044%. Bug: chromium:1336126 Change-Id: Id5e1752b0a03289fb299e8de2ed6e962e35291c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3827955 Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Peng Huang <penghuang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Peng Huang 44791792 2022-08-12T00:13:45 Use angle::FlatUnorderedSet for ImageSibling::mSourcesOf As my test with Chromium on Android, ImageSibling::mSourcesOf only contains one item, so change it to angle::FlatUnorderedSet with default size 2. Bug: chromium:1336126 Change-Id: Ie1ba3ebb195170ad5c9f4713b599a91de5052702 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3828444 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Peng Huang <penghuang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Peng Huang afdd5106 2022-08-11T21:14:23 Use angle::FlatUnorderedMap in Display.cpp Bug: chromium:1336126 Change-Id: I57d97d37749de2abbba88b6558bde31fa8346764 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3828442 Commit-Queue: Peng Huang <penghuang@chromium.org> Auto-Submit: Peng Huang <penghuang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Peng Huang 4cab7f38 2022-08-10T20:33:07 Fix EGL_ANGLE_program_cache_control for eglCreateContext EGL_CONTEXT_PROGRAM_BINARY_CACHE_ENABLED_ANGLE is an attribute for creating EGL context, but ANGLE reads it from mAttributeMap which is not the attribs passed to eglCreateContext(). Bug: chromium:1336126 Change-Id: Id3ea1955f927a7e051285c79b590dcf1f11f22ed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3823621 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Peng Huang <penghuang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Peng Huang 0d5ba4dc 2022-08-05T19:43:54 Minor performance improvement Use angle::FixedVector to replace std::vector in SyncEGL::initialize() Use std::move() to avoid copy in Display::destroyInvalidEglObjects Bug: chromium:1336126 Change-Id: If4c13babb14ed9995caf3c3dd3cfc362124b24cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3812561 Auto-Submit: Peng Huang <penghuang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jonah Ryan-Davis de5c6c79 2022-08-03T13:56:11 Remove unused ANGLE histograms This CL removes the following histograms: GPU.ANGLE.D3DCompileMS GPU.ANGLE.DisplayInitializeMS GPU.ANGLE.ProgramCache.CacheResult GPU.ANGLE.ProgramCache.LoadBinarySuccess GPU.ANGLE.ProgramCache.ProgramBinarySizeBytes Bug: chromium:1317194 Change-Id: Iad01cff591df83c015bc79fe4e7b7c094357f02a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3807767 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Eddie Hatfield c54ed790 2022-07-21T10:38:47 Get desktop GL conformance tests to build The target for these tests is angle_deqp_gl_tests. Bug: angleproject:7533 Change-Id: I290822671d99da020f9a6a1f02bee43987644bf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3766435 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Steven Noonan b8e741d2 2022-06-23T13:36:17 Vulkan: allow selecting render device by PCI device/vendor IDs The EGL_ANGLE_platform_angle_device_id extension is deliberately vague about the meaning of "device ID high" and "device ID low", stating it's platform-specific. We can use these for representing the PCI device/vendor IDs that can be discovered via various (OS-specific) external means. Bug: angleproject:7460 Change-Id: Iff462687749e815fa074ef8ff392b6730ef46fa8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3720733 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Chris Dalton 15cc0013 2022-07-14T23:32:05 Add a GL_ANGLE_shader_pixel_local_storage extension Plumbs through "GL_ANGLE_shader_pixel_local_storage" and "GL_ANGLE_shader_pixel_local_storage_coherent" extension strings advertised by ANGLE and stubs out an initial spec document. This change doesn't add any new procedures or shader constructs, but it does allow the PLS tests to start checking for the real extension strings and requiring the GL_ANGLE_shader_pixel_local_storage extension. Bug: angleproject:7279 Change-Id: I36877fe4117185a2121f803288123cd69a447cf3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3739590 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
Mohan Maiya 12efe5b2 2022-06-21T15:43:42 Cleanup invalid EGL handles only if app called eglTermiate Maintain set of active threads instead of a global refCount and free display's invalid EGL resources iff - 1. app previously called eglTerminate on that display 2. there are no more active threads associated with that display Bug: angleproject:6723 Test: EGLMultiContextTest.RepeatedEglInitAndTerminate* Test: EGLMultiContextTest.ReuseUnterminatedDisplay* Change-Id: I868491bbbf0664e9129dcb0d1fa9e2243ef36d82 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3717277 Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com>
Antonio Caggiano 44d8bf76 2022-03-16T14:38:37 Vulkan: Support EGL_EXT_platform_wayland Improve GetPlatformDisplay by supporting EGL_PLATFORM_WAYLAND_EXT. Bug: angleproject:6902 Change-Id: Ia4c342097f47b7c41778ac02517451f51a94d8be Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3528758 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 9d08c29a 2022-05-25T11:39:29 Expose the EGL Display Context Set in the DisplayState. This will let the Vulkan back-end iterate through and flush pending command buffers in other Contexts. Bug: angleproject:5664 Change-Id: I0d22eb68fa754a97b4836ec8c59ff8c6e5ef2d96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3668145 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Elliott 0f8f760d 2022-06-07T17:52:52 Disable KHR_no_error for Android/SwiftShader Speculatively fix crash in Skia on ANGLE that has been happening. In addition, prevent other crashes in the future. Bug: b/220069903 Change-Id: I01b9896a6feb8be524849dafbc1df9526fc98754 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3694160 Commit-Queue: Ian Elliott <ianelliott@google.com> Auto-Submit: Ian Elliott <ianelliott@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Antonio Caggiano 68634d5c 2022-01-05T20:33:32 Vulkan: Enable VK_EXT_platform_wayland Bug: angleproject:6902 Change-Id: I6a27e3f610bd48dd31937255b287b11fe84c05ca Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3528756 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Faye Zhang c608df69 2022-05-23T17:19:02 Code Cleanup In Debug.h, we unconditionally set UNREACHABLE_IS_NORETURN to 0. Since UNREACHABLE_IS_NORETURN is only used in #if directives and it is always false, we can remove all uses of UNREACHABLE_IS_NORETURN. Bug: angleproject:6134 Change-Id: I3aa88d802099d70990eae697d4f056a3f650b48d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3661376 Commit-Queue: Faye Zhang <ffz@google.com> Auto-Submit: Faye Zhang <ffz@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Faye Zhang <ffz@google.com>
Antonio Caggiano 2fb58a95 2022-02-15T15:40:23 Re-land: "Vulkan: GBM platform" Add support for GBM platform by implementing a Display with no WSI extension. Re-land fixes build script, including GBM Vulkan backend whenever ozone platform GBM is enabled. Bug: angleproject:7217 Change-Id: Icbf2d034b700e22ab4c351e479f472d65d832ebe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3637562 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 0db4c39b 2022-05-09T20:02:58 Revert "Vulkan: GBM platform" This reverts commit 825d5b2c59b463253c82262a0c50f75d28860db4. Reason for revert: Fails link rolling into Chrome crrev.com/c/3635013 https://ci.chromium.org/ui/p/chromium/builders/try/chromeos-amd64-generic-rel/1149608/overview https://ci.chromium.org/ui/p/chromium/builders/try/linux-chromeos-compile-dbg/1013047/overview https://ci.chromium.org/ui/p/chromium/builders/try/linux-chromeos-rel/1189185/overview Original change's description: > Vulkan: GBM platform > > Add support for GBM platform by implementing a Display with no WSI > extension. > > Bug: angleproject:7217 > Change-Id: Ia9089131c5984dfdd926d2f85f1c218df1e84d9a > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3596042 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:7217 Change-Id: Ia8a4ca753a8f18d6a2c607010b5afabf6a78fe9a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3636059 Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Antonio Caggiano 825d5b2c 2022-02-15T15:40:23 Vulkan: GBM platform Add support for GBM platform by implementing a Display with no WSI extension. Bug: angleproject:7217 Change-Id: Ia9089131c5984dfdd926d2f85f1c218df1e84d9a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3596042 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Antonio Caggiano 9ad43bdd 2021-12-09T16:52:35 Re-land: "Vulkan: Support Wayland" Implement DisplayVkWayland and WindowSurfaceVkWayland. Get window size from native window and check egl config is just empty. An EGL wayland test is added for testing rendering and buffers swapping. Re-land fixes: - link failure in systems with no libwayland installed. - XCB display availability check. Bug: angleproject:6902 Change-Id: I5daecf3591493308ac71a7dd3bc0802f492e6fed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3621059 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 4bbc55f4 2022-05-03T08:19:55 Revert "Re-land: "Vulkan: Support Wayland"" This reverts commit e0dd196a0e0aace17dfaa204163d798f504ea94e. Reason for revert: blocks ANGLE roll into Chromium Original change's description: > Re-land: "Vulkan: Support Wayland" > > Implement DisplayVkWayland and WindowSurfaceVkWayland. Get window size > from native window and check egl config is just empty. An EGL wayland > test is added for testing rendering and buffers swapping. > > Re-land fixes link failure in systems with no libwayland installed. > > Bug: angleproject:6902 > Change-Id: I4f091d4f479a537d0390caedce88a5d39f8b356f > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3608088 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: angleproject:6902, angleproject:7260 Change-Id: I7e92bf811b191eee6679d577006cddc0e1286fad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3621057 Auto-Submit: Yuly Novikov <ynovikov@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Antonio Caggiano e0dd196a 2021-12-09T16:52:35 Re-land: "Vulkan: Support Wayland" Implement DisplayVkWayland and WindowSurfaceVkWayland. Get window size from native window and check egl config is just empty. An EGL wayland test is added for testing rendering and buffers swapping. Re-land fixes link failure in systems with no libwayland installed. Bug: angleproject:6902 Change-Id: I4f091d4f479a537d0390caedce88a5d39f8b356f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3608088 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jeff Vigil 95c1ff52 2022-02-24T08:31:52 EGL: Fix EGL_KHR_mutable_render_buffer Fixes for eglSurfaceAttrib error cases. Improve query for render buffer Add test case to EGLSurfaceTest Test: angle_end2end_test --gtest_filter=EGLSingleBufferTest Bug: angleproject:7134 Change-Id: I4fa568c9530312003dc17111be212bf5b66d97fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3556088 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Antonio Caggiano 01811839 2022-03-17T15:08:38 Refactor platform code Use switch constructs instead of if-else to allow reuse of code and simplify addition of other platforms as new cases. Bug: angleproject:6902 Change-Id: Ia941d0d7bc03538bbc8d96ebece60224994a6c66 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3532260 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com> Commit-Queue: Antonio Caggiano <antonio.caggiano@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop e0183a42 2022-04-25T09:07:55 Revert "Mark contexts as shared when importing EGL images." This reverts commit e18240d136d15e5cdfa4fa4a6355ca21c8d807b6. Reason for revert: Applications not responding in AOSP: https://buganizer.corp.google.com/issues/229807074 Original change's description: > Mark contexts as shared when importing EGL images. > > Once a context references an EGL image, it can share resources with > contexts in other share groups. Marking the context as shared ensures > that locks are held by all contexts referencing EGL images for GL > functions. > > Bug: angleproject:6957 > Change-Id: Ic3901c458f388306c59f6bb01560a7c66d0574c0 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3424659 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: mohan maiya <m.maiya@samsung.com> > Commit-Queue: Geoff Lang <geofflang@chromium.org> Test: CtsWindowManagerDeviceTestCases Bug: b/229807074 Change-Id: I5b7050bd68f67925f77242e483e2aa970ed0ca17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3602954 Commit-Queue: Cody Northrop <cnorthrop@google.com> Auto-Submit: Cody Northrop <cnorthrop@google.com> Reviewed-by: Lingfeng Yang <lfy@google.com> Commit-Queue: Lingfeng Yang <lfy@google.com>
Antonio Caggiano 0f3710d9 2022-03-16T14:30:17 Generalize GetDisplayFromNativeDisplay Add a platform parameter to this function to possibly accept other platforms besides EGL_PLATFORM_ANGLE_ANGLE. Bug: angleproject:6902 Change-Id: I90bd9cf2e8142ca0e656dee4bf687953515b71a3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3528757 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 768c7d47 2022-04-21T16:55:05 Revert "Re-land: "Vulkan: Support Wayland"" This reverts commit f6cdd02fb4bceb4072430e3dbcb1e945809471e0. Reason for revert: Still warns about extra dependency on wayland. https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/990820/overview Original change's description: > Re-land: "Vulkan: Support Wayland" > > Implement DisplayVkWayland and WindowSurfaceVkWayland. Get window size > from native window and check egl config is just empty. An EGL wayland > test is added for testing rendering and buffers swapping. > > Re-land fixes link failure in systems with no libwayland installed. > > Bug: angleproject:6902 > Change-Id: I706af14620d6298275009f5caf93b0e60339219b > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3578765 > Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: angleproject:6902 Change-Id: I11b1fe473fceb2fddb85bd562b769d18426ce07b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3600378 Auto-Submit: Jamie Madill <jmadill@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Antonio Caggiano f6cdd02f 2021-12-09T16:52:35 Re-land: "Vulkan: Support Wayland" Implement DisplayVkWayland and WindowSurfaceVkWayland. Get window size from native window and check egl config is just empty. An EGL wayland test is added for testing rendering and buffers swapping. Re-land fixes link failure in systems with no libwayland installed. Bug: angleproject:6902 Change-Id: I706af14620d6298275009f5caf93b0e60339219b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3578765 Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang e18240d1 2022-01-28T13:46:41 Mark contexts as shared when importing EGL images. Once a context references an EGL image, it can share resources with contexts in other share groups. Marking the context as shared ensures that locks are held by all contexts referencing EGL images for GL functions. Bug: angleproject:6957 Change-Id: Ic3901c458f388306c59f6bb01560a7c66d0574c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3424659 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: mohan maiya <m.maiya@samsung.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 01c0bc21 2022-04-13T17:56:13 Revert "Vulkan: Support Wayland" This reverts commit 510351f2006e32ffc6da722f1fc9ea5666e9c0da. Reason for revert: Breaking ANGLE roll: https://bugs.chromium.org/p/angleproject/issues/detail?id=7202 Original change's description: > Vulkan: Support Wayland > > Implement DisplayVkWayland and WindowSurfaceVkWayland. Get window size > from native window and check egl config is just empty. > > Then add an EGL wayland test for testing rendering and buffers swapping. > > Bug: angleproject:6902 > Change-Id: I8204a5cc99f26330b74caba241bebf14c5650c2d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3395898 > Reviewed-by: mohan maiya <m.maiya@samsung.com> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: angleproject:6902 Change-Id: Idd0cb78c84baeb1b2ab6910173160206901799f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3584921 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Antonio Caggiano 510351f2 2021-12-09T16:52:35 Vulkan: Support Wayland Implement DisplayVkWayland and WindowSurfaceVkWayland. Get window size from native window and check egl config is just empty. Then add an EGL wayland test for testing rendering and buffers swapping. Bug: angleproject:6902 Change-Id: I8204a5cc99f26330b74caba241bebf14c5650c2d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3395898 Reviewed-by: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Auto-Submit: Antonio Caggiano <antonio.caggiano@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mohan Maiya 5aaa402c 2022-03-30T06:13:02 Fix Surface use-after-free bug In Display::destroyContext we would incorrectly destroy current surfaces while trying to makeCurrent the context to be destroyed. Introduce ScopedSurfaceRef, mirroring ScopedContextRef, to keep the surfaces alive while destroying the context. Bug: angleproject:7141 Test: EGLSurfaceTest.SurfaceUseAfterFreeBug* Change-Id: Ie9b3d7841e5ee561d96c13bfee9c7c87b40cc39d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3561354 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Kimmo Kinnunen 9637185c 2022-03-10T15:38:13 Add ForceGPUSwitch to EGL_ANGLE_power_preference eglHandleGPUSwitch() does not work with WebKit sandbox profile. The root cause is that we do not know the primary display, and as such we do not know which GPU drives this. Add eglForceGPUSwitchANGLE(display, gpuIDHigh, gpuIDLow). This lets the caller figure out the GPU in another process. Then the caller can just set the GPU in the sandboxed process. Add tests that are disabled by default until the runner and the infrastructure supports running the tests with automatic switching enabled. Bug: angleproject:7092 Change-Id: I316ee431156596effbdb89659a5e24291719a204 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3516274 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Kimmo Kinnunen d914e7fb 2022-03-09T16:28:06 Add device id as a part of the key in EGLDisplay cache Otherwise eglGetPlatformDisplay would return displays created with other devices. Bug: angleproject:7087 Change-Id: I6ad3fa03f02892afe43de7e7691fbba17a89d616 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3513753 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Antonio Caggiano 47977b0e 2022-03-01T15:24:51 EGL: Validate and implement dmabuf extensions Add validation and default implementation of dmabuf extensions. Actual implementation should be defined by concrete Display subclasses. Bug: angleproject:7065 Change-Id: Ie8d7081f7bcb065c809a52a42abdb7af0e75c816 Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com> Signed-off-by: Constantine Shablya <constantine.shablya@collabora.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3497840 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Sean Risser 3adace15 2022-01-10T22:53:19 Don't expose detailed driver version info to webGL WebGL's GL_RENDERER string now only includes basic version information on all backends. This is controlled through a bool passed through getBackendVersionString. Bug: angleproject:6777 Change-Id: Ie4e3d91d22c96f175a8139fac1c66e985ed9e1b7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3380263 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Sean Risser <srisser@google.com>
Cody Northrop 6cced91b 2022-02-08T10:24:11 FrameCapture: Remove destroyed contexts from share group If a GL Context is destroyed, remove it from the list of shared contexts tracked by FrameCapture. Before this CL, we would crash in runMidExecutionCapture when trying to iterate through contexts that were gone: INFO: checking for SetupCalls in context id: 1 INFO: checking for SetupCalls in context id: 2 INFO: checking for SetupCalls in context id: 1769237601 Test: Mortal Kombat MEC Bug: angleproject:6997 Change-Id: I3c2f6a77419d241af9a0b300936e7784446306f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3448681 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jonah Ryan-Davis 4349904b 2022-02-04T14:22:53 Add keying on backend to ANGLE Display caching. Webkit needs to use one ANGLE display with OpenGL and another with Metal. Our display caching is interfering with this, so it should be updated to also key on the selected backend. Bug: angleproject:6978 Change-Id: I9ec47a28e16646f5fc75956e3bd78236990cc392 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3440780 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Yuly Novikov da87b1db 2022-02-03T21:07:59 Fix GLES Display creation on ChromeOS when Vulkan is enabled GetPlatformTypeFromEnvironment() returns EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE on ChromeOS when Vulkan backend is enabled in build. Previously it returned 0, which caused DisplayGbm to be created on ChromeOS. Restore the previous state of GLES backend by creating DisplayGbm even for EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE platform. Note that this is a hack, and a proper solution would be to always use DisplayEGL on ChromeOS. Bug: chromium:1293420, chromium:1225003 Change-Id: Iab0324a56f0d426310d7db19fec3fc69e9bb5525 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3437779 Reviewed-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jonah Ryan-Davis 453cd955 2022-01-17T13:26:39 Add EGL_ANGLE_platform_angle_display_id to D3D11 backend. Uses the same LUID parts as ANGLE_platform_angle_d3d_luid. This new extension is available on D3D11 on Windows and Metal on Mac. Bug: angleproject:6903 Change-Id: Ib695affe47e822c4dfd7f41d8a62a85e74b9b90a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3396416 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jonah Ryan-Davis 2f4f5f8a 2021-12-14T17:30:42 Add EGL_ANGLE_platform_angle_device_id for the Metal backend. This extension takes in a 64-bit device ID in two parts as parameters to eglGetPlatformDisplay and uses it to initialize a display backed by a specific device. The deviceID should match the MTLDevice's registryId. Bug: angleproject:6143 Change-Id: I02188b8266f8d0ac657b04325d191ab89bbef751 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3337985 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Tim Van Patten b0e15ee4 2021-12-28T20:37:33 Decide GL_KHR_parallel_shader_compile in backends GL_KHR_parallel_shader_compile was previously being enabled unconditionally in the front end. However, some backends (Vulkan) perform worse with parallel shader compilation. This CL moves the decision of enabling GL_KHR_parallel_shader_compile to the backends. To support single-threaded shader compilation without affecting the generic worker thread pool, Context::mSingleThreadPool is added to own the single-threaded WorkerThreadPool and can be returned by the new function Context::getShaderCompileThreadPool(). Otherwise, if the extension is enabled, the (renamed) Context::mMultiThreadPool is returned. Bug: angleproject:6748 Change-Id: Ic8d3a183f397608f3002a05480deb976dfe44792 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3360337 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Mohan Maiya feb599ad 2021-12-09T20:17:14 Invalidate EGL handles during eglTerminate EGL 1.5 spec says - Termination marks all EGL-specific resources, such as contexts and surfaces, associated with the specified display for deletion. Handles to all such resources are invalid as soon as eglTerminate returns Move EGL object handles to another set, tracking invalid objects, during display terminate. Destroy these invalid objects during eglReleaseThread Bug: angleproject:6798 Test: EGLMultiContextTest.NegativeTestAfterEglTerminate* Test: EGLMultiContextTest.RepeatedEglInitAndTerminate* Test: Android CTS WrapperTest.testThreadCleanup Change-Id: Ie160212c98367493e645d9d1c8260e7a30649386 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3329273 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Mohan Maiya 6c172e4b 2021-11-20T16:27:14 Add support for memory cleanup on process exit This patch adds a callback to cleanup memory on process exit. Bug: angleproject:6723 Test: Android CTS WrapperTest.testThreadCleanup Change-Id: Ia517d4c6ae280ddc1f17a3b6f77d437aaaad0678 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3294581 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jonah Ryan-Davis f422f21a 2021-11-09T18:42:15 Reland "Metal: Reintroduce GPU power preference selection code." This reverts commit 67a8cf07a740c5ce3aafd2ad7fddd370451b3525. Reason for revert: Landed Chromium-side dependency: https://chromium-review.googlesource.com/c/chromium/src/+/3271170 Original change's description: > Revert "Metal: Reintroduce GPU power preference selection code." > > This reverts commit 017161701b7dbf70a13f3c180a39e1fa45c27d9f. > > Reason for revert: Blocking roller, please re-land with the fix. > > Original change's description: > > Metal: Reintroduce GPU power preference selection code. > > > > This CL re-introduces the GPU power preference code to > > the metal backend. It also reworks EGLDisplay caching > > in the frontend to cache based on the native display > > as well as the power preference attribute. > > A new extension, EGL_ANGLE_display_power_preference is > > added based on EGL_ANGLE_power_preference. This extension > > is a client extension that allows selection of GPU on > > display creation, similar to how GPUs are selected on > > context creation in EGL_ANGLE_power_preference. > > This CL adds EGLDisplayPowerPreferenceTest and enables it on > > the metal backend. > > > > Bug: angleproject:6143 > > Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986 > > Reviewed-by: Kenneth Russell <kbr@chromium.org> > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Reviewed-by: Gregg Tavares <gman@chromium.org> > > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> > > TBR=kbr@chromium.org,gman@chromium.org,jonahr@google.com,jmadill@chromium.org,angle-scoped@luci-project-accounts.iam.gserviceaccount.com > > Change-Id: I4f775bf7139253a87b033a30e0da2100b3c1bb02 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: angleproject:6143 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270749 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> # Not skipping CQ checks because this is a reland. Bug: angleproject:6143 Change-Id: Id9b0a5cbb76e4dea9e2f2da2b1c47a0587dfdaf5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270970 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill 67a8cf07 2021-11-09T15:10:50 Revert "Metal: Reintroduce GPU power preference selection code." This reverts commit 017161701b7dbf70a13f3c180a39e1fa45c27d9f. Reason for revert: Blocking roller, please re-land with the fix. Original change's description: > Metal: Reintroduce GPU power preference selection code. > > This CL re-introduces the GPU power preference code to > the metal backend. It also reworks EGLDisplay caching > in the frontend to cache based on the native display > as well as the power preference attribute. > A new extension, EGL_ANGLE_display_power_preference is > added based on EGL_ANGLE_power_preference. This extension > is a client extension that allows selection of GPU on > display creation, similar to how GPUs are selected on > context creation in EGL_ANGLE_power_preference. > This CL adds EGLDisplayPowerPreferenceTest and enables it on > the metal backend. > > Bug: angleproject:6143 > Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986 > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Gregg Tavares <gman@chromium.org> > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> TBR=kbr@chromium.org,gman@chromium.org,jonahr@google.com,jmadill@chromium.org,angle-scoped@luci-project-accounts.iam.gserviceaccount.com Change-Id: I4f775bf7139253a87b033a30e0da2100b3c1bb02 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:6143 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270749 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 01716170 2021-10-14T13:24:41 Metal: Reintroduce GPU power preference selection code. This CL re-introduces the GPU power preference code to the metal backend. It also reworks EGLDisplay caching in the frontend to cache based on the native display as well as the power preference attribute. A new extension, EGL_ANGLE_display_power_preference is added based on EGL_ANGLE_power_preference. This extension is a client extension that allows selection of GPU on display creation, similar to how GPUs are selected on context creation in EGL_ANGLE_power_preference. This CL adds EGLDisplayPowerPreferenceTest and enables it on the metal backend. Bug: angleproject:6143 Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Tim Van Patten 8c9b8f03 2021-11-03T14:50:54 Capture/Replay: Don't finish() destroyed Contexts If an app destroys a context, but keeps it current on a thread, ANGLE will reset the context, but can't delete it. This can lead to a segfault if ANGLE attempts to call Context::finish() on a destroyed context. To solve this, check if the context has been destroyed in ShareGroup::finishAllContexts(). Bug: angleproject:6653 Change-Id: Ib30e352ad6395e01f8fab0095cd6231dfb10d8ae Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3260726 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
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>
Tim Van Patten c85d9a19 2021-09-07T11:41:10 Destroy all unreferenced Contexts resources during terminate() When eglTerminate() is called, all of the Contexts that the Display owns need to be destroyed if they are not referenced by (current to) any Threads. This also requires a change to Display::releaseContext(), to remove the recursive call to Display::terminate() that could occur when releasing the Contexts during terminate(). Bug: skia:12413 Test: EGLContextSharingTestNoFixture.EglTerminateMultipleTimes Change-Id: Ibd0a3e22725d29875c4089bdaae47c98e5084f35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3144146 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1ca1589f 2021-09-13T10:56:58 Give GLES extension bools a vendor suffix. This is in preparation for auto-generation which will give all of these bools suffixes. Bug: angleproject:6379 Change-Id: I7e3f6c9b644c41a2165e6bf7b62d661fd352a250 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3158503 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 8bb3c827 2021-07-22T19:06:40 Fix Multithreaded eglDestroyContext()/eglTerminate() The following EGL calls can lead to a crash in eglMakeCurrent(): Thread A: eglMakeCurrent(context A) Thread B: eglDestroyContext(context A) B: eglTerminate() <<--- this release context A Thread A: eglMakeCurrent(context B) The eglMakeCurrent(context B) call will assert when attempting to unMakeCurrent(), since thread A doesn't know that context A was already destroyed by thread B. To fix this: 1.) A Context will only be released once there are no Threads that currently have a reference to it (no longer have the Context current). - Context::mIsCurrent is being removed, since it was inaccurate and not thread-safe. For example, when eglTerminate() was called, the eglTerminate()'ing-Thread would "steal" the Context that was current on another Thread to destroy it. 2.) A Display will only be fully terminated and its resources released once all Contexts have been destroyed and are no longer current. Otherwise, Display::terminate() will return if any Contexts are still in use by a Thread. EGL 1.5 Specification 3.2 Initialization If contexts or surfaces, created with respect to dpy are current (see section 3.7.3) to any thread, then they are not actually destroyed while they remain current. If other resources created with respect to dpy are in use by any current context or surface, then they are also not destroyed until the corresponding context or surface is no longer current. With this fix, the app com.netmarble.sknightsmmo can start. This also exposed an issue with GlslangFinalize(), since glslang can only be initialized/finalized once per process. Otherwise, the following EGL commands will call GlslangFinalize() without ever being able to GlslangInitialize() again, leading to crashes since GlslangFinalize() cleans up glslang for the entire process. dpy1 = eglGetPlatformDisplay() | eglInitialize(dpy1) | GlslangInitialize() dpy2 = eglGetPlatformDisplay() | eglInitialize(dpy2) | GlslangInitialize() eglTerminate(dpy2) | GlslangFinalize() eglInitialize(dpy1) | isInitialized() == true Since Display::isInitialized() == true, the rest of Display::initialize() is skipped and GlslangInitialize() is not called. Later, the next test that attempts to compile a program will crash due to glslang no longer being initialized. Finally, this exposed the following tests leaking EGLContext handles: - EGLSurfaceTest::initializeContext() - EGLContextSharingTest.DisplayShareGroupContextCreation - EGLCreateContextAttribsTest.IMGContextPriorityExtension - EGLMultiContextTest.TestContextDestroySimple Other tests were failing to reset the context, preventing the Display from being terminated since there were still references to Contexts owned by the display: eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); Bug: angleproject:6208 Bug: angleproject:6304 Bug: angleproject:6322 Test: EGLContextSharingTest.EglTerminateMultiThreaded Test: EGLContextSharingTestNoFixture.EglDestoryContextManyTimesSameContext Test: Load com.netmarble.sknightsmmo Change-Id: I160922af93db6cabe0ed396be77762fa8dfc7656 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3046961 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Cody Northrop 96a48a30 2021-08-18T14:33:41 FrameCapture: Only finish contexts that have been current The finish() was crashing during initial Fortnite debug. Test: Fortnite MEC Bug: b/180418810 Bug: angleproject:5658 Change-Id: If8c7376c8ff3ee82581db40c5611309cf700c00d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3105388 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 839d5318 2021-08-16T08:29:28 Capture/Replay: Changes to MEC first frame capture. Recent changes made it so it was impossible to trigger MEC *after* the first frame and *before* the second frame. Instead it was only possible to capture *before* the first frame or *after* the second frame. Makes it possible for the retracing script to do identical captures. Also includes a number of refactorings to make it simpler to follow the code, including renaming methods, and removing some extra output files. Bug: angleproject:5133 Change-Id: Ice6a189eb9f4d53e8ee1ba39beb537af2ef5fd9f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3097807 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Alexis Hetu 729cbcf1 2021-07-23T11:18:18 Make Display and X11 available in the same build Chromium can use the 'use_ozone' and 'use_x11' build flags simultaneously, so we need the Vulkan display to still be selectable, even when the 'use_x11' flag is used. This is required to make SwANGLE work with Ozone/Wayland, which is going to use EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE when SwANGLE is requested. Bug: chromium:1231934 Change-Id: I2ac1d3d9bc231608d7f77e9a2540f4c538840076 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3049351 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Jamie Madill 8c1cbc5a 2021-07-16T14:01:53 Implement EGL_KHR_mutable_render_buffer in the front-end. Note that we do not currently expose any mutable configs. Bug: b/192352791 Change-Id: Ib97f7889fedd91d09ef32dc7e7494ea4476cd7bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035583 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Geoff Lang 232e5236 2021-07-08T15:08:35 Remove the explicit context extension. This extension currently has no known users and doubles the number of entry points that ANGLE exports which is a significant binary size cost. This saves about 130kb of binary size on Android. Bug: chromium:1084580 Change-Id: Ib0fc4930b38a33bd61434f7d0030ba9fb9b93ba7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3015518 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Peng Huang a8e98a23 2021-07-10T15:25:20 Fix gl::Context::unMakeCurrent crashes The crash is because Display::makeCurrent() may fail, in that case, egl_stubs.cpp will not update the current context in global_state and Thread accordingly. And then Context::refCount could be reach 0, and be released, however egl_stubs.cpp still thinks the context is current, and then user-after-free happens. This CL fixes the problem by updating current context of Thread in Display::makeCurrent, and reading the current context of Thread in egl_stubs.cpp and setting it to global_state. Bug: chromium:1171371 Change-Id: Ifc5fffb0e4902c9c72514839d03e5783d50fe283 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3017210 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Kyle Piddington d33a2222 2021-04-26T16:56:15 Upstream Apple's direct-to-Metal backend: compile libANGLE. This change is meant to merge the metal backend changes from Apple's direct-to-Metal backend. Taken from Kyle Piddington's CL: https://chromium-review.googlesource.com/c/angle/angle/+/2857366/ The goal of this CL is to merge the metal backend code in a state that compiles, but not to switch the Metal backend over to using the direct-to-metal backend yet. Bug: angleproject:5505 Bug: angleproject:6127 Change-Id: If6783e06e0086b3a1dd25c6f53caca5cfc96cb86 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2950067 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Sergey Ulanov b73eee71 2021-07-07T18:51:35 Reland: [Vulkan] Add DisplayVkNull Currently all DisplayVk implementations depend on VK_KHR_swapchain and VK_KHR_surface extensions. When running Chromium on Fuchsia these extensions are never used (content is shown on the screen using ImagePipe API without dependency on swapchain). ANGLE still depended on these extensions for DisplayVkFuchsia. This CL adds DisplayVkNull, which allows to run ANGLE without dependency on swapchain. It's usable only offscreen and cannot present content on a surface. Bug: chromium:1203879 Change-Id: I5cadcdf46ed1cfb5ebb3cb69dbfef063e9e2b826 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3012368 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Peter Kasting 1bffabe8 2021-06-29T18:13:39 Fix -Wunreachable-code-aggressive. Bug: chromium:1066980 Change-Id: I1fa08a40dbf223d60a10681af33ca8a29b12bf8b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2991094 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gert Wollny b6009f64 2021-06-17T14:53:03 Capture/Replay: Add feature for robust resource init Query the feature when creating the display and the context, and pass the flag to the created context and also to durfaces. With that we create surfaces that will be marked "MayNeedInit" and are initialized if the resource is cleared or invalidated. Bug: angleproject:6041 Change-Id: I292f2e3f931736a18db93695441407e17d2265b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2976656 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Geoff Lang 88156d26 2021-05-18T23:55:32 Revert "[Vulkan] Add DisplayVkNull" This reverts commit cbbaf76b758fb6a37175795b1f424549d535fbdc. Reason for revert: Suspecting this breaks the fuchsia_x64 bot WebGL tests. Ex: https://chromium-review.googlesource.com/c/chromium/src/+/2904812 Original change's description: > [Vulkan] Add DisplayVkNull > > Currently all DisplayVk implementations depend on VK_KHR_swapchain and > VK_KHR_surface extensions. When running Chromium on Fuchsia these > extensions are never used (content is shown on the screen using > ImagePipe API without dependency on swapchain). ANGLE still depended > on these extensions for DisplayVkFuchsia. > This CL adds DisplayVkNull, which allows to run ANGLE without dependency > on swapchain. It's usable only offscreen and cannot present content on > a surface. > > Bug: chromium:1203879 > Change-Id: I4d1307060967ffa68877c4300ea4d5590eeb2152 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2861313 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: chromium:1203879 Change-Id: I6701ffff48fcb925f387e63b356d2d5cf360ea7e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2904183 Reviewed-by: Geoff Lang <geofflang@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Sergey Ulanov cbbaf76b 2021-04-29T16:09:09 [Vulkan] Add DisplayVkNull Currently all DisplayVk implementations depend on VK_KHR_swapchain and VK_KHR_surface extensions. When running Chromium on Fuchsia these extensions are never used (content is shown on the screen using ImagePipe API without dependency on swapchain). ANGLE still depended on these extensions for DisplayVkFuchsia. This CL adds DisplayVkNull, which allows to run ANGLE without dependency on swapchain. It's usable only offscreen and cannot present content on a surface. Bug: chromium:1203879 Change-Id: I4d1307060967ffa68877c4300ea4d5590eeb2152 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2861313 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Amy Liu 95935176 2021-03-26T17:38:21 Handle the compression of big pipeline cache. Big pipeline cache will cost much time to compress. Regarding the perfomance, handle the compression of big pipeline cache in this way: 1)Return when the pipeline cache data is larger than 10M. 2)Use worker thread to complete compression. Bug: angleproject:4722 Change-Id: I62eb69d8c46729261f0502af01450ec301c258f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2788169 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Doug Horn fdba40fe 2021-03-31T12:52:00 Reland "Fix multithreaded crash on draw commands on D3D11 backend." This is a reland of 8b9889bf62272fea2495331b622bde1f7c781bd0 The previous CL relied on a define which now only exists in a specific gn configuration. This reland removes D3D11 as a multithread-supported platform in the test configuration. Original change's description: > Fix multithreaded crash on draw commands on D3D11 backend. > > A crash can occur if thread A is executing eglDestroyContext while > thread B issues a draw call, if the threads are interleaved in such a > manner that a makeCurrent occurs without triggering a change to the > global context and a dirtyAllState call. We handle that case by > explicitly making current the proper contexts in the eglDestroyContext > call. > > A test has been added that triggers a crash without this fix when > running on the D3D11 backend. In addition, all of MultithreadingTest > is enabled for the D3D11 backend. > > Test: Ran MultithreadingTest. Test exhibits a crash before this > change, and does not after this change. Also ran: > dEQP-EGL.functional.sharing.gles2.multithread.* > dEQP-EGL.functional.multithread.* > > Bug: b/183756357 > Change-Id: Ic6f76a062868b2f3b4e60d29dc087ec180bfb7cd > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2798591 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Doug Horn <doughorn@google.com> Bug: b/183756357 Change-Id: I5be9a011ea99a69730eddc9e4da23bcf92ed3bf2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2815243 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Doug Horn <doughorn@google.com>
Doug Horn fc189386 2021-04-08T21:51:46 Revert "Fix multithreaded crash on draw commands on D3D11 backend." This reverts commit 8b9889bf62272fea2495331b622bde1f7c781bd0. Reason for revert: Breaks CI Original change's description: > Fix multithreaded crash on draw commands on D3D11 backend. > > A crash can occur if thread A is executing eglDestroyContext while > thread B issues a draw call, if the threads are interleaved in such a > manner that a makeCurrent occurs without triggering a change to the > global context and a dirtyAllState call. We handle that case by > explicitly making current the proper contexts in the eglDestroyContext > call. > > A test has been added that triggers a crash without this fix when > running on the D3D11 backend. In addition, all of MultithreadingTest > is enabled for the D3D11 backend. > > Test: Ran MultithreadingTest. Test exhibits a crash before this > change, and does not after this change. Also ran: > dEQP-EGL.functional.sharing.gles2.multithread.* > dEQP-EGL.functional.multithread.* > > Bug: b/183756357 > Change-Id: Ic6f76a062868b2f3b4e60d29dc087ec180bfb7cd > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2798591 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Doug Horn <doughorn@google.com> Bug: b/183756357 Change-Id: I2e9d6385576330f84623d7dafbf690642fcb441f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2815242 Commit-Queue: Doug Horn <doughorn@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Doug Horn 8b9889bf 2021-03-31T12:52:00 Fix multithreaded crash on draw commands on D3D11 backend. A crash can occur if thread A is executing eglDestroyContext while thread B issues a draw call, if the threads are interleaved in such a manner that a makeCurrent occurs without triggering a change to the global context and a dirtyAllState call. We handle that case by explicitly making current the proper contexts in the eglDestroyContext call. A test has been added that triggers a crash without this fix when running on the D3D11 backend. In addition, all of MultithreadingTest is enabled for the D3D11 backend. Test: Ran MultithreadingTest. Test exhibits a crash before this change, and does not after this change. Also ran: dEQP-EGL.functional.sharing.gles2.multithread.* dEQP-EGL.functional.multithread.* Bug: b/183756357 Change-Id: Ic6f76a062868b2f3b4e60d29dc087ec180bfb7cd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2798591 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Doug Horn <doughorn@google.com>
Peng Huang 0e8f7727 2021-02-10T15:03:10 Fix crash in gl::Context::unMakeCurrent() gl::Context's ctor may need to create a native EGL context and it can fail. If it fails, the context->mImplementation will be nullptr, and it will cause crash elsewhere. Fix the problem by checking it after create a gl::Context instance. Bug: chromium:1171371 Change-Id: Ic57f088dcbf9716b85fee92bf54d557eb94642d0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2686439 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Jamie Madill 6fc10389 2021-02-10T11:20:16 Move Frame Capture to capture/ folder. This will make it easier to trigger the trace tests when these files are modified. Bug: angleproject:5530 Change-Id: I5f0c450595b380cd91b20c1477dc1845bee35dd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2686120 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Stephen White ad60c22d 2021-02-09T13:22:09 Add an option to use "metal" as ANGLE_DEFAULT_PLATFORM. Bug: angleproject:5632 Change-Id: Id470993a01609ace851372b1bbe01fee8cde274b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2684635 Commit-Queue: Stephen White <senorblanco@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 4968f6f2 2021-02-04T16:40:36 Move getRendererDescription from ContextImpl to DisplayImpl The other backend description strings are in DisplayImpl. This will help with caching the result of glGetString in the GL backend. Also Update the getters to not be const in order to allow caching. Bug: chromium:1173672 Change-Id: I43df35688762b23429f47f169c04482cf4cd089a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2676881 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Kenneth Russell 572afd90 2021-01-29T22:45:29 Disable SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS workaround. It causes incorrect compilation of some shaders. The original graphics driver bugs that motivated enabling it have been fixed, at least on one of the platforms (macOS). Tested with new WebGL conformance test in https://github.com/KhronosGroup/WebGL/pull/3214 . Bug: chromium:1165751 Change-Id: Iee9747769ca918aab143592d6cf158ce02a75ee0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2661024 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: 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 f5d56799 2021-01-20T10:00:54 Do not make context current during context deletion. ANGLE will make a context current during deletion, so ANGLE can release related resources, but for an external context, the API user should make sure the native context is current during deleting the ANGLE external context, so ANGLE doesn't need to make the context current. Bug: angleproject:5509 Change-Id: Ia4cee4e3965e9e9e811e3f989f6f6d72bd940f41 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2640593 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Peng Huang 5635dbb9 2021-01-15T09:43:25 Only call context::unMakeCurrent() if context is changed. Bug: angleproject:5509 Change-Id: Ifbc6aa23a218498c5e2f6a094296045b2d5dfacf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633421 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis ec0acf64 2020-11-25T09:58:31 Reland "Reinitialize GL_VENDOR string when GPU switches" This is a reland of 0f083ab02635f48dfa3393df0d229287f466f480 Original change's description: > Reinitialize GL_VENDOR string when GPU switches > > We already update the GL_RENDERER string. We should do the same for > GL_VENDOR so this information is passed along correctly. > > Bug: chromium:1152212 > Change-Id: I639700bfebdc9e77ec3c6b41fcd6516e8c32139d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2560824 > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Bug: chromium:1152212 Change-Id: I044313366ce6ce7040e5c203a979b148dcb564dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2569364 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Ian Elliott 5b9fac78 2020-12-02T17:54:09 Revert "Reinitialize GL_VENDOR string when GPU switches" This reverts commit 0f083ab02635f48dfa3393df0d229287f466f480. Reason for revert: Seems to be blocking the ANGLE auto-roller (see: http://anglebug.com/5422) Original change's description: > Reinitialize GL_VENDOR string when GPU switches > > We already update the GL_RENDERER string. We should do the same for > GL_VENDOR so this information is passed along correctly. > > Bug: chromium:1152212 > Change-Id: I639700bfebdc9e77ec3c6b41fcd6516e8c32139d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2560824 > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> TBR=geofflang@chromium.org,syoussefi@chromium.org,jonahr@google.com Change-Id: I01bbb08946d16cf821f4fb1bfd8b1cade1ab70f1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:1152212 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2567460 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Jonah Ryan-Davis 0f083ab0 2020-11-25T09:58:31 Reinitialize GL_VENDOR string when GPU switches We already update the GL_RENDERER string. We should do the same for GL_VENDOR so this information is passed along correctly. Bug: chromium:1152212 Change-Id: I639700bfebdc9e77ec3c6b41fcd6516e8c32139d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2560824 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill fb82b119 2020-11-22T09:05:06 EGL: Add const to several methods. This is in preparatino for auto-generating the EGL validation header. The auto-generation script will force multiple parameters to const. Bug: angleproject:2621 Change-Id: I04e442c6ff118fd7c296341f12f442901f6fb8c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552979 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
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>
Xiaoxuan Liu 1f344d60 2020-11-05T16:33:42 Vulkan: Add support for headless surface How to enable: add below args config to args.gn in linux build ``` use_x11=false use_ozone=false angle_vulkan_display_mode="headless" ``` Bug: angleproject:5260 Change-Id: Iec931e74c061b56376ef028814859aa58af07f2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2536518 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
James Darpinian e53efb18 2020-11-03T16:22:19 Allow choosing EAGL or CGL at runtime Dean Jackson made this change downstream in WebKit: https://bugs.webkit.org/show_bug.cgi?id=216722 Change ANGLE to dynamically load either EAGL (OpenGLES) or CGL (OpenGL) depending on both compile and runtime configurations. Intel Mac -> CGL Intel Mac Catalyst -> CGL Intel iOS Simulator -> EAGL iOS Device -> EAGL Apple Silicon Mac -> CGL Apple Silicon Mac Catalyst (with Mac app) -> CGL Apple Silicon Mac Catalyst (with iOS app) -> EAGL The trickiest bit is Apple Silicon Mac Catalyst, which depends on the type of the application it is attempting to run. In that case ANGLE must compile both the CGL and EAGL interfaces and then pick one to use after launch. Bug: angleproject:5253 Change-Id: Iba167b3cc3105e457dcfc9bc14147d0fc3e70bac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2500185 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
James Darpinian 27af0b2d 2020-10-19T16:49:48 Reland "ANGLE_platform_angle_device_context_volatile_* extensions" This is a reland of e70f6aa679dd72eca5c88c71b0932928e92d6067 Original change's description: > ANGLE_platform_angle_device_context_volatile_* extensions > > Change from Kimmo Kinnunen downstream: > https://bugs.webkit.org/show_bug.cgi?id=216106 > > Add two extensions for EAGL and CGL backends to declare the > underlying platform context being "volatile". It means that > the thread-global current context is being modified behind > ANGLE. If ANGLE context is marked volatile for a particular > API, it will sync the underlying context for every EGL > function that needs the context. Most intuitive use is > for the client to call eglMakeCurrent before calling any > gl function if the client knowns the platform state might > be dirty. > > Implement eglReleaseThread for EAGL and CGL backends. > Releasing thread will unset the platform current context. > > Fix a bug of omitting EGL_ANGLE_device_eagl from being > advertised. > > Bug: angleproject:5104 > Change-Id: I1ec98ad35bc0caada23556ae8697fdef20f65b1a > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2486548 > Commit-Queue: James Darpinian <jdarpinian@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:5104 Change-Id: I88265625a4bb4c1412532768d17d7b4356c7be41 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2508842 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Xiaoxuan Liu 61180d01 2020-10-12T16:40:13 Reland "Add support for Linux vulkan backend with VK_KHR_display" This is a reland of a7bb6a9b15ddeb8497523f8871deb25de2676d9f Original change's description: > Add support for Linux vulkan backend with VK_KHR_display > > Implement Linux simple display mode with vulkan backend > through VK_KHR_display. > > Added value 'EGL_PLATFORM_VULKAN_DISPLAY_MODE_SIMPLE_ANGLE' for > attribute EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE to identify > the new simple display mode. Also reserved > EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE for headless mode. > > How to enable: > Add > > ``` > use_x11=false > angle_vulkan_display_mode="simple" # default value > ``` > > into args.gn, then compile with linux vulkan args. > > Bug: angleproject:5214 > Change-Id: I1247585b9de8b55df106aba99322281f1c183203 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2494320 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:5214 Change-Id: I3921f6cb292c86658f39e739a878baad1ef64dba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2515327 Commit-Queue: Xiaoxuan Liu <xiaoxuan.liu@arm.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 807e6b33 2020-11-02T17:15:03 Revert "Add support for Linux vulkan backend with VK_KHR_display" This reverts commit a7bb6a9b15ddeb8497523f8871deb25de2676d9f. Reason for revert: Failing on Ozone builder, see bug. Bug: angleproject:5289 Original change's description: > Add support for Linux vulkan backend with VK_KHR_display > > Implement Linux simple display mode with vulkan backend > through VK_KHR_display. > > Added value 'EGL_PLATFORM_VULKAN_DISPLAY_MODE_SIMPLE_ANGLE' for > attribute EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE to identify > the new simple display mode. Also reserved > EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE for headless mode. > > How to enable: > Add > > ``` > use_x11=false > angle_vulkan_display_mode="simple" # default value > ``` > > into args.gn, then compile with linux vulkan args. > > Bug: angleproject:5214 > Change-Id: I1247585b9de8b55df106aba99322281f1c183203 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2494320 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> TBR=syoussefi@chromium.org,sunny.sun@arm.com,jmadill@chromium.org,xiaoxuan.liu@arm.com Change-Id: I3e2a2a044c220ed8d25be0d82184e5fba7b9c06a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:5214 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2514637 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Xiaoxuan Liu a7bb6a9b 2020-10-12T16:40:13 Add support for Linux vulkan backend with VK_KHR_display Implement Linux simple display mode with vulkan backend through VK_KHR_display. Added value 'EGL_PLATFORM_VULKAN_DISPLAY_MODE_SIMPLE_ANGLE' for attribute EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE to identify the new simple display mode. Also reserved EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE for headless mode. How to enable: Add ``` use_x11=false angle_vulkan_display_mode="simple" # default value ``` into args.gn, then compile with linux vulkan args. Bug: angleproject:5214 Change-Id: I1247585b9de8b55df106aba99322281f1c183203 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2494320 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 68b95b63 2020-10-29T14:09:08 Revert "ANGLE_platform_angle_device_context_volatile_* extensions" This reverts commit e70f6aa679dd72eca5c88c71b0932928e92d6067. Reason for revert: dEQP failures: dEQP.EGL/functional_get_frame_timestamps_rgb565_no_depth_no_stencil dEQP.EGL/functional_get_frame_timestamps_rgb565_no_depth_stencil dEQP.EGL/functional_hdr_metadata_cta861_3 dEQP.EGL/functional_hdr_metadata_smpte2086 dEQP.EGL/functional_mutable_render_buffer_basic dEQP.EGL/functional_swap_buffers_with_damage_resize_after_swap_buffer_age_clear dEQP.EGL/functional_swap_buffers_with_damage_resize_after_swap_buffer_age_clear_clear dEQP.EGL/functional_swap_buffers_with_damage_resize_after_swap_buffer_age_render dEQP.EGL/functional_swap_buffers_with_damage_resize_before_swap_buffer_age_clear dEQP.EGL/functional_swap_buffers_with_damage_resize_before_swap_buffer_age_clear_clear dEQP.EGL/functional_swap_buffers_with_damage_resize_before_swap_buffer_age_render Original change's description: > ANGLE_platform_angle_device_context_volatile_* extensions > > Change from Kimmo Kinnunen downstream: > https://bugs.webkit.org/show_bug.cgi?id=216106 > > Add two extensions for EAGL and CGL backends to declare the > underlying platform context being "volatile". It means that > the thread-global current context is being modified behind > ANGLE. If ANGLE context is marked volatile for a particular > API, it will sync the underlying context for every EGL > function that needs the context. Most intuitive use is > for the client to call eglMakeCurrent before calling any > gl function if the client knowns the platform state might > be dirty. > > Implement eglReleaseThread for EAGL and CGL backends. > Releasing thread will unset the platform current context. > > Fix a bug of omitting EGL_ANGLE_device_eagl from being > advertised. > > Bug: angleproject:5104 > Change-Id: I1ec98ad35bc0caada23556ae8697fdef20f65b1a > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2486548 > Commit-Queue: James Darpinian <jdarpinian@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,kbr@chromium.org,jdarpinian@chromium.org,jonahr@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:5104 Change-Id: Ib683625a55a582c39e5a4a0466038cfa6e782e6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2507260 Reviewed-by: Geoff Lang <geofflang@chromium.org>