src/common/system_utils_winuwp.cpp


Log

Author Commit Date CI Message
Jamie Madill b2c01ac4 2021-09-28T12:57:45 Report process memory in perf tests. Bug: angleproject:6440 Change-Id: Ifdd4389266e3ac55963a3069d437c631bf73f72a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3191194 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Andrew Naumov d36df8d7 2022-02-10T15:12:01 Unicode support for system_utils on Windows Failed to load ANGLE_GLESV2_LIBRARY_NAME via ansi WinAPI if path contains unicode, use wide version instead. Bug: chromium:1296105 Change-Id: Ifae18b2aba83f3ae84954cc4dd9afc0e2c58834c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3452103 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 2d3ce72d 2022-01-20T10:13:06 Refactor shared library load to avoid allocations. Fixes a leak of an angle::Library detected in the EGL loader. Bug: angleproject:6937 Change-Id: I623aa6172b98a35465e1d2641b92f67bdc5d24e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3403060 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Alexis Hetu cac81f07 2021-12-14T22:56:15 Return full error info when opening a library with dlopen This CL adds a parameter to OpenSharedLibrary and OpenSharedLibraryWithExtension which is used to return the full path of the library which was opened. If dlopen failed, the string also contains the result of dlerror which explains what the error was. Bug: chromium:1246171 Change-Id: I374c7e2dfa18853c8137b4cbea06af8db3fdb501 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3340020 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Lubosz Sarnecki 56aee5d6 2021-12-10T12:32:58 Reland "system_utils: Add memory protection functionality." This is a reland of b1c703e5f5e44514e8db958a5fb39ff16e514fd8 that was reverted in 663831aa676c59829cc3d822340812f016bf77f6. Skip PageFaultHandlerProtect and PageFaultHandlerDefaultHandler on macOS and Fuchsia. Original change's description: > Reland "system_utils: Add memory protection functionality." > > This is a reland of ab75a90ff4ecb9d99b5c72bde92222b07c285401 > that was reverted in b007e667a8f94b47788a5ba0b2e61c9ac2d1285f. > > Implement PageFaultHandler and memory protection functions. > Uses mprotect and sigaction on POSIX and equivalent Win API functions on > win32. > > Add tests to system_utils_unittests. > > Add stubs for winuwp. > > Replace ASSERT with ASSERT_TRUE in the PageFaultHandlerDefaultHandler > test to make it succeed on release builds, as the code was optimized > out. Furthermore the test did not correctly remove protection from the > whole area it protected, which caused a hang after deinitialization on > some build configurations, since the custom page fault handler was also > still in place. The test now correclty removes protection from the whole > area and sets back the original page fault handler. > > Test: angle_unittests --gtest_filter="SystemUtils.PageFaultHandler*" > Bug: angleproject:5857 > Change-Id: Ibb0acfefd9a09c3360c04c812a2a8346b951e1da > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3322992 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Test: angle_unittests --gtest_filter="SystemUtils.PageFaultHandler*" Bug: angleproject:5857 Change-Id: Ifaa966a7c569aa9ff0112897a02fa8f873cd52dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3329610 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Alexis Hetu f7d92a32 2021-12-10T10:23:32 Add debug info when loading EGL entry points fails Mac11 bots are often failing with the: "Error loading EGL entry points" error for an unknown reason. This CL adds the library path to the error message to see if it's trying to open the correct file. Bug: chromium:1277690 Change-Id: Ieb73a3097702933a89794d92c19ee44a6301c169 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3330576 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Jamie Madill 663831aa 2021-12-09T18:08:28 Revert "Reland "system_utils: Add memory protection functionality."" This reverts commit b1c703e5f5e44514e8db958a5fb39ff16e514fd8. Reason for revert: Fails on fuchsia bots: https://ci.chromium.org/ui/p/chromium/builders/try/fuchsia_arm64/1020498/overview mprotect failed: Not supported Original change's description: > Reland "system_utils: Add memory protection functionality." > > This is a reland of ab75a90ff4ecb9d99b5c72bde92222b07c285401 > that was reverted in b007e667a8f94b47788a5ba0b2e61c9ac2d1285f. > > Implement PageFaultHandler and memory protection functions. > Uses mprotect and sigaction on POSIX and equivalent Win API functions on > win32. > > Add tests to system_utils_unittests. > > Add stubs for winuwp. > > Replace ASSERT with ASSERT_TRUE in the PageFaultHandlerDefaultHandler > test to make it succeed on release builds, as the code was optimized > out. Furthermore the test did not correctly remove protection from the > whole area it protected, which caused a hang after deinitialization on > some build configurations, since the custom page fault handler was also > still in place. The test now correclty removes protection from the whole > area and sets back the original page fault handler. > > Test: angle_unittests --gtest_filter="SystemUtils.PageFaultHandler*" > Bug: angleproject:5857 > Change-Id: Ibb0acfefd9a09c3360c04c812a2a8346b951e1da > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3322992 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Bug: angleproject:5857 Change-Id: Iaab4067a7ec9240bb6c64b810ac6d3ea7bd86fe1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3327743 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Lubosz Sarnecki b1c703e5 2021-12-08T14:53:46 Reland "system_utils: Add memory protection functionality." This is a reland of ab75a90ff4ecb9d99b5c72bde92222b07c285401 that was reverted in b007e667a8f94b47788a5ba0b2e61c9ac2d1285f. Implement PageFaultHandler and memory protection functions. Uses mprotect and sigaction on POSIX and equivalent Win API functions on win32. Add tests to system_utils_unittests. Add stubs for winuwp. Replace ASSERT with ASSERT_TRUE in the PageFaultHandlerDefaultHandler test to make it succeed on release builds, as the code was optimized out. Furthermore the test did not correctly remove protection from the whole area it protected, which caused a hang after deinitialization on some build configurations, since the custom page fault handler was also still in place. The test now correclty removes protection from the whole area and sets back the original page fault handler. Test: angle_unittests --gtest_filter="SystemUtils.PageFaultHandler*" Bug: angleproject:5857 Change-Id: Ibb0acfefd9a09c3360c04c812a2a8346b951e1da Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3322992 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Kai Ninomiya b007e667 2021-12-08T01:00:54 Revert "system_utils: Add memory protection functionality." This reverts commit ab75a90ff4ecb9d99b5c72bde92222b07c285401. Reason for revert: Causes angle_unittests to hang on many Linux FYI bots and likely Android. First known failures on Linux: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20FYI%20Release%20(AMD%20RX%205500%20XT)/7318/overview https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20FYI%20Release%20(Intel%20HD%20630)/30297/overview https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20FYI%20Experimental%20Release%20(Intel%20HD%20630)/43446/overview https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20FYI%20Release%20(Intel%20UHD%20630)/4720/overview https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20FYI%20Release%20(NVIDIA)/29040/overview https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20FYI%20Experimental%20Release%20(NVIDIA)/45374/overview And Android: https://ci.chromium.org/ui/p/chromium/builders/ci/Android%20FYI%20Release%20(Nexus%209)/35989/overview https://ci.chromium.org/ui/p/chromium/builders/ci/Android%20FYI%20Release%20(NVIDIA%20Shield%20TV)/33490/overview Original change's description: > system_utils: Add memory protection functionality. > > Implement PageFaultHandler and memory protection functions. > Uses mprotect and sigaction on POSIX and equivalent Win API functions on > win32. > > Add tests to system_utils_unittests. > > Add stubs for winuwp. > > Test: angle_unittests --gtest_filter="SystemUtils.PageFaultHandler*" > Bug: angleproject:5857 > Change-Id: Ia6d2e87c409e6139ccaebc8c7186cd4cd844fd28 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3236998 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Bug: angleproject:5857 Change-Id: I7df73a3ee3f5fa87f002045dfa87d8ca2747f60f No-Tree-Checks: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3322104 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
Lubosz Sarnecki ab75a90f 2021-10-21T20:20:07 system_utils: Add memory protection functionality. Implement PageFaultHandler and memory protection functions. Uses mprotect and sigaction on POSIX and equivalent Win API functions on win32. Add tests to system_utils_unittests. Add stubs for winuwp. Test: angle_unittests --gtest_filter="SystemUtils.PageFaultHandler*" Bug: angleproject:5857 Change-Id: Ia6d2e87c409e6139ccaebc8c7186cd4cd844fd28 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3236998 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Jamie Madill 48da1c35 2021-07-16T13:24:34 Vulkan: Prefer the local vulkan loader over the system one. Load the Vulkan loader ourselves and give vkGetInstanceProcAddr to volk. This allows us to always prefer loading from the current module directory instead of using the platform-specific ordering. Refactor angle::Library loading to use ModuleDir instead of ApplicationDir. CL originally authored by Geoff Lang. Bug: chromium:1219969 Change-Id: I21d1926e90fd66e1c23cea7323991ae55f3d22d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035444 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 7df7fc7f 2021-06-20T00:05:28 Tests: Add support for --renderdoc This change adds support for a new flag namely `--renderdoc` to end2end and deqp tests. With this flag, each test automatically starts and ends a frame capture in renderdoc, working around an issue where renderdoc refuses to capture a test frame that doesn't start or end with a swap. With end2end tests, the capture starts before test set up, and ends after test tear down. With deqp tests, it starts before init, ends and restarts after each test iteration and ends after deinit. Bug: angleproject:6072 Change-Id: Ib41b816aff121bf922d9147044cc363c33a62181 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2971835 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 930b2641 2020-03-23T14:47:03 Allow tests to run on native EGL. Adds support for Linux and Android native EGL testing. This can be useful for doing performance comparisons of ANGLE vs a native GL driver. Only enabled for the trace perf tests due to limitations in the test harness. Bug: angleproject:4596 Change-Id: Iba6d3ccd7c1275cf095893fab824a0ea33dc3a79 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2116254 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 5eadaf85 2020-01-13T17:21:53 Fix and improve UWP build. Reorganizes the build files to work with a more divided setup. It is unclear if we'll ever be able to run tests in a UWP config. This at least sets up the organization so it would at some point be possible. Bug: angleproject:4182 Change-Id: I49dddfcdc0118b11466fe171f949c28d101ac6a2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1953484 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Ethan Lee 7e753cb7 2019-12-03T10:05:24 Fix UWP build Bug: angleproject:4186 Change-Id: I4fcfe2553f209e191d88058fe30d31c88a61f69f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1947446 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ethan Lee 37ba927e 2019-11-20T01:51:12 UWP: Implement GetPathSeparatorForEnvironmentVar Bug: angleproject:4142 Change-Id: Idb5e1b540d9ac7ab802357f247b41a6546173a35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1925254 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Austin Kinross 11dc1635 2019-09-18T14:46:23 Add support for generating UWP (Windows Store) projects again Until late 2017, ANGLE supported Windows Store apps on Windows 8.1, Windows Phone 8.1, and Windows 10 (via the Universal Windows Platform, aka UWP). Unfortunately ANGLE deprecated support for Windows Store when it switched from GYP to GN in 2017. Since then, users have been able to use Microsoft\angle for their UWP apps but this isn't ideal since it's based on a 2017 copy of Google\angle. This PR bring back support for UWPs, so that UWP users can use Google\angle again. Specifically it: - Adds support for generating UWP projects via GN - Adds helper/util functions specific to UWP (they're mostly similar to the desktop Windows helpers) - Fixes some existing Windows Store code that's rotted since 2017 - Disables async shader compilation for UWPs, since its implementation calls wait on the UI thread (which is forbidden in UWPs) - Renames 'ANGLE_ENABLE_WINDOWS_STORE' to 'ANGLE_ENABLE_WINDOWS_UWP', since ANGLE only support UWPs now - Fixes misc other related issues (such as dependencies on D3D9 headers in API-agnostic code) Note that this doesn't bring back support for Windows/Phone 8.1. BUG=angleproject:3922 Change-Id: Ia79ae05a5e0e0a0625eb633bf1928722dfd3e85f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1811871 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>