src/tests/egl_tests/EGLRobustnessTest.cpp


Log

Author Commit Date CI Message
Yuxin Hu a990ba34 2023-08-02T17:21:00 Fix write out of bounds on non robust contexts crashes dEQP-EGL.functional.robustness.reset_context.shaders.out_of_bounds_non_robust.reset_status.writes.* tests are failing, because the test expectes EGL_SUCCESS upon eglMakeCurrent(EGL_NO_CONTEXT), regardless of whether the context was lost. This CL: 1) Changes the validation function of eglMakeCurrent: if the EGLContext passed to eglMakeCurrent is EGL_NO_CONTEXT, do not return EGL_CONTEXT_LOST even if the context is already lost. 2) Adds a lost context check in checkOneCommandBatch. If the context is lost, do not check fence status and assume all of the vulkan commands have finished execution, so that we can properly destroying all the resources before destroying the context. 3) Changes the GL error code from GL_INVALID_OPERATION to GL_CONTEXT_LOST when there is a vulkan device lost. Bug: b/286921997 Bug: b/289544394 Change-Id: I91e8a4105f0d7a3ec3b59bae58da80bc64ffa94a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4728466 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Geoff Lang cad19f01 2022-02-01T17:36:03 Vulkan: Wait forever when waiting on fences If a timeout occurs while waiting for the VK queue to be idle during context destruction, there is no way to safely delete the resources without potentially crashing as the driver is still reading them. Instead, wait forever and let Chrome's watchdog tear the process down. Bug: chromium:1223346 Change-Id: Ifa91465270f54b62a5ead88e8f26b3315072c380 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3430243 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Stephen White 386ef2ee 2022-11-17T13:16:27 Fix EGL validation of core robustness attribute. Implement EGL validation of EGL_CONTEXT_OPENGL_ROBUST_ACCESS. Previously, only the _EXT flavour was validated. Note that EGLRobustnessTest was changed to only exercise the core version. Bug: chromium:1385480 Change-Id: I51f93d6cd344d073cd9656c9fff9636ca4eac99d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4030882 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
Shahbaz Youssefi 0b7f3f5e 2022-10-12T17:47:06 More robustness tests Similar test to what was introduced in https://chromium-review.googlesource.com/c/angle/angle/+/3943534, but for vertex and compute shaders. Bug: angleproject:7629 Change-Id: I743233136125358edb6a15760b1ece63c36d3f85 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3949915 Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi 135022e4 2022-10-11T00:03:11 Vulkan: Create robust pipelines based on context state Previously, pipelines were made robust based on whether any context in the share group has so far been made robust. This means that pipelines created on non-robust contexts would still be compiled as robust. Inefficiency aside, this was buggy because robustness was not part of the pipeline cache key, so if a pipeline was created as non-robust first, then recreated in a robust context, it would reuse the non-robust variant. With VK_EXT_pipeline_protected_access, a similar situation arises for context protected-ness. However, it is incorrect in that case to create pipelines as protected unnecessarily. This change makes pipeline robustness a part of the pipeline cache key, in preparation for protectedness to be added similarly. Compute programs may now generate multiple pipelines as a result too. Bug: angleproject:7629 Change-Id: Ie95f10eff878f8c8b221c1018da44385c7aad15e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3943534 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 583fd03e 2022-09-29T16:28:05 Translator: Fix ClampIndirectIndices vs. unsized arrays A deepCopy() was missing from this code path, which led to an AST validation error. However, clamping indices for unsized arrays is not strictly correct. For example, an out of bounds write with robustness is expected to be dropped, not overwrite the last element. Since robustness already covers storage blocks, this clamping is no longer done. Bug: angleproject:7712 Change-Id: I96dd18ef47cd453f19391bdccbd4372c24854ade Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3924863 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.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>
Yuxin Hu f10625d3 2022-08-11T14:32:45 Enable Robustness Extension on ARM These dEQP tests failed due to Robustness was disabled: dEQP-GLES31.functional.debug.negative_coverage.callbacks.buffer#readn_pixels dEQP-GLES31.functional.debug.negative_coverage.log.buffer#readn_pixels dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer#readn_pixels dEQP-GLES31.functional.debug.error_filters#case_12 dEQP-GLES31.functional.debug.error_groups#case_12 Re-enable the Robustness Extension on ARM to check if mali driver supports GL_EXT_robustness extension now. If it does we can enable the robustness feature in ANGLE so that the above dEQP tests can pass. Bug: angleproject:7351 Bug: angleproject:4823 Bug: angleproject:2330 Change-Id: Ifce20e410607f2d4b6b3b55235081fef690c983c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3828441 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Eddie Hatfield 89e38b57 2022-06-22T15:04:08 Refactor to use ANGLETest vs ANGLETestWithParam Bug: angleproject:6747 Change-Id: I72ad52d0268eae0e1a401f12f3e94cc5efa402f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719002 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Yuly Novikov c03a4235 2021-02-20T16:14:37 Suppress UNINSTANTIATED_PARAMETERIZED_TEST failures on Nexus 5X GTest complains that we don't run some tests on GLES backend. Bug: chromium:1180570 Change-Id: I9427ac25c3b6f06f3c042caa3c0afc7000cf1599 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2710783 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi fdb7874d 2020-08-26T22:04:19 Gracefully fail end2end tests if no window support EGL_WINDOW_BIT is now specifically requested for tests that open a window (those that aren't WithNoFixture). This makes sure pbuffer-only configs are not selected for the window. Additionally, a few WithNoFixture tests are made more robust in the presence of no-window configs. In the context of crbug.com/1034840, this means that a subset of end2end tests would be able to run in a remote desktop environment. Tested on Linux/X11 by turning a subset of configs PBUFFER-only. Bug: chromium:1034840 Change-Id: I09fd149d43d3b865856fe6b9491c5f333f4a2efc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378922 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov 7d8c2f2e 2020-03-26T22:44:15 Hide SwiftShader OS Window in dEQP and end2end tests This prevents a race between starting Xvfb on test bots and X11 calls in X11Window::setVisible(), which used to cause flaky hangs on Linux SwANGLE bots. Unfortunately, in order to hide SwiftShader OS window, it must be a separate window from other backends, so it is no longer possible to have a single window for all backends, even if we don't reuse EGL Display. The only platform that still uses a single OS Window is Android, since there is only one system window per test application. In addition, all the tests that make OS Window visible explicitly, no longer do this for SwiftShader device. Bug: angleproject:4434 Change-Id: I1a067c22bfeee9288046b9d9566740731c0d627c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2125945 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5cbaa3f8 2019-05-07T15:49:22 Don't inherit ANGLETest SetUp and TearDown. Instead of inheriting from testing::Test's SetUp and TearDown we add new methods 'testSetUp' and 'testTearDown'. This helps prevent a common error of forgetting to call the base class method. Also add a check in the ANGLETest destructor that SetUp and TearDown have been called. Bug: angleproject:3393 Change-Id: Iab211305cc06ffea9ca649e864ddc9b180f2cba0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593960 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 467f174f 2019-05-03T12:52:21 Remove EGLTest. Consolidate these tests into ANGLETest. Add a new parameter to PlatformParameters that lets us skip normal test setup. This removes the last 'configless' tests from angle_end2end_tests. Bug: angleproject:3393 Change-Id: I87186698ade90f95577534eb8ed1dfd4245f740e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1590467 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ad398ee8 2019-01-03T13:01:08 Free OSWindow and EGLWindow through helpers. This cleans up any potential problems with allocating and freeing resources in different shared objects or DLLs. Previously we were using a dynamically linked allocation function and then calling the standard delete function. Also adds a base class helper for EGLWindow. Will base the WGL Window class on this. Needed for running ANGLE tests against native drivers. Bug: angleproject:2995 Change-Id: Ic92b447649ebb32c547605c20086c07a601842f0 Reviewed-on: https://chromium-review.googlesource.com/c/1393443 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill ba319ba3 2018-12-29T10:29:33 Re-land "Load entry points dynamically in tests and samples." Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL headers. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57 Reviewed-on: https://chromium-review.googlesource.com/c/1392382 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 9f088621 2018-12-29T20:46:15 Revert "Load entry points dynamically in tests and samples." This reverts commit 03923558a7103827ffec6a4d2a1453ed91f01c6f. Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624 Original change's description: > Load entry points dynamically in tests and samples. > > This CL adds a dynamic loader generator based on XML files. It also > refactors the entry point generation script to move the XML parsing > into a helper class. > > Additionally this includes a new GLES 1.0 base header. The new > header allows for function pointer types and hiding prototypes. > > All tests and samples now load ANGLE dynamically. In the future this > will be extended to load entry points from the driver directly when > possible. This will allow us to perform more accurate A/B testing. > > The new build configuration leads to some tests having more warnings > applied. The CL includes fixes for the new warnings. > > Bug: angleproject:2995 > Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 > Reviewed-on: https://chromium-review.googlesource.com/c/1359516 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2995 Reviewed-on: https://chromium-review.googlesource.com/c/1392381 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 03923558 2018-12-29T10:29:33 Load entry points dynamically in tests and samples. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 Reviewed-on: https://chromium-review.googlesource.com/c/1359516 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 2fe5e1d3 2018-08-28T14:00:24 Vulkan: Implement robustness extensions. Device recovery is not possible but device loss can be tracked. BUG=angleproject:2787 Change-Id: Ib94dd557b6b005a560b7a64275b176f7b1777211 Reviewed-on: https://chromium-review.googlesource.com/1194458 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez b3925a3f 2016-08-23T13:17:34 Add test for EGL_create_context_robustness The test is disabled on non-Windows as Linux drivers seem to not be able to kill an in-flight warp and the whole computer locks down. BUG=angleproject:1463 Change-Id: Iea3dcb1df323aa1341a4d26fe291b6abfae2aa3a Reviewed-on: https://chromium-review.googlesource.com/374166 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>