src/tests/test_utils/ANGLETest.cpp


Log

Author Commit Date CI Message
Jamie Madill 8f31872c 2019-12-03T18:34:52 Revert "Add new test runner harness." This reverts commit fb40d231c3e2ee7c38f8445ef5defc0ab0f5f15d. Reason for revert: Has a bug with the ASan build and also has a few bugs with ANGLE standalone test expectations an filter. Bug: chromium:1030192 Bug: angleproject:4193 Original change's description: > Add new test runner harness. > > The ANGLE test harness is a harness around GoogleTest that provides > functionality similar to the Chromium test harness. It supports: > > * splitting a test set into shards > * catching and reporting crashes and timeouts > * outputting to the Chromium JSON test results format > * multi-process execution > > Unit tests are added in test_utils_unittest.cpp. > > Bug: angleproject:3162 > Change-Id: Idb15f113de8eb32db12bc93542de93b08d7c1447 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1478016 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> TBR=ynovikov@chromium.org,jonahr@google.com,jmadill@chromium.org Change-Id: I647e747571784b1ca7c1d0687193c70a63eb08d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:3162 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1947456 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fb40d231 2019-12-02T16:39:18 Add new test runner harness. The ANGLE test harness is a harness around GoogleTest that provides functionality similar to the Chromium test harness. It supports: * splitting a test set into shards * catching and reporting crashes and timeouts * outputting to the Chromium JSON test results format * multi-process execution Unit tests are added in test_utils_unittest.cpp. Bug: angleproject:3162 Change-Id: Idb15f113de8eb32db12bc93542de93b08d7c1447 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1478016 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 745999a9 2019-11-19T12:59:02 Add test for multithreaded shared-context resource The test does this: 1. Context 1: Read Texture 1 and draw into Framebuffer 1 2. Context 2: Read Texture 1 and draw into Framebuffer 2 3. Context 1: Delete Framebuffer 1 4. Context 1: Flush 5. Context 2: Modify Texture 1 Issue is Texture 1's mCurrentReadingNodes contains one node from each context's command graph, one of which is deleted at step 4. At step 5, a dependency is added from both nodes (one already deleted) to a new node, causing use-after-free. Bug: angleproject:4130 Change-Id: I06720aec20d0b49114937f1cd9b193a4f1df9d8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1924790 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Le Hoang Quyen 6fcc0bb8 2019-11-21T01:19:40 Metal: Re-add end2end test configs (running test is still disabled) angle_test_instantiate.cpp & angle_test_instantiate_apple.mm: - Disabled metal platform selection on pre-10.13 mac devices for Bug: angleproject:4153 Explicitly disabled tests on metal: - DifferentStencilMasksTest.DrawWithDifferentMask - PointSpritesTest.PointSizeAboveMaxIsClamped - WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D This requires the crash fix in http://crrev.com/c/1924101 Bug: angleproject:4153 Bug: angleproject:2634 Change-Id: I95046d731a8ba7414cf1a1f4b6f2940282725872 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1926389 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Courtney Goeltzenleuchter 8392b118 2019-11-20T16:57:08 Revert "Metal: Enable end2end tests." This reverts commit 0bb42e091b77f174632434a05789b2ce632bd902. Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1026633 Causing failures on Mac bots. Original change's description: > Metal: Enable end2end tests. > > Explicitly disabled tests: > - DifferentStencilMasksTest.DrawWithDifferentMask > - PointSpritesTest.PointSizeAboveMaxIsClamped > - WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D > > Bug: angleproject:2634 > Change-Id: I76ab450c06d0e1be1e7469a8b9c6497684c3ca54 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1906607 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,jonahr@google.com,jmadill@chromium.org,le.hoang.q@gmail.com Change-Id: Iaa4264834170a49c274f186d3d74f57714c84b32 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2634 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1926378 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Le Hoang Quyen 0bb42e09 2019-11-19T23:04:00 Metal: Enable end2end tests. Explicitly disabled tests: - DifferentStencilMasksTest.DrawWithDifferentMask - PointSpritesTest.PointSizeAboveMaxIsClamped - WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D Bug: angleproject:2634 Change-Id: I76ab450c06d0e1be1e7469a8b9c6497684c3ca54 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1906607 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 95a736bd 2019-10-09T10:26:25 Reland "Add more test_utils functions." This is a reland of 5fcfcea4a9379633a83a67fc1d94938cb31f2a9c Re-land uses static linking with angle_util. The root cause of the CFI error wasn't solved. Static linking works around the problem by not using any export rules. Second re-land fixes missing imports for libEGL and libGLESv2 static varieties. Original change's description: > Add more test_utils functions. > > Includes methods for creating temporary files, deleting files, and > reading files into a string. Also renames GetPathSeparator to mention > it's only used for environment variables. Includes a new virtual type > angle::Process that will be used to implement cross-platform async > Process launching for tests. Also includes a way to specify a custom > crash handler callback. > > Also adds a few unit tests for the new functionality. They are disabled > on Android because the functions are not needed by the new test runner. > > Bug: angleproject:3162 > Change-Id: I3e2c2e9837608884c98379fa0f78c9ffbe158d73 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821940 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Bug: chromium:1015810 Bug: angleproject:3162 Change-Id: I2a18b819b0f91df610ad12ffedea2b38349fe7cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879859 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill f939cb63 2019-10-20T21:44:36 Revert "Reland "Add more test_utils functions."" This reverts commit 7923e234bc458eda5936b8cb4f09fa19e28c0452. Reason for revert: Fails compilation on rollers: [2097/6048] SOLINK ./lib_angle_unittests__library.cr.so FAILED: lib_angle_unittests__library.cr.so lib_angle_unittests__library.cr.so.TOC lib.unstripped/lib_angle_unittests__library.cr.so python "../../build/toolchain/gcc_solink_wrapper.py" --readelf="../../third_party/android_ndk/toolch...(too long) ld.lld: error: undefined symbol: glCreateShader >>> referenced by shader_utils.cpp >>> angle_util_static/shader_utils.o:(CompileShader(unsigned int, char const*)) in archive obj/third_party/angle/libangle_util_static.a ld.lld: error: undefined symbol: glShaderSource Original change's description: > Reland "Add more test_utils functions." > > This is a reland of 5fcfcea4a9379633a83a67fc1d94938cb31f2a9c > > Re-land uses static linking with angle_util. The root cause > of the CFI error wasn't solved. Static linking works around > the problem by not using any export rules. > > Original change's description: > > Add more test_utils functions. > > > > Includes methods for creating temporary files, deleting files, and > > reading files into a string. Also renames GetPathSeparator to mention > > it's only used for environment variables. Includes a new virtual type > > angle::Process that will be used to implement cross-platform async > > Process launching for tests. Also includes a way to specify a custom > > crash handler callback. > > > > Also adds a few unit tests for the new functionality. They are disabled > > on Android because the functions are not needed by the new test runner. > > > > Bug: angleproject:3162 > > Change-Id: I3e2c2e9837608884c98379fa0f78c9ffbe158d73 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821940 > > Commit-Queue: Jamie Madill <jmadill@chromium.org> > > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > > Bug: chromium:1015810 > Bug: angleproject:3162 > Change-Id: I6a2c1e7b585a13ca846759f32da0777c00d7f7e6 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869541 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=ynovikov@chromium.org,jonahr@google.com,jmadill@chromium.org Change-Id: I975b2214411906cb981bffa04fa50e0a65ff8b4e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:1015810, angleproject:3162 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1870811 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7923e234 2019-10-09T10:26:25 Reland "Add more test_utils functions." This is a reland of 5fcfcea4a9379633a83a67fc1d94938cb31f2a9c Re-land uses static linking with angle_util. The root cause of the CFI error wasn't solved. Static linking works around the problem by not using any export rules. Original change's description: > Add more test_utils functions. > > Includes methods for creating temporary files, deleting files, and > reading files into a string. Also renames GetPathSeparator to mention > it's only used for environment variables. Includes a new virtual type > angle::Process that will be used to implement cross-platform async > Process launching for tests. Also includes a way to specify a custom > crash handler callback. > > Also adds a few unit tests for the new functionality. They are disabled > on Android because the functions are not needed by the new test runner. > > Bug: angleproject:3162 > Change-Id: I3e2c2e9837608884c98379fa0f78c9ffbe158d73 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821940 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Bug: chromium:1015810 Bug: angleproject:3162 Change-Id: I6a2c1e7b585a13ca846759f32da0777c00d7f7e6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869541 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Lan Wei 0cb09633 2019-10-18T15:50:10 Revert "Add more test_utils functions." This reverts commit 5fcfcea4a9379633a83a67fc1d94938cb31f2a9c. Reason for revert: 1 Test Suite(s) failed. angle_unittests failed because of: TestUtils.RunApp on Linux CFI https://ci.chromium.org/p/chromium/builders/ci/Linux%20CFI Original change's description: > Add more test_utils functions. > > Includes methods for creating temporary files, deleting files, and > reading files into a string. Also renames GetPathSeparator to mention > it's only used for environment variables. Includes a new virtual type > angle::Process that will be used to implement cross-platform async > Process launching for tests. Also includes a way to specify a custom > crash handler callback. > > Also adds a few unit tests for the new functionality. They are disabled > on Android because the functions are not needed by the new test runner. > > Bug: angleproject:3162 > Change-Id: I3e2c2e9837608884c98379fa0f78c9ffbe158d73 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821940 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> TBR=ynovikov@chromium.org,jonahr@google.com,jmadill@chromium.org Change-Id: I1441bfbae31712f72b4aebeeea9cd711c3975a5d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:3162 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869254 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5fcfcea4 2019-10-09T10:26:25 Add more test_utils functions. Includes methods for creating temporary files, deleting files, and reading files into a string. Also renames GetPathSeparator to mention it's only used for environment variables. Includes a new virtual type angle::Process that will be used to implement cross-platform async Process launching for tests. Also includes a way to specify a custom crash handler callback. Also adds a few unit tests for the new functionality. They are disabled on Android because the functions are not needed by the new test runner. Bug: angleproject:3162 Change-Id: I3e2c2e9837608884c98379fa0f78c9ffbe158d73 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821940 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill 57b37b6b 2019-09-25T18:29:28 Rename util/system_utils to util/test_utils. This removes a GN naming conflict between util/system_utils and common/system_utils. This conflict was preventing us from adding unit tests to utils' version of system_utils. Since these functions are only useful to tests and samples rename them test_utils for simplicity. Will enable further development of ANGLE's standalone testing harness. Bug: angleproject:3162 Change-Id: I9e34fb69f96c5de6dc2453fce4148a0f285e15ed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1825268 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Mingyu Hu 03f93cf0 2019-08-30T08:53:30 ANGLE test fixture leaking. Adding code in ANGLETestEnvironment::TearDown() to release fixtures if exists. Bug: angleproject:3875 Change-Id: I0d6ad9b8c72937b20a4c3033b86eb667b546e0c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1778841 Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Tim Van Patten 5d27a696 2019-08-13T11:29:07 Support separable shader programs The spec states: Shader stages including vertex shaders, fragment shaders, and compute shaders...A single program object can contain all of these shaders, or any subset thereof. This change allows shader programs without a fragment shader. The biggest driver of this change is dEQP since a large number of tests create shader programs without a fragment shader. Bug: angleproject:3803 Test: dEQP-GLES31.functional.program_interface_query Change-Id: Id6cb098c62a1489a14b9ec1b31bd4cd59f655e49 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1752010 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Geoff Lang 780bdace 2019-08-28T09:56:19 Suppress error messages in ANGLE end2end tests on Nexus6P. GL errors are generated during initialization on this device. Suppress them until enough logging is in place to debug. BUG=998503 BUG=angleproject:3020 Change-Id: I74a51a661a930ea89b0234dcb3e6213288e75c86 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1774468 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 188b679b 2019-08-15T09:02:43 Remove GL/EGL function pointers from tests. The auto-gen loader code should be able to handle all these cases. Bug: angleproject:3393 Change-Id: If0a90fb29d79f2892fdf76fe0cb91ed0036ee1e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1756083 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Shahbaz Youssefi 93560ef5 2019-07-25T16:13:02 Vulkan: Seamful cube map emulation In GLSL, a cube texture is sampled with one of textureCube* functions. This function takes a 3D coordinate which is a vector from the center of the cube and identifies a direction to sample from. GLES2.0 has the following table that translates this 3D coordinate (Rx, Ry, Rz) to a face and ST coordinates within that face. This table can be found in Section 3.7.5 (Cube Map Texture Selection). A compiler pass is implemented in ANGLE that replaces samplerCube declarations with a sampler2DArray. The textureCube* functions are replaced with the corresponding texture* functions with the translated coordinates according to that table. Gradients provided to textureCubeGrad are translated using the same formulae, which is not precise but the spec specifies this projection to be implementation dependent. Helper invocations enabled through WQM (whole quad mode) cause a nuisance in that the extrapolated varyings used as coordinates in a textureCube call could have a different major axis (and therefore face) from the non-helper invocations that lie within the geometry. subgroupQuadSwap* operations are used in conjunction with gl_HelperInvocation to make sure the helper threads calculate texture UVs in the same face as the non-helper invocations. Bug: angleproject:3300 Bug: angleproject:3240 Bug: angleproject:3243 Bug: angleproject:3732 Change-Id: I0cb6a9b1f2e1e6a392b5baca1c7118ed1c502ccf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1715977 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov bd4ff479 2019-07-19T22:08:17 Revert "Reland "Temporarily disable creating D3D debug device."" This reverts commit 6064e6ab6bc7355b410543301a578d22d2f6e477. Reason for revert: flakiness should be fixed by https://chromium-review.googlesource.com/c/angle/angle/+/1709726 Original change's description: > Reland "Temporarily disable creating D3D debug device." > > This reverts commit 28394c2295335929c17bbfe0ab74f923cd234ff2. > > Reason for revert: may be the cause of flakiness on Win10 Debug (NVIDIA) per http://crbug.com/972914 . > > Original change's description: > > Revert "Temporarily disable creating D3D debug device." > > > > This reverts commit 3d544fffe7ff9284b21e3a15f638297c827bbc21. > > > > Reason for revert: Seems like flakiness is not related. > > > > Suppress D3D11 test failures uncovered by re-enabling D3D debug device: > > ComputeShaderTest.DispatchCompute > > Texture2DTestES3.TextureImplPropogatesDirtyBits > > D3DTextureTestMS.* > > > > Also a small fix to ANGLETestBase::checkD3D11SDKLayersMessages > > to clear reported messages, otherwise the failures are also reported > > for tests following the one with the actual failure. > > > > Original change's description: > > > Temporarily disable creating D3D debug device. > > > > > > To diagnose whether Windows Intel end2end tests flakiness > > > is related to creating debug device and new version of Windows SDK. > > > > > > Bug: angleproject:3153 > > > Change-Id: Ica7eae3fe875e22203b6dfd98b83604d66a97737 > > > Reviewed-on: https://chromium-review.googlesource.com/c/1476954 > > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > > > > Bug: angleproject:3153, angleproject:3493 > > Bug: angleproject:3501, angleproject:3512, angleproject:3513 > > > > Change-Id: I232da72aa09c2b9230cf179dd54e1731f8365f8e > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1480854 > > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > > TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org > > Change-Id: I38a5cc9bb6ebcd50e97e40cc972a82679e73732a > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: angleproject:3153, angleproject:3493, angleproject:3501, angleproject:3512, angleproject:3513 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1652784 > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Commit-Queue: Kenneth Russell <kbr@chromium.org> TBR=ynovikov@chromium.org,geofflang@chromium.org,kbr@chromium.org,jmadill@chromium.org Bug: angleproject:3153, angleproject:3493, angleproject:3501, angleproject:3513 Change-Id: I16eff79172dcfa2dd6d4f6445a74c9c65c1bd27c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1710861 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Clemen Deng a71a8c66 2019-07-04T09:42:31 ANGLE tests loading wrong opengl32.dll ANGLE tests try to load opengl32.dll from ANGLE directory instead of system Bug: angleproject:3645 Change-Id: I3a8cea37252d13e915ff54ae6bbac920db16e4c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688544 Commit-Queue: Clemen Deng <clemendeng@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis eee67c6e 2019-06-18T13:00:43 Fix Platform.h integration with ANGLE A function was renamed which broke the platformMethods table strings. This CL reverts the rename (originally from crrev/c/1660952) Bug: angleproject:1621 Change-Id: I8121a4956ba1d3e3c5036f72f6f1fdf5509dc491 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1664792 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
James Dong 3f8975e1 2019-06-12T13:11:57 Debug: suppress INFO log level in tests Disables INFO level log messages in tests, including GL errors. Bug: angleproject:3525 Change-Id: Ib16871b9faaff54964dd2770e1791372b1b79361 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1656293 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: James Dong <dongja@google.com>
Jonah Ryan-Davis beb0eb2d 2019-06-14T15:10:33 Clean up workarounds/features to single location. Rename all workarounds structs to features, and move the lists to a shared location in include/platform (to help with documentation, see: https://cs.chromium.org/chromium/src/ui/gl/gl_switches.cc?sq=package:chromium&g=0&l=69) Bug: angleproject:1621 Change-Id: I4069f08131db5e886047a007efb5d7764dfee5f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660952 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2c49d0b0 2019-06-14T15:17:37 Suppress Bindings perf test on Win/Intel/GL. BindingsBenchmark.Run/gl_100_objects_allocated_every_iteration This test was timing out on the bots. Conservatively skip the benchmark on Intel/GL/Windows. Bug: chromium:974083 Change-Id: I4a254bff8b43e5a47b5905ee6b9bc1a659129684 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660951 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Kenneth Russell 6064e6ab 2019-06-11T04:01:12 Reland "Temporarily disable creating D3D debug device." This reverts commit 28394c2295335929c17bbfe0ab74f923cd234ff2. Reason for revert: may be the cause of flakiness on Win10 Debug (NVIDIA) per http://crbug.com/972914 . Original change's description: > Revert "Temporarily disable creating D3D debug device." > > This reverts commit 3d544fffe7ff9284b21e3a15f638297c827bbc21. > > Reason for revert: Seems like flakiness is not related. > > Suppress D3D11 test failures uncovered by re-enabling D3D debug device: > ComputeShaderTest.DispatchCompute > Texture2DTestES3.TextureImplPropogatesDirtyBits > D3DTextureTestMS.* > > Also a small fix to ANGLETestBase::checkD3D11SDKLayersMessages > to clear reported messages, otherwise the failures are also reported > for tests following the one with the actual failure. > > Original change's description: > > Temporarily disable creating D3D debug device. > > > > To diagnose whether Windows Intel end2end tests flakiness > > is related to creating debug device and new version of Windows SDK. > > > > Bug: angleproject:3153 > > Change-Id: Ica7eae3fe875e22203b6dfd98b83604d66a97737 > > Reviewed-on: https://chromium-review.googlesource.com/c/1476954 > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> > > Bug: angleproject:3153, angleproject:3493 > Bug: angleproject:3501, angleproject:3512, angleproject:3513 > > Change-Id: I232da72aa09c2b9230cf179dd54e1731f8365f8e > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1480854 > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org Change-Id: I38a5cc9bb6ebcd50e97e40cc972a82679e73732a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:3153, angleproject:3493, angleproject:3501, angleproject:3512, angleproject:3513 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1652784 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Yuly Novikov 28394c22 2019-02-21T03:24:58 Revert "Temporarily disable creating D3D debug device." This reverts commit 3d544fffe7ff9284b21e3a15f638297c827bbc21. Reason for revert: Seems like flakiness is not related. Suppress D3D11 test failures uncovered by re-enabling D3D debug device: ComputeShaderTest.DispatchCompute Texture2DTestES3.TextureImplPropogatesDirtyBits D3DTextureTestMS.* Also a small fix to ANGLETestBase::checkD3D11SDKLayersMessages to clear reported messages, otherwise the failures are also reported for tests following the one with the actual failure. Original change's description: > Temporarily disable creating D3D debug device. > > To diagnose whether Windows Intel end2end tests flakiness > is related to creating debug device and new version of Windows SDK. > > Bug: angleproject:3153 > Change-Id: Ica7eae3fe875e22203b6dfd98b83604d66a97737 > Reviewed-on: https://chromium-review.googlesource.com/c/1476954 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Bug: angleproject:3153, angleproject:3493 Bug: angleproject:3501, angleproject:3512, angleproject:3513 Change-Id: I232da72aa09c2b9230cf179dd54e1731f8365f8e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1480854 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 20d380fa 2019-06-03T15:21:47 Print stack backtrace on critical failure. We reuse code from Skia to walk the stack on Posix platforms. See: https://github.com/google/skia/blob/master/tools/CrashHandler.cpp On Windows we use a BSD-licensed tool called StackWalker. See: https://github.com/JochenKalmbach/StackWalker This allows us to get high quality stack traces on Win/Linux/Mac. Bug: angleproject:3162 Change-Id: I9c50ede2c6a41ed0ee85a0507372df42a487bcef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1632950 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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 58957f3d 2019-05-03T12:52:22 Add option to run each test config in a separate process. This CL adds a command line option to angle_end2end_tests that will iterate over all test configs. For each config it'll fork a new child process that will run only a single config. This will allow us to isolate each config to a specific child process. Hopefully this will reduce test flakiness due to driver issues with multiple configs. The command line option is "--separate-process-per-config". Note that there are about 25 configs right now. Bug: angleproject:3393 Change-Id: Ia117b371bbe159c1b0d28d82befffeb0f40467a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1591428 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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 97f0affb 2019-05-03T12:52:21 Add command line option to filter by test config. This allows us to run angle_end2end_tests with a single config without using gtest_filter. It will also allow us to run each test config in a separate process. Bug: angleproject:3393 Change-Id: I09aaf9cfe55a117b0af8d79ecfd129f3d0f1d7c8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1591427 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 3089f92e 2019-05-01T15:11:46 Move EGL Display config into EGLPlatformParameters. This CL moves all of the EGLDisplay configuration into an EGL platform struct. Consolidating display configuration in the struct allows us to move configuration out of the test constructor. Then when we filter test configs we don't need to wait for the individual test setup. Bug: angleproject:3393 Change-Id: I5bd06dcdc9f2867ebc43c1d4984077ada35cafc8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574674 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill b8149075 2019-04-30T16:14:44 Clean up ANGLE test extension functions. None of these functions needed to be member functions. Also make the naming more consistent. Bug: angleproject:3393 Change-Id: I7aafe2269a48af703a87bd9a8cf4cfab9e177dd3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574673 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 057b76e1 2019-04-12T14:48:59 Implement GL_CHROMIUM_lose_context. This is useful for testing context lost behaviour. BUG=angleproject:3379 Change-Id: If0e1538553b1761e313fc36ccde5138cd495200f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566141 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill a88c1f9c 2019-03-23T14:47:11 Revert "Force new displays on each Windows 7 end2end test." This reverts commit 3e8a8d5b8567d08855d500c85bcf7cdcc4653f9a. Reason for revert: Didn't seem to fix the bot. Original change's description: > Force new displays on each Windows 7 end2end test. > > This should fix the buffer allocation crash manifesting on Windows 7 > x64. > > Bug: angleproject:3261 > Bug: chromium:944454 > Change-Id: I8a0713e1d1f18285f128c0cfb98b398c6a336a36 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1534461 > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=ynovikov@chromium.org,syoussefi@chromium.org,jmadill@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:3261, chromium:944454 Change-Id: I835331cbe444cc9415bef77f06462be580b43f49 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1535235 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3e8a8d5b 2019-03-21T14:09:38 Force new displays on each Windows 7 end2end test. This should fix the buffer allocation crash manifesting on Windows 7 x64. Bug: angleproject:3261 Bug: chromium:944454 Change-Id: I8a0713e1d1f18285f128c0cfb98b398c6a336a36 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1534461 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f455f756 2019-03-20T20:49:44 Reuse angle_end2end_test windows and displays. This both speeds up test execution and cuts down on the number of new windows and displays created for a test config. This feature is only currently enabled for Windows NVIDIA and Intel. On every other config there were blocking issues that would need investigation. Several tests were manually flagged as needed new displays on each iteration to prevent test flakiness. This feature might fix the issues with Intel test flakiness that have been prominent on the ANGLE CQ. WGL configurations have also been removed from ANGLE tests. So this removes more of the code from ANGLETest.cpp. Bug: angleproject:3261 Change-Id: Ic2864d4806ad38e0eeaa3c0afcd54ae1c548090f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1520995 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 0f566fc7 2019-03-20T11:36:29 Introduce ConfigParameters test helper struct. This allows us to more easily compare sets of parameters used in our tests. The config parameters are stuff like the red / gree / blue bits used in an EGL config. Or particular sets of extensions or other EGL options. This will more easily allow us to determine when we need to use a new EGL display instead of reusing a prior. Bug: angleproject:3261 Change-Id: Ia1f0ede988e0b4084fbb4d55097e94fd89ee4899 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1531535 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill a683628b 2019-03-20T11:23:12 Use common SystemInfo in tests. We were using a static SystemInfo in two places. Consolidate the SystemInfo collection to a single location. Also renames Nvidia to NVIDIA to be consistent with the company naming. And adds a few helpers to SystemInfo for GPU detection. Will lead to test changes to reduce flakiness on Intel Windows. Bug: angleproject:3261 Change-Id: I4e0addf19d6fe26b4d31a1289efce72092a0a1dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1531533 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi b6eb3412 2019-03-06T15:10:56 Allow testing::Combine in ANGLE_INSTANTIATE_TEST In most tests, ANGLE_INSTANTIATE_TEST is sufficient. This macro takes a a variable number of angle::PlatformParameters and instantiates that many tests. angle::PlatformParameters already aggregates multiple configurations. In a number of cases, however, it would be useful to have even more configurations in conjunction with angle::PlatformParameters. gl_tests/MultiviewDrawTest.cpp solves this by creating a custom class that combines angle::PlatformParameters with test-specific configurations. gl_tests/CopyTextureTest.cpp included numerous tests with hardcoded values for its configurations. This change introduces ANGLE_INSTANTIATE_TEST_COMBINE_N. These macros take N testing::* parameter generators followed by the list of angle::PlatformParameters as per ANGLE_INSTANTIATE_TEST. They then testing::Combine these generators, placing the angle::PlatformParameters list first. Tests that use this functionality would inherit from ANGLETestWithParams<std::tuple<angle::PlatformParameters, ...>> instead of ANGLETest, and instantiate their tests as such: ANGLE_INSTANTIATE_TEST_COMBINE_3(TestName, PrettyPrintFunction, testing::ValuesIn(listOfParameters), testing::Values(some, other, parameters), testing::Bool(), ES2_D3D9(), ES2_D3D11(), ES2_OPENGL(), ES2_OPENGLES(), ES2_VULKAN()); The name of the test, as used by --gtest_filter, will be suffixed with the output of the PrettyPrintFunction. Assuming the tuple type given to ANGLETestWithParams is Params, this function takes a ::testing::TestParamInfo<Params> input to pretty-print the name of the test variation. It is recommended to output the platform first for consistency with other tests. gl_tests/CopyTextureTest.cpp is modified to use this macro. Bug: angleproject:3125 Change-Id: I0311b84659578bf3c7b5e9673b41cc3a3adfc50d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1506236 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Bruce Dawson ffa277a1 2019-02-28T15:37:19 Fix logic for warningsAsErrors warningsAsErrors should be falsed on Windows 7 because we may legitimately get a warning about loading the old d3dcompiler DLL on that platform. The logic for this was reversed in the initial change. This change flips the logic, changes the cutoff OS version, and always sets the flag to something. Bug: chromium:920704 Change-Id: Ibf8a7c9a48bffc183479b7614148d6c00c122a07 Reviewed-on: https://chromium-review.googlesource.com/c/1496015 Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Jamie Madill <jmadill@google.com>
Jamie Madill 4b314eef 2019-02-27T13:20:51 Win7: No warnings as errors in FragData test. Applies to all Windows because we currently don't have a way to check which version we're on. The fallback to the old compiler is generating a warning. This test was being overly conservative. Also updates a few message strings. Bug: chromium:920704 Change-Id: If83677881e85d6a6f9ad98b33cd5f7d917bbec6b Reviewed-on: https://chromium-review.googlesource.com/c/1492311 Commit-Queue: Jamie Madill <jmadill@google.com> Reviewed-by: Jamie Madill <jmadill@google.com>
Yuly Novikov aaa17b85 2019-02-26T16:57:44 Restrict OpenGL/Vulkan test window re-creation workaround to NVIDIA The workaround in https://chromium-review.googlesource.com/430887 was intended only for NVIDIA. Re-creating the test window causes new native display to be created every time. Normally, re-using the same native display with different implementation would release the old implementation. When new display is created instead of re-using the old one, old implementation is never released, leaking memory. Use SystemInfo to check if any of GPUs is NVIDIA and apply the workaround only then, reducing the leak on other platforms. Bug: angleproject:1810, angleproject:3153 Change-Id: I6198c01c82a01e2adc0bcd1fad303c47cd7328d8 Reviewed-on: https://chromium-review.googlesource.com/c/1490379 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@google.com>
Jamie Madill 00f43c91 2019-02-09T11:41:12 Vulkan: Suppress layer warnings about unbound outputs. This warning could pop up whenever an OpenGL app would write to a particular output and not bind an attachment. This is valid in OpenGL. Also it could happen when writing to gl_FragData instead of gl_FragColor. Since it's hard to fix every usage we can just suppress the warning. Also adds a way to change test platform warnings into errors. Bug: angleproject:2866 Change-Id: I9793f58121ac848d74d6b0131e79ebab2c70f45c Reviewed-on: https://chromium-review.googlesource.com/c/1462057 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 7085305f 2019-02-04T17:47:04 Use whitelist to filter test configs. Before we would try all the configs and filter those which fail to init. Now we gather the System Info and if successful check a list of supported configs. If System Info init fails we fall back to the prior method. This speeds up end2end tests init. It also allows for more reliable profile captures with VTune. It also will cause a test failure if a config unexpectedly fails. Previously we would silently pass without running the config's test. Includes a few changes: * D3D reference tests are disabled. They don't appear to be working. * Mac ES 3.1 is disabled due to lack of support. * WGL on AMD Windows is disabled due to lack of ES compatibility. * ES 3.2 contexts are explicitly disabled. * Vulkan is limited to ES 2.0. * The Windows GLES back-end is limited to NVIDIA with ES 2.0 & 3.0. * A unit test that verifies the whitelist matches availability. Bug: angleproject:2472 Change-Id: Ib72214bfbbff13c124fa15a6494d0aabb52f2e62 Reviewed-on: https://chromium-review.googlesource.com/c/1436168 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov 5fe7c5b9 2019-01-17T12:16:34 Include common/platform.h where used Bug: 922443 Change-Id: I35b9e34266d4a15f8d0769c2770801b1b0511398 Reviewed-on: https://chromium-review.googlesource.com/c/1418091 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 1f56ed2a 2019-01-03T15:24:22 Add WGLWindow and WGL test configs. WGLWindow lets us use a Windows driver's bindings instead of ANGLE. This only works if the underlying driver supports OpenGL ES compatibility. Also adds the WGL headers, WGL XML, and a specialized WGL loader. Because of a small driver issue with NVIDIA I added a retry for the WGL Window initialization. Bug: angleproject:2995 Change-Id: Ie5148ece470dd03df33015f4919ad1fa79a859ec Reviewed-on: https://chromium-review.googlesource.com/c/1366021 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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>
Jamie Madill 1e853266 2018-12-21T09:07:38 Cache common DrawElements states. Similar to how we cache the base common draw states. This will improve DrawElements performance. Several state checks are optimized into a single 'if' check of a cached value. Also includes a regression test for mapping the element array buffer. Bug: angleproject:2966 Change-Id: Ia6e524a58ad6b7df2e455d67733e15d324b1b893 Reviewed-on: https://chromium-review.googlesource.com/c/1357150 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6f087e9e 2018-12-19T16:10:49 Modify end2end_tests main to not import ANGLETest.h. This will allow for easier dependency management in the build files. Bug: angleproject:2995 Change-Id: Ia3464bf622b861df03c3d06bcf1b34874a9a5400 Reviewed-on: https://chromium-review.googlesource.com/c/1385025 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4638dc9d 2018-12-17T13:13:49 Re-land "Load correct libGLESv2 on Linux and Mac." Re-land fixes build to ensure commit_id is built before libEGL. libEGL was implicitly loading libGLESv2 on startup. This is bad because on platforms like Linux and Mac we could sometimes use the incorrect rpath. This in turn meant we needed workarounds like using "_angle" extensions to our shared objects to get the correct loading behaviour. Fix this by loading libGLESv2 dynamically in libEGL. We build the loader automatically from egl.xml. The loader itself is lazily initialized on every EGL entry point call. This is necessary because on Linux, etc, there is no equivalent to Windows' DLLMain. We also use an EGL.h with different generation options so we have the proper function pointer types. A README is included for instructions on how to regenerate EGL.h. The entry point generation script is refactored into a helper class that is used in the loader generator. Also adds the libGLESv2 versions of the EGL entry points in the DEF file on Windows. This allows them to be imported properly in 32-bit configurations. Also fixes up some errors in ANGLE's entry point definitions. Also includes a clang-format disable rule for the Khronos headers. This CL will help us to run ANGLE tests against native drivers. Bug: angleproject:2871 Bug: chromium:915731 Change-Id: I4192a938d1f4117cea1bf1399c98bda7ac25ddab Reviewed-on: https://chromium-review.googlesource.com/c/1380511 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 175d918a 2018-12-16T19:53:23 Revert "Load correct libGLESv2 on Linux and Mac." This reverts commit dd815b623e60a1e1550f328104ffcd7caf20fde1. Reason for revert: Broke https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/win-rel/8006 Original change's description: > Load correct libGLESv2 on Linux and Mac. > > libEGL was implicitly loading libGLESv2 on startup. This is bad > because on platforms like Linux and Mac we could sometimes use the > incorrect rpath. This in turn meant we needed workarounds like using > "_angle" extensions to our shared objects to get the correct loading > behaviour. > > Fix this by loading libGLESv2 dynamically in libEGL. We build the > loader automatically from egl.xml. The loader itself is lazily > initialized on every EGL entry point call. This is necessary because > on Linux, etc, there is no equivalent to Windows' DLLMain. > > We also use an EGL.h with different generation options so we have the > proper function pointer types. A README is included for instructions > on how to regenerate EGL.h. > > The entry point generation script is refactored into a helper class > that is used in the loader generator. Also adds the libGLESv2 versions > of the EGL entry points in the DEF file on Windows. This allows them to > be imported properly in 32-bit configurations. > > Also fixes up some errors in ANGLE's entry point definitions. Also > includes a clang-format disable rule for the Khronos headers. > > This CL will help us to run ANGLE tests against native drivers. > > Bug: angleproject:2871 > Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572 > Reviewed-on: https://chromium-review.googlesource.com/c/1370725 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org Change-Id: I921b3c45435ab4f05cbc2d1c1172b4185d6257b0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2871 Reviewed-on: https://chromium-review.googlesource.com/c/1378887 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill dd815b62 2018-12-15T10:39:00 Load correct libGLESv2 on Linux and Mac. libEGL was implicitly loading libGLESv2 on startup. This is bad because on platforms like Linux and Mac we could sometimes use the incorrect rpath. This in turn meant we needed workarounds like using "_angle" extensions to our shared objects to get the correct loading behaviour. Fix this by loading libGLESv2 dynamically in libEGL. We build the loader automatically from egl.xml. The loader itself is lazily initialized on every EGL entry point call. This is necessary because on Linux, etc, there is no equivalent to Windows' DLLMain. We also use an EGL.h with different generation options so we have the proper function pointer types. A README is included for instructions on how to regenerate EGL.h. The entry point generation script is refactored into a helper class that is used in the loader generator. Also adds the libGLESv2 versions of the EGL entry points in the DEF file on Windows. This allows them to be imported properly in 32-bit configurations. Also fixes up some errors in ANGLE's entry point definitions. Also includes a clang-format disable rule for the Khronos headers. This CL will help us to run ANGLE tests against native drivers. Bug: angleproject:2871 Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572 Reviewed-on: https://chromium-review.googlesource.com/c/1370725 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 35cd7332 2018-12-02T12:03:33 Refactor test shader style. This change enforces a lot more consistency. We pass const char * to the Compile functions instead of std::string. Also fixes the indentation of C++11 block comments to be more consistent. Bug: angleproject:2995 Change-Id: Id6e5ea94055d8cbd420df4ea2e81b2d96cb5ce78 Reviewed-on: https://chromium-review.googlesource.com/c/1357103 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d856ca48 2018-10-31T16:55:12 Vulkan: add clear test for emulated stencil or depth formats S8_UINT and D24_UNORM_X8_UINT are the only formats currently that are single-aspect and are possibly emulated with a packed depth-stencil format if it's not supported. A flag to FeaturesVk has been added as a way to force this behavior for the sake of testing. This test is added to ensure the correct clear algorithm is used for this case. Additionally, this case is detected and the other aspect is forcefully cleared to 0 whenever the original aspect is cleared. Bug: angleproject:2815 Change-Id: Ief3039d66bbf46468213b9e3224f7cc7541c3a2e Reviewed-on: https://chromium-review.googlesource.com/c/1312453 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 120b13f8 2018-10-09T07:58:39 Add more draw buffer related tests. Some of these are targeting our workaround for a mac bug. The bug was that the driver was somehow modifying output attachments that the program wasn't writing to. A new test shows a bug where we wouldn't re-sync the state properly after a clear. Also adds more pretty printing for GLColor. Bug: angleproject:2872 Change-Id: I5485893b5f1b269c5407678db27978a789f7acc6 Reviewed-on: https://chromium-review.googlesource.com/c/1269255 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 2363356f 2018-07-17T15:02:36 Make sure index ranges outside of the GLint range are handled correctly. IndexRange uses size_t values but DrawCallParams::mFirstVertex is a GLint. This makes sure all casting is safe. BUG=864528 Change-Id: Iaa95019615af4d3f79b12bbcb0df13b44cb54339 Reviewed-on: https://chromium-review.googlesource.com/1140898 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill b0c8be85 2018-08-10T14:36:39 Fix AMD detection in angle_end2end_tests. Some Radeon cards in D3D11 would not report AMD or ATI in the Renderer string. Fix this by also checking for 'Radeon'. Bug: angleproject:2572 Change-Id: I866c3042e35448deff627efdb8e94fcbc68abf01 Reviewed-on: https://chromium-review.googlesource.com/1171363 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 8acb1b61 2018-07-30T16:20:54 Allow reads from a multiview framebuffer with one view It's safe to read from a multiview framebuffer if it is layered and has just one view. The native OVR_multiview spec supports this as well. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I04e1364390574075f7e06e39a64e3bf05a539a05 Reviewed-on: https://chromium-review.googlesource.com/1156509 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 24ddc7a8 2018-06-11T14:56:34 WGL: Support unvirtualized contexts and unsafe multithreading. When using unvirtualized contexts, DisplayWGL still creates a Renderer for managing any internal GL resources such as emulated back buffers for DXGISwapChainWindowSurfaceWGL or D3DTextureSurfaceWGL but also creates a new Renderer for each GL context. All created contexts share resources. BUG=angleproject:2464 Change-Id: I945502514079368e062beef70bed49c61ed44403 Reviewed-on: https://chromium-review.googlesource.com/1097459 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Frank Henigman c0a403e2 2018-05-08T18:55:54 Revert "ANGLETest: Reuse test windows per-renderer" This reverts commit fad918f85445f19bc2aa6e6b3ee52f104690ff2a. Reason for revert: attempt to fix anglebug.com/2537 Original change's description: > ANGLETest: Reuse test windows per-renderer > > When running angle_end2end_tests unfiltered with the OpenGL and Vulkan > backends enabled, the test window was recreated all the time and grabbed > focus every-time it was created. This made it impossible to do anything > with the machine running the tests. > > Fix this by having one OSWindow per renderer group that's lazily created: > this solves most of the issue since only a couple windows end up being > created, and at the beginning of the test suite. > > BUG= > > Change-Id: I7a51300f0d59d8b6bb79e54d20b3acbf01068002 > Reviewed-on: https://chromium-review.googlesource.com/1038433 > Commit-Queue: Corentin Wallez <cwallez@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I93bdfa38757cbe2a6ce939c0c3e3da806307e7dd Reviewed-on: https://chromium-review.googlesource.com/1050326 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Olli Etuaho 9f394f8c 2018-05-07T15:42:25 Fix use-after-free in drawQuad with useVertexBuffer false quadVertices.data() pointer needs to remain valid until drawArrays is called. To guarantee that quadVertices should stay in the stack until the end of drawQuad(). BUG=angleproject:2533 TEST=angle_end2end_tests Change-Id: I263262db9a9ed9c9cd0d8679addd09677ad7179e Reviewed-on: https://chromium-review.googlesource.com/1046600 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez fad918f8 2018-05-07T09:17:30 ANGLETest: Reuse test windows per-renderer When running angle_end2end_tests unfiltered with the OpenGL and Vulkan backends enabled, the test window was recreated all the time and grabbed focus every-time it was created. This made it impossible to do anything with the machine running the tests. Fix this by having one OSWindow per renderer group that's lazily created: this solves most of the issue since only a couple windows end up being created, and at the beginning of the test suite. BUG= Change-Id: I7a51300f0d59d8b6bb79e54d20b3acbf01068002 Reviewed-on: https://chromium-review.googlesource.com/1038433 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron a912046d 2018-04-12T13:11:03 Vulkan: DrawElements with line loops client side memory support - Also enables 6 new tests in LineLoopTests.cpp in angle_end2end Bug: angleproject:2458 Change-Id: I4aec12b0ac780e81e6811f1199a5acaf17d9b982 Reviewed-on: https://chromium-review.googlesource.com/1010411 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Geoff Lang 0ab41fa5 2018-03-14T11:03:30 Add an EGL extension to disable GL extensions by default. BUG=angleproject:2404 Change-Id: I2667ddc92d5c9ef6e0ef115f2fdf0c3d3643d945 Reviewed-on: https://chromium-review.googlesource.com/962702 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yuly Novikov 6108b766 2018-02-08T18:17:43 Remove angle::Library and its usages No longer needed after https://chromium-review.googlesource.com/513519 Loading libGLESv2 interferes with API tracing tools BUG=angleproject:1892,angleproject:2343 Change-Id: I2ccbc99377d75d107fd644301402c52466dded21 Reviewed-on: https://chromium-review.googlesource.com/910094 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jeff Gilbert 0a05df48 2017-11-02T21:39:08 Add TextureUploadFormatTest for texture unpack/upload behavior checks. Also force ANGLE_SKIP_TEST_IF() to require a semicolon. BUG=angleproject:2220 TEST=angle_end2end_tests Change-Id: I2dc777ec75babb8fbb1a2dd8949636c5c05c5767 Reviewed-on: https://chromium-review.googlesource.com/754337 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2a9e107c 2017-09-22T11:31:57 Vulkan: Support multiple vertex outputs. This is a bit of a hack, similar to how D3D11 works. We need to write output locations in the GLSL shader before we send them to glslang, so we wait until the link call, then string-replace some hard-coded identifeir code to the attribute location determined by ANGLE. This CL also fills in some of the vertex format conversion tables in formatutilsvk.cpp. BUG=angleproject:2167 Change-Id: I2424d0d990bdbcd831a4dd130e61e87d8f8f479f Reviewed-on: https://chromium-review.googlesource.com/677555 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Martin Radev 67a8a014 2017-09-08T13:03:52 Clean up MultiviewDrawTest.cpp The patch cleans up MultiviewDrawTest.cpp by removing some calls to glUseProgram as that would be done by drawQuad anyway. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: If9aff686b0ea25e63467852845c46582fdf741c5 Reviewed-on: https://chromium-review.googlesource.com/657678 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 371ed53a 2017-09-14T13:38:26 Enable D3D11 warnings in Release end2end_tests. Now that we have support for the Debug runtime on the Chromium bots, we can enable the feature in angle_end2end_tests that checks for any runtime messages after test execution. They should now show up in the Chromium CQ. BUG=angleproject:1878 Change-Id: Ie7502b031a49bcb6a68cf7e3f5e40760fa076ec1 Reviewed-on: https://chromium-review.googlesource.com/667724 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3ed60424 2017-09-07T11:32:52 Test using the same texture with multiple samplers. This covers a regression introduced with texture dirty bits. BUG=angleproject:1387 Change-Id: Ic8112718c185298ef54ec5a6f6ed2cd519e010d6 Reviewed-on: https://chromium-review.googlesource.com/653586 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 630d558f 2017-09-06T12:45:38 TextureRectangleTest: Fix RAII ignore lifetime BUG=angleproject:2122 Change-Id: Ia51c139197e1b90e54505278d301ae8ac7dab53d Reviewed-on: https://chromium-review.googlesource.com/653240 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 7d738e26 2017-09-05T12:02:10 Disable platform message when expecting OOM BUG=angleproject:2122 Change-Id: I99eed52b1f12004f0bab3f94bd3acddda8dafd69 Reviewed-on: https://chromium-review.googlesource.com/650526 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jiajia Qin 8a7b3a0c 2017-08-25T16:05:48 Reland 'Remove IndexRange retrieving in validation' This change adds GL_KHR_robust_buffer_access_behavior support. The old change is in https://chromium-review.googlesource.com/c/angle/angle/+/607413 BUG=755897, angleproject:1393, angleproject:1463 Change-Id: I04a1132c3ae8d3a766194df61c4ff7bf0b084f03 Reviewed-on: https://chromium-review.googlesource.com/640750 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d28758de 2017-08-30T15:32:48 D3D11: Re-enable updateVertexBuffer dirty bits. In some cases, when the app would call glBufferSubData to do a small data update in an existing vertex buffer, the sync code would not flush out the data to the native D3D11 buffer from the temporary staging buffer. Fix this problem by notifying the VertexArray11 class when buffer data is updated. Note that in the future we can improve this by using a different update notification for when the buffer data changes and when the underlying storage changes. For now take a very broad approach. BUG=angleproject:1156 Change-Id: I2e0fabc97c1f1d5a14d609247e61c602e9a5a85f Reviewed-on: https://chromium-review.googlesource.com/644208 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a42a4e5e 2017-08-28T14:02:12 D3D11: Copy external offscreen texture when required. In some cases ANGLE gets an external back buffer texture for our SwapChain11 class, and in some of these cases we get an offscreen texture that can't be used as a shader resource. The becomes a problem for some copy operations that use a shader to convert texture formats. Work around this problem by making a shadow copy of the texture that has sampling enabled - it is possible to use CopyResource to copy between them. BUG=chromium:752917 Change-Id: Ib757949d3d06295a118b055bf37311f820f7149c Reviewed-on: https://chromium-review.googlesource.com/638551 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill abf66fb3 2017-08-23T11:58:27 D3D11: Use dirty bits for applyVertexBuffers. If the vertex array has any dirty or dynamic attribs, we must do an update. Similarly, if a prior state change has left the vertex state invalidated, we do an update. For instance, a program change means we need a new input layout. If there was no such invalidation or dirtyness we can skip the call to InputLayoutCache. This improves the performance of the draw call benchmark (with no state changes) by about 50% on the D3D11 null driver. Increases the frames per second count of the aquarium demo with the passthrough command buffer by about 25% on a test machine. BUG=angleproject:1156 Change-Id: I8381999029f5b1912030a3342e96285a58f95e82 Reviewed-on: https://chromium-review.googlesource.com/616784 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 8f276e25 2017-05-30T12:05:52 Handle multiview Draw* calls Because the ANGLE_multiview extension uses instancing to multiply geometry for each view, Draw* calls with an active multiview program have to be handled in the follwing way: 1) Convert non-instanced Draw calls to their instanced versions. 2) Multiply the number of instances in an instanced Draw call by the number of views. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I19119e8178f70336e5dbb1e5eed0658b5b9f43d7 Reviewed-on: https://chromium-review.googlesource.com/593657 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Martin Radev <mradev@nvidia.com>
Jamie Madill 222c517f 2017-07-19T16:15:42 Control Debug layers in ANGLE_platform_angle. Debug layers seem to be a universal thing among functional back-ends. D3D, OpenGL and Vulkan all need some kind of controls for debugging, so it seems to make sense to make this control part of the base extension. Default the extension to EGL_DONT_CARE, which allows the back-end to have a lot of flexibility in terms of implementation. Also enable the extension in the D3D11 and OpenGL back-ends, and set the extension to enabled for angle_end2end_tests. Remove EGLVulkanEXTTest since it no longer tests anything not tested in the base ANGLETest class. BUG=angleproject:2086 Change-Id: I52d8170effd1846b9afbe6e4052c699fe5cb0de8 Reviewed-on: https://chromium-review.googlesource.com/578369 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 293e114d 2017-07-11T13:51:05 Add tests for the cache control extension. A first test verifies the validation of the extension, and a second compiles a simple shader and checks the cache behaviour. These tests don't currently run since the extension is disabled, but they will start running as soon as we expose it. BUG=angleproject:1897 Change-Id: Id4a76b83090712a267576069b711eeee29aa81dd
Martin Radev cdadb3ff 2017-06-09T15:13:30 Decouple ANGLETest functionality and test parameters ANGLETest provides useful functionality for end2end tests, but it cannot be used for tests which take other test parameters than the platform. The patch introduces another level of abstraction by moving all of ANGLETest's functionality to another class - ANGLETestBase - which does not inherit from ::testing::TestWithParam<>. New tests can either inherit from ANGLETest as before to have only platform parameters, or they can inherit from ANGLETestBase and add handling of custom test parameters. Example: // The new parameter type must inherit from PlatformParameters. struct MyCustomParameters : PlatformParameters { bool mWorkaroundState; }; class MyTest : public ANGLETestBase, public ::testing::TestWithParam<MyCustomParameters> { protected: void overrideWorkaroundsD3D( angle::WorkaroundsD3D *workaroundsD3D) override { workaroundsD3D->myCustomWorkaround = GetParam().mWorkaroundState; } }; ANGLE_INSTANTIATE_TEST(MyTest, MyCustomParameters(ES3_D3D11(), false), MyCustomParameters(ES3_D3D11(), true)); BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ia36e429cff8c4c291fc87a286a1d1a3004d6fad6 Reviewed-on: https://chromium-review.googlesource.com/530945 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Frank Henigman 60f6eb20 2017-05-08T15:34:46 Add WebGL test that draws to missing attachment. In WebGL one can Clear, DrawArrays, and DrawElements to a framebuffer with a missing attachment with no error. BUG=angleproject:1822 Change-Id: I4dece2fa8fad31c812e24ae18bdc380c2857a1f8 Reviewed-on: https://chromium-review.googlesource.com/502967 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill bd044ed8 2017-06-05T12:59:21 Defer shader compiles when possible. When using the program binary memory cache inside ANGLE, this will give a potential fast path. If the user doesn't query the shader compile status or info log before calling LinkProgram, then we can check the program cache before translating the program, and if it finds a hit, we don't even need to call the translator. To preserve the shader settings at compile time, a reference to the current shader translator is kept in a binding pointer on the call to compile. This mirrors a similar implementation in Chromium's command buffer. Also the compile options and source are cached at compile to preserve the correct shader state. BUG=angleproject:1897 Change-Id: I3c046d7ac8c3b5c8cc169c4802ffe47f95537212 Reviewed-on: https://chromium-review.googlesource.com/517379 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b7d5e303 2017-06-01T16:04:46 D3D11: Default init all textures. The resource manager factory methods will use ClearView or zero-filled buffers to set initial data. It assumes there are no 3D depth/stencil textures. This will lead to some wasteful re-creation of RTVs in some cases. This is a temporary measure until we can implement more efficient lazy resource init strategies. BUG=angleproject:1635 Change-Id: I590e76587d3d96a359beedb79e21d24930e5f2e0 Reviewed-on: https://chromium-review.googlesource.com/503254 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 948bbe51 2017-06-01T13:10:42 Redesign robust resource init as a display extension. Also correct the enum allocation to values that are available to ANGLE. BUG=angleproject:1635 Change-Id: I443f5654aa6a5049b4a1ae4c253cd6473b4e446e Reviewed-on: https://chromium-review.googlesource.com/520002 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 98de826c 2017-05-29T13:01:02 Platform: Fix initialization order in tests. Because of the platform refactor in abf38572062b91 we broke the way the tests override the D3D workarounds for the tiny depth/stencil bug. This change passes a pointer to the platform directly in the EGL init logic, which solves this issue. It also removes all decltype code in the platform header which might fix the UBSAN problem we were seeing previously. Also change a present mode selection error into a warning in the Vk back-end, since this was being triggered on AMD, but is safe. BUG=angleproject:2042 Change-Id: Ibbd0c69ce11a840cf4b33c616f56020001e553aa Reviewed-on: https://chromium-review.googlesource.com/513519 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 677bb6ff 2017-04-05T12:40:40 Update checks for floating point renderability. * Expose GL_CHROMIUM_color_buffer_float_rgb and GL_CHROMIUM_color_buffer_float_rgba * Fix many texture formats that were incorrectly checking the wrong extension for support or renderability. * Make all floating point texture extensions dynamically enableable. BUG=angleproject:1958 BUG=angleproject:1715 Change-Id: Iefccc8b5ae5edd97623affa9de05b1d9af5c9598 Reviewed-on: https://chromium-review.googlesource.com/468450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yunchao He f81ce4a3 2017-04-24T10:49:17 Refactoring: replace NULL by nullptr for pointers (3rd CL). This CL mainly handles passing/returning NULL to/from a function. BUG=angleproject:2001 Change-Id: I34802f792e710e3d7ff697cbe4701dc1bf5ab009 Reviewed-on: https://chromium-review.googlesource.com/485060 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Bryan Bernhart (Intel Americas Inc) 151d5de6 2017-04-13T09:52:23 Enable MSAA for texture client buffers Enhancement to the EGL_ANGLE_d3d_texture_client_buffer extension to allow use of a shared D3D texture that can be multi-sampled. BUG=angleproject:1917 Change-Id: Iaf59bbd575a5dfb29345f55b549bc4017bf2d7d0 Reviewed-on: https://chromium-review.googlesource.com/446907 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Yunchao He d7297bfb 2017-04-19T15:27:10 Code refactoring: replace NULL by nullptr for pointers. This is the frist change to replace NULL by nullptr. It handles the initialization and assignment for pointers. BUG=angleproject:2001 Change-Id: I6d4bb198a72e38b867cd2f65a6e6f2f61339a0b5 Reviewed-on: https://chromium-review.googlesource.com/481600 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Frank Henigman 5ed601b4 2017-04-10T18:50:10 Fix IsOzone() predicate. ANGLE_USE_OZONE is not defined in tests, but USE_OZONE is so use the latter. BUG=angleproject:1423 Change-Id: Ib758fec6a1bb8d5cc66d0994cba2142e6a7f82b0 Reviewed-on: https://chromium-review.googlesource.com/474113 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Frank Henigman 6e0d8410 2017-04-05T15:15:10 Add IsOzone(). Add a function to check for the Ozone back end for use in skipping tests. BUG=angleproject:1423 Change-Id: Ida3313e8cce5179422bdca85ba68f9765dfac840 Reviewed-on: https://chromium-review.googlesource.com/469068 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill e08a1d36 2017-03-07T17:24:06 Plumb robust resource init extensions. This also cleans up a few minor glitches in the extension texts, and renames the EGL extension for consistency. It incidentally fixes a bug in our EGL init where we were checking the wrong client versions for KHR_create_context. It also implements a new feature for tests which allow them to defer Context creation until the test body. This allows tests to check for EGL extension available before trying to create a context with certain extensions. BUG=angleproject:1635 Change-Id: I9311991332c357e36214082b16f2a4a57bfa8865 Reviewed-on: https://chromium-review.googlesource.com/450920 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang feb8c686 2017-02-13T16:07:35 Add extensions to disable client arrays. Chrome doesn't allow any client data in its command buffer. Add an ANGLE extension to request a context that disallows client data. BUG=602737 Change-Id: If9d5144daea3c629a73562396000df59a671aad3 Reviewed-on: https://chromium-review.googlesource.com/441986 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill abf38572 2017-02-14T16:47:59 Remove old C++ ANGLE platform. Now that the new platform is in place, we can remove the old methods. Must be landed after https://codereview.chromium.org/2697463003/ BUG=angleproject:1892 BUG=chromium:678870 Change-Id: Ia29a3b120cf3521fc0409019c2e64e4dbc6f460d Reviewed-on: https://chromium-review.googlesource.com/441274 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Yuly Novikov bcb3f9ba 2017-01-27T22:45:18 Direct logging to Platform when available All logging should be done via ERR() and WARN(), which call angle::Platform's logError and logWarning, if there is current Platform which supports logging. Otherwise, ERR() is directed to std::cerr. Misc fixes to keep tests passing. BUG=angleproject:1660, angleproject:1644 Change-Id: I2bca33a021537185d0c236a3083789af3236b5f3 Reviewed-on: https://chromium-review.googlesource.com/434188 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f6d14799 2017-02-03T10:33:54 Vulkan: Move window re-init to test constructor. Moving it from SetUp to the constructor allows the swapping to work even if the test decides to not call the SetUp base function. This fixes the Vulkan extension test, which skips normal test init. This requires us to change an ERR invocation into a print. BUG=angleproject:1810 Change-Id: I3be4bdb6df8c02fc1c9bbc7834ba485054272b8e Reviewed-on: https://chromium-review.googlesource.com/437284 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>