src/tests/test_utils/ANGLETest.cpp


Log

Author Commit Date CI Message
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>
Jamie Madill ea20d622 2017-01-19T19:12:12 Vulkan: Workaround NVIDIA not sharing with OpenGL window. NVIDIA seems to have the limitation of not being able to work with a window handle on both OpenGL and Vulkan. Apparently this also happens with NVIDIA on Linux, but doesn't happen with any other vendor. Work around this by opening a new OS window when switching between Vulkan and non-Vulkan. BUG=angleproject:1810 Change-Id: Id6bfcc2229be5a0d97202dfc87944001b4ab7871 Reviewed-on: https://chromium-review.googlesource.com/430887 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang c5a2a172 2017-01-13T15:55:07 Add EGL_EXT_pixel_format_float support, enables float EGL surfaces. Add floating point EGL configs for the D3D11 backend. BUG=angleproject:1707 Change-Id: Ic84cd3a0d41e78cc39d0275d83e7695f55673ddf Reviewed-on: https://chromium-review.googlesource.com/428294 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 7b57b9d7 2017-01-13T09:33:38 Vulkan: Implement basic Clear and ReadPixels. This enables the simple operations clear test on Vulkan. The current implementation is very synchronous - it will block and finish the current command buffer if there is any possibility of a race. BUG=angleproject:1319 Change-Id: If01fe9a19ed6f539639a38786193d3626164cada Reviewed-on: https://chromium-review.googlesource.com/367754 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 80ab03c5 2017-01-03T11:03:23 Add angle_white_box_tests for libANGLE render tests. angle_end2end_tests included tests that used both the entry points from our shared libraries as well as calling libANGLE classes like gl::Context directly. Split these into a new test executable. This also removes the libANGLE code from all the end2end tests. It's necessary to add static versions of libEGL and libGLESv2 so that we call safely call methods in libANGLE an the entry points from the same target. BUG=angleproject:1660 Change-Id: I6d82021b9300231ddb5fee435e5d77728f8f1292 Reviewed-on: https://chromium-review.googlesource.com/419175 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0448ec84 2016-12-23T13:41:47 Vulkan: Enable validation layers on request. Also adds the build files for the Vulkan layers. The layers are enabled by default for the tests. BUG=angleproject:1319 Change-Id: I0b442b36312a1299a932922e1c4e39f00801de49 Reviewed-on: https://chromium-review.googlesource.com/367751 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e09bd5d3 2016-11-29T16:20:35 Vulkan: Add display creation, test and extension. With this CL we have the ability to create Vulkan test configs and run basic tests, although the only thing that works is creating a Vulkan Renderer using the extension. BUG=angleproject:1319 Change-Id: I8ad17bba01241334be7da16e68fea38762ca6a20 Reviewed-on: https://chromium-review.googlesource.com/367750 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 408293f8 2016-12-20T10:11:45 D3D11: Fix stale SRVs with tiny depth textures. When the tiny depth texture would get re-created on change, it was not freeing any cached SRVs which were pointing to the old tex. Fix this by erasing the cache entry if the texure is recreated. Also include a test which hooks into the workarounds to force testing on every platform. Also narrow the workaround to only apply to depth/stencil textures which use these mips in GL, rather than D3D, where we always create a full mip chain. BUG=angleproject:1664 Change-Id: If0ac396b8847e1bf9b50165e5332da573e9bb3e4 Reviewed-on: https://chromium-review.googlesource.com/421567 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 922cbfcb 2016-11-25T16:23:18 common: Add a vector arithmetic helper classes Change-Id: I2f96baedf10d346eaa150bab04f8f6ca3ba573b9 Reviewed-on: https://chromium-review.googlesource.com/414272 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c339c4e5 2016-11-29T10:37:36 Split WebGL compatibility into two extensions. The mechanism for requesting extensions is now a separate extension. Added a way to query the extensions that support enabling. BUG=angleproject:1523 Change-Id: I2efaa9f6d67b12ecae325f455404e34ba04d0e7c Reviewed-on: https://chromium-review.googlesource.com/414529 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 76cdbd51 2016-09-23T16:51:04 Add basic initialization code for ContextNULL so it can run some tests. BUG=angleproject:1468 Change-Id: I8dfc9a3c71e5638de22bc9d9a5dadfb495ef23a7 Reviewed-on: https://chromium-review.googlesource.com/388846 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 2018c0ba 2015-12-08T11:48:51 Add a EGL_ANGLE_d3d_texture_client_buffer extension. Allows creation of pbuffers from D3D texture objects. BUG=540829 BUG=angleproject:1144 Change-Id: If8ea717ef011608cd01357c217837133d726d3ea Reviewed-on: https://chromium-review.googlesource.com/316804 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 91db32c5 2016-10-06T09:31:53 Skip TimerQueriesTest.TimeElapsedMulticontextTest on Win/AMD/GL/Debug. This test appears to be flaky. BUG=angleproject:1541 Change-Id: I2a91626f6dc309d2dc23098cbaf290adac7f4859 Reviewed-on: https://chromium-review.googlesource.com/394217 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 601a0ccc 2016-10-06T14:38:43 Revert "Skip TimerQueriesTest.TimeElapsed on Win/AMD/GL/Debug." The correct test was the multi-context version. BUG=angleproject:1541 This reverts commit d0614b852154da7a9968e2f6b1a775fc469dc83b. Change-Id: I4f4a9e3b1e0301eef34ce8c06cd649bff66fcdb1 Reviewed-on: https://chromium-review.googlesource.com/394216 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d0614b85 2016-10-06T09:31:53 Skip TimerQueriesTest.TimeElapsed on Win/AMD/GL/Debug. This test appears to be flaky. BUG=angleproject:1541 Change-Id: I947dbc759e0fef505ce9b11e501f2dbe35ff1e5c Reviewed-on: https://chromium-review.googlesource.com/394329 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang f41a7151 2016-09-19T15:11:17 Add an extension to disable resource generation on bind. BUG=angleproject:1518 Change-Id: I662f7b07da5c97831496f2617b0adadf9858bdc9 Reviewed-on: https://chromium-review.googlesource.com/386799 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang f607c60a 2016-09-21T11:46:48 Fix validation of ReadPixels format and type. The validation for ReadPixels allows for two combations of format/type: 1. Based on the current framebuffer's component type. * GL_RGBA/GL_UNSIGNED_BYTE if the framebuffer is a normalized (signed or unsigned). * GL_RGBA_INTEGER/GL_INTEGER if the framebuffer is an integer format. * GL_RGBA_INTEGER/GL_UNSIGNED_INTEGER if the framebuffer is an unsigned integer format. * GL_RGBA/GL_FLOAT if the framebuffer is any type of float framebuffer (added in EXT_color_buffer_float). * These combations are detailed in the ES2 spec on pg 105 or ES3 on pg 193. 2. The implementation read format/type returned from glGetIntegerv. * These formats are added by specs, OES_texture_float, EXT_texture_rg, EXT_read_format_bgra, etc. Update the GL and D3D backends to perform the conversion from GL_HALF_FLOAT to GL_HALF_FLOAT_OES. Continue allowing reading as BGRA_EXT to support Skia. Should be removed in the future. BUG=607283 BUG=angleproject:1478 Change-Id: I0312cad4d5f138ab036f383d221f8ccd19a77f6d Reviewed-on: https://chromium-review.googlesource.com/346232 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang c287ea6e 2016-09-16T14:46:51 Add WebGL validation extensions to ANGLE. BUG=angleproject:1523 Change-Id: I6fecb5055ed8087665aeee34b3a066ea8f38d51b Reviewed-on: https://chromium-review.googlesource.com/386281 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 97073d12 2016-04-20T10:42:34 Implement CHROMIUM_copy_texture for D3D11. BUG=angleproject:1356 Change-Id: I70246762411dbeeb3e291e317854139a68d80070 Reviewed-on: https://chromium-review.googlesource.com/339434 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Martin Radev 1be913cf 2016-07-11T17:59:16 Add support for ES31 context creation The dEQP test for context creation passes. SH_WEBGL3_SPEC has been added, but it should be considered whether we should keep it, remove it or rename it. It was added so that there is a webgl mapping to es 310 shaders. Check Compiler.cpp. The bison file has been modified so that some tokens from es3 can be also used in es31 as well. A separate macro ES3_1_ONLY is added so that some tokens are limited only for es 310 shaders. BUG=angleproject:1442 TEST=angle_unittests Change-Id: I2e5ca227c96046c30dc796ab934f3fda9c533eba Reviewed-on: https://chromium-review.googlesource.com/360300 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ec0b580d 2016-07-04T13:11:59 Re-land "D3D11: Fix readback of BGRA-backed formats." For some BGRA-backed formats (RGBA4, R5G6B5, RGB5A1), our ReadPixels implementation wasn't aware the BGRA format didn't exactly match the RGBA format. For these it would do the 'fast path' memcpy method, when it should stop and do the slow pixel-by-pixel packing method. Fixes conformance2/reading/read-pixels-from-fbo-test.html. Reland: fix empty format info that was causing us to only see the first pixel in the FBO in a ReadPixels call. Also fix bugs in the unorm 16-bit format readback code, and add ASSERTs to catch bugs in subsequent new formats. BUG=angleproject:1407 BUG=chromium:616176 Change-Id: I9fd55b9e1dd6a306eb4db195d775c02a1eb1f93f Reviewed-on: https://chromium-review.googlesource.com/357132 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez c7f59d02 2016-06-20T10:12:08 Suppress a Wintel/OpenGL failure on a new test. BUG=angleproject:1388 Change-Id: I4d346ca3c6914e56055aa6492d9d013634a1b9ad Reviewed-on: https://chromium-review.googlesource.com/353693 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov d364780a 2016-06-16T15:58:35 Skip ReadPixelsTest.OutOfBounds on Adreno Android GLES Due to Adreno bug in glReadPixels BUG=angleproject:1413 TEST=ReadPixelsTest.OutOfBounds Change-Id: I2fd426bc6d21f5d9604ca32ad34dd8841cbb9a3e Reviewed-on: https://chromium-review.googlesource.com/353363 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
John Bauman 73d417ed 2016-06-17T00:49:40 Revert "D3D11: Fix readback of BGRA-backed formats." This reverts commit 230d95616d1309914a6703e27a797a440806dd02. This broke GLES2ConformTest.GL2Tests_framebuffer_objects_input_run on the NVIDIA Win8 Chromium bots. BUG=chromium:620908 Change-Id: Idf6e3eb51483ff0b6bc758b95c5910863ddfc25f Reviewed-on: https://chromium-review.googlesource.com/353394 Reviewed-by: John Bauman <jbauman@chromium.org> Commit-Queue: John Bauman <jbauman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 230d9561 2016-06-15T18:11:52 D3D11: Fix readback of BGRA-backed formats. For some BGRA-backed formats (RGBA4, R5G6B5, RGB5A1), our ReadPixels implementation wasn't aware the BGRA format didn't exactly match the RGBA format. For these it would do the 'fast path' memcpy method, when it should stop and do the slow pixel-by-pixel packing method. BUG=angleproject:1407 BUG=chromium:616176 Change-Id: Ie24758513af6f9ef87f0aa503135456c96493701 Reviewed-on: https://chromium-review.googlesource.com/352252 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9fc7b4c7 2016-06-08T15:30:14 D3D11: Fix loading of RGBA8 data to RGB565. BUG=angleproject:1407 BUG=chromium:616176 Change-Id: I663d265abfabb88a5aca8ca0002d2cbc29f6b069 Reviewed-on: https://chromium-review.googlesource.com/350906 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9b08a3d5 2016-06-08T15:30:12 Add RAII helpers for GL tests. These methods can obviate the need for glGen/Delete calls in tests. BUG=angleproject:1407 Change-Id: Ied571e48db92bd1d4f4089d91a95e7c7fafcfcaf Reviewed-on: https://chromium-review.googlesource.com/350904 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Vincent Lang 25ab4510 2016-05-13T18:13:59 Implement GL_EXT_texture_norm16 extension BUG=angleproject:1365 Change-Id: I972b156ecb41ff44bc1f6365373ab386bacc85f1 Reviewed-on: https://chromium-review.googlesource.com/346530 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 776a75b4 2016-05-17T13:43:17 Make Platform errors trigger test failures. This can be useful in the Vulkan back-end to make validation layer errors cause test cases to fail. BUG=angleproject:1319 Change-Id: I523f3c874e892a2646600e4c5c554319ed8d770c Reviewed-on: https://chromium-review.googlesource.com/342050 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 190028d3 2016-05-13T12:11:29 Clean up specifying colors and texture scale in MipmapTest Remove unnecessary scale parameter from MipmapTestES3, and use the GLColor class and EXPECT_PIXEL_COLOR_EQ instead of EXPECT_PIXEL_EQ for greater readability. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: I79c30ce85be5d554d89197f8f1ce7ab0c51c11b6 Reviewed-on: https://chromium-review.googlesource.com/344513 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 87fc71c4 2016-05-11T14:25:21 D3D: Reallocate storage when texture format changes with base level Different levels of the same texture may have different formats, so changing the base level may affect the format that should be used for the storage. Take this into account in the D3D backend. The added test fails on some GL drivers. TEST=angle_end2end_tests BUG=angleproject:596 Change-Id: I5380e942694a75685ebb510edb01c0489e0d5179 Reviewed-on: https://chromium-review.googlesource.com/344230 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho a314b61c 2016-03-10T16:43:00 Determine D3D texture storage size with correct base level The size of the texture storage is now determined by extrapolating the level zero texture dimensions from the base level dimensions. This fixes crashing when images for levels below the base level are not defined, and also fixes texture storage dimensions being calculated wrong in case the levels outside the used level range have dimensions that are inconsistent with the dimensions inside the used level range. Checking texture level completeness in TextureD3D is now done based on the dimensions of the base level, and levels that are outside the base level to max level range are not taken into account. Textures are marked incomplete in case their base level is greater than their max level. Changing the base level can also affect the size of the storage required for the texture. Old storage is now discarded when the base level is changed and the new base level calls for different storage dimensions. Code in TextureD3D is refactored so that "base level" actually means the base level of the texture specified through the GLES API, and "level zero" is used where TextureD3D would sometimes previously use "base level". Changing either the base level or max level can also affect texture completeness, so invalidate the cached completeness in Texture if they are changed. Some of the added tests are still failing on Intel and NVIDIA OpenGL drivers because of driver bugs. Tests also fail on OSX. BUG=angleproject:596 TEST=angle_end2end_tests, dEQP-GLES3.functional.texture.* (no regressions), dEQP-GLES3.functional.shaders.texture_functions.* (no regressions), dEQP-GLES3.functional.state_query.texture.* (no regressions) Change-Id: Icd73d6e29f84a341ed5ff36d5ec5cb2f469cb4e8 Reviewed-on: https://chromium-review.googlesource.com/333352 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 52b09c2f 2016-04-11T14:12:31 Re-re-land "D3D11: Implement dirty bits for VertexArray11."" Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. Re-land with a fix for the start vertex offset. Re-re-land with a fix for using XFB with deleted buffers. BUG=angleproject:1327 Change-Id: I0fba49515375c149bbf54d933f8d1f747fbb8158 Reviewed-on: https://chromium-review.googlesource.com/338003 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 53a36004 2016-04-08T19:03:18 Revert "Re-land "D3D11: Implement dirty bits for VertexArray11.""" Seems to make the following dEQP test flaky: dEQP-GLES3.functional.lifetime.attach.deleted_output.buffer_transform_feedback doesn't show up on every bot test, but run it a few times and it'll flake. Reverting while I investigate. BUG=angleproject:1327 This reverts commit 3477f3a62dc139a253a0b361ee138116e9fa881f. Change-Id: Ic23a392526f5f6e107cf0aa06448389804d6b208 Reviewed-on: https://chromium-review.googlesource.com/337961 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3477f3a6 2016-03-29T17:15:29 Re-land "D3D11: Implement dirty bits for VertexArray11."" Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. Re-land with a fix for the start vertex offset. BUG=angleproject:1327 Change-Id: Ic23e48fb18ed7f29c1999914a2f799ac04aa03e9 Reviewed-on: https://chromium-review.googlesource.com/334225 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 9e3c615e 2016-03-29T21:58:33 Suppress end2end failures for the new Linux Intel bot. Since this is a new bot, we should make it green ASAP so we can catch any new regressions. BUG=angleproject:1346 Change-Id: I2c1288b8115a9d7980d5a3f37753b35cbb837486 Reviewed-on: https://chromium-review.googlesource.com/336050 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho c3e55a43 2016-03-09T16:29:18 Validate program changes wrt transform feedback UseProgram can't be called while transform feedback is active and unpaused. Validate this by checking the presence of active transform feedback in UseProgram. LinkProgram or ProgramBinary can't be called while transform feedback associated with the program is active. Validate this by going through all of the existing transform feedback objects when one of these functions is called and checking whether they are associated with the program being changed. A program association is added to gl::TransformFeedback to facilitate this. BeginTransformFeedback can't be used to unpause a transform feedback object, so code for that is removed. The validation of the entry points touched in this patch is refactored to follow the current convention of separate Validate* functions, though with LinkProgram following this convention fully isn't practical. This patch also makes sure that ANGLE doesn't invoke behavior that the GL spec doesn't specify if a program object associated with a paused transform feedback is deleted. Tests are edited so that they don't call UseProgram when it generates an error. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.shader.* (2 more tests pass), dEQP-GLES3.functional.transform_feedback.* (no regressions), angle_end2end_tests Change-Id: I2e5b3a027ced11249b762ec01a29fa41d2c0dd96 Reviewed-on: https://chromium-review.googlesource.com/332141 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill bc4c4bc5 2016-03-23T21:04:43 Re-land "Validate that attrib offsets don't overflow buffers." During draw calls, we wouldn't add the current attrib offset to the required draw call size when checking attributes. This could lead to us producing warnings in the D3D11 runtime, and miss returning some errors. Re-land with a test data initialization fix, and with some extra tests merged from another CL. BUG=angleproject:1339 Change-Id: Ifd549c3b1f6871417dc1693cb3ec534414e92cfd Reviewed-on: https://chromium-review.googlesource.com/333723 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c979aabf 2016-03-12T00:26:44 Revert "Validate that attrib offsets don't overflow buffers." Seems to fail the Windows 8 bots in FL9_3 for some reason. https://build.chromium.org/p/chromium.gpu.fyi/builders/Win8%20Release%20%28NVIDIA%29/builds/20703 VertexAttributeTest.ShortNormalized_ES2_D3D11_9_3 VertexAttributeTest.ShortUnnormalized_ES2_D3D11_9_3 BUG=angleproject:1339 This reverts commit fb57c04c781df708a432f0e90acf2e431b7983bb. Change-Id: I4c678ff6b337e9a3e0a1fc809f96f6b89407ea33 Reviewed-on: https://chromium-review.googlesource.com/332442 Reviewed-by: Jamie Madill <jmadill@chromium.org>