src/tests/gl_tests/RobustBufferAccessBehaviorTest.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi b16d105f 2024-10-03T10:25:32 Remove Desktop GL front-end support For Desktop GL applications, please use Zink! Bug: angleproject:370937467 Change-Id: Ie734634bb62a2e98c80e1b32d8b3d34624da3c04 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5905428 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Charlie Lao 7f5143c2 2023-10-02T15:38:15 Vulkan: Notify VAO when VBO's mBufferWithUserSize changed. When buffer robust access is enabled, and bufferData is called with different size and we end up reusing the underline storage, we will have to recreate VkBuffer with user's size, and driver is relying on VkBuffer's size to implement robust access. The bug here is that we notify VAO when storage changes. But when storage is reused and we have dedicated VkBufer with user size and that VkBuffer changed, we were not notifying the VAO. This CL adds that notification so that VAO gets notified and dirty bits processed and its cache of VkBuffer gets updated Bug: chromium:1488055 Bug: b/303138134 Change-Id: Ie693c92c2edde9a22a41a25f5bde493397550d95 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4906568 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 1b450b92 2023-09-15T11:07:25 Vulkan: Fix buffer storage reuse bug when robustAccess is enabled There is an optimization in vulkan backend that when the bufferData is called and current storage size is big enough for new bufferData call, we just reuse the storage. Mean while, when hasRobustAccess() is true, we must use the VkBuffer with the exact user size that glBufferData call provides so that driver can set proper access boundary. In order to satisfy both requirement, if robust resource access is enabled, we create a separate VkBuffer with the exact user provided size but bind to the same memory. There is a bug here that if robustAccess is true, this buffer of user provided size is not been recreated when storage is reused but with different user size (both has same allocation size). This causes we keep using the smaller VkBuffer and subsequently causes missing triangles. This CL clears mBufferWithUserSize when size changes and storage is reused. The other bug here is that previously we are checking isRobustResourceInitEnabled, which is incorrect. We should check hasRobustAccess. This appears works for chrome possibly due to both are enabled. This CL switches it to check hasRobustAccess. This CL also renames mBufferForVertexArray to mBufferWithUserSize to reflect what its true meaning. Bug: chromium:1476475 Change-Id: I843cc3a705f8a582a97bc0307f03aa1eb9fad3ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864003 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov a77a80a1 2022-10-25T13:54:33 Wait for DestroyNotify and ConfigureNotify events. There appears to be a race condition where XDestroyWindow+XCreateWindow ignores the new size (the same window normally gets reused but this only happens sometimes on some X11 versions). Wait until we get the destroy notification which should avoid races between termination and initialization. However, it turns out just doing that breaks things because tests get to termination before even giving the window a chance to set up fully (e.g. ConfigureNotify) which only happens after making the window visible.. so additionally block in setVisible until we get ConfigureNotify. aaand turns out RobustBufferAccessBehaviorTest requires setVisible(true) - tests fail when running on my local Linux and pass now that I added setWindowVisible! Bug: angleproject:7620 Change-Id: I93f2f05cb9d1c62776636bec976d94ead4cf0fd1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3979168 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Gregg Tavares 61e905af 2022-09-07T15:47:26 Move out of bounds buffer access tests under correct extension A few tests in RobustResourceInitTest are testing for out of bounds values but RobustResourceInitTest is only checking GL_ANGLE_robust_resource_initialization which does not do anything for out of bounds access. I moved them to the RobustBufferAccessBehaviorTest. Bug: angleproject:7638 Change-Id: If542ce2f1711e4b1980bf52cabfa3cff71480536 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3880833 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
Geoff Lang 785353fd 2022-05-24T12:40:16 Support Desktop OpenGL context creation in end2end tests Validation of Desktop GL versions and profile masks is unimplemented. Bug: angleproject:7360 Change-Id: Ifae94215b6aada895c2b02318a1d05c9515e9b96 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3664916 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Eddie Hatfield 89e38b57 2022-06-22T15:04:08 Refactor to use ANGLETest vs ANGLETestWithParam Bug: angleproject:6747 Change-Id: I72ad52d0268eae0e1a401f12f3e94cc5efa402f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719002 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 5f0badf4 2022-01-18T20:05:55 Vulkan: Prevent out of bounds read in divisor emulation path. Split the replicated part of StreamVertexData out to StreamVertexDataWithDivisor, there is only a partial argument overlap between the two. Bug: chromium:1285885 Change-Id: Ibf6ab3efc6b12b430b1d391c6ae61bd9668b4407 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3398816 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Roman Lavrov <romanl@google.com>
Jamie Madill c4c73e82 2022-01-14T12:55:20 Fix RobustBufferAccessBehaviourTest. Use "NoFixture" to enable the extension when available. Bug: angleproject:6897 Change-Id: Ieb3383fbff4df664ad35dd034de3bdd7f8508ed6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3388115 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 44bef8ae 2021-10-08T15:01:37 Remove traces of Feature Level 9_3 support from tests. Bug: angleproject:1284 Bug: angleproject:3042 Change-Id: Ic2f77d315e98c3b15c5fc8b0359168bce00867d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3213294 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tobin Ehlis 1a01b4b3 2019-11-11T16:41:07 Refactor end2end test macros This is a foundational CL to enabling the end2end tests on swiftshader. Refactored infrastructure with new ANGLE_INSTANTIATE_TEST_ES* macros that will run tests over all various combinations of all platforms for different ES versions. Just skipping failing tests initially to get the refactor landed. Bug: angleproject:4081 Bug: angleproject:4092 Change-Id: I017f6c3267179e49b6ae08cc7488096b423dcdb5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1904635 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
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 ddc4d33a 2019-05-01T15:11:46 Remove several underused platform configs. * Removes D3D11 Warp and Reference configs from tests. * Removes several permutations of OpenGL back-end specific configs. * Removes FL 9_3 since it is no longer supported. * Removes present path "Copy" since it's redundant with normal D3D11. Reduces number of configs from over 60 to 25. Bug: angleproject:3393 Change-Id: Ia5a23de3c4865b17ee50673a4066757b901a4b5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574675 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Jonah Ryan-Davis 9078c6a7 2019-03-19T11:10:15 Update necessary angle_end2end_tests to check the Android device name Some tests fail only on specific devices, so the tests should be updated to reflect that, and allow more tests to run on more devices. Bug: angleproject:3275 Change-Id: I8e3183c1769c0bb8ed6d2605afcaf399cb1d9ed0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1534463 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
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 4b2e00f4 2019-01-28T23:37:55 Suppress EmptyBuffer test on Android GLES. Seems to fail on the Pixel XL. Bug: angleproject:2861 Change-Id: Ic1690abccd867251e83c0ae5e38c2bbd1c41615b Reviewed-on: https://chromium-review.googlesource.com/c/1441774 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 4c94788c 2019-01-28T11:12:31 Suppress RobustBufferAccessBehaviorTest.EmptyBuffer on Pixel XL Vk BUG=angleproject:3109 Change-Id: Ib8565e7a99dea90bb5fc966ffe0606a8ebc62fcc Reviewed-on: https://chromium-review.googlesource.com/c/1436052 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill d51fbe34 2019-01-25T15:03:39 Fold buffer access validation into extensions. We only need to perform vertex array buffer validation if the WebGL compatiblity extension is enabled and robust access is not available. Although sometimes the range checks are useful for determining undefined behaviour they are not required by the OpenGL spec. They also slow down state updates significantly. This migrates the OOR tests into specific WebGL tests. It also requires a change to a Chromium test on the passthrough decoder. Improves perf by about 10% in the Vulkan VBO state change test. Also fixes some robust resource access cases for D3D11. Bug: angleproject:3000 Change-Id: Ice37f38f01c2f27bf32ed55657a30e69d8508335 Reviewed-on: https://chromium-review.googlesource.com/c/1390362 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill bbdeee91 2019-01-02T09:57:49 Suppress FL 9_3 failing test. RobustBufferAccessBehaviorTest.RobustBufferAccessBehaviorTest Bug: angleproject:3042 Change-Id: I40186eeeb69ee2939844117b661209a433773db9 Reviewed-on: https://chromium-review.googlesource.com/c/1392396 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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 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>
Shahbaz Youssefi 0864a7ac 2018-11-07T15:50:15 Vulkan: Enable end2end tests for ES2_VULKAN everywhere Used a script to find test files that have more ES2_OPENGL() invocations than ES2_VULKAN(), and added ES2_VULKAN() to those. There may be false negatives. Bug: angleproject:1578 Change-Id: I938eb3571c909879e9276b355a9f1d324880f99a Reviewed-on: https://chromium-review.googlesource.com/c/1324350 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Yuly Novikov 79207e6e 2018-09-28T16:09:26 Skip tests failing on Pixel XL RobustBufferAccessBehaviorTest.NoBufferData/ES2_OPENGLES RobustBufferAccessBehaviorTest.NoBufferData/ES3_OPENGLES RobustBufferAccessBehaviorTest.NoBufferData/ES3_1_OPENGLES ClearTest.ChangeFramebufferAttachmentFromRGBAtoRGB/ES2_OPENGLES ClearTest.ChangeFramebufferAttachmentFromRGBAtoRGB/ES3_OPENGLES WebGLGLSLTest.InitUninitializedGlobals/ES2_OPENGLES Bug: angleproject:2861,angleproject:2689,angleproject:2862 Change-Id: I142594c952b6e7de24057784794b5725f3486212 Reviewed-on: https://chromium-review.googlesource.com/1252701 Reviewed-by: Yuly Novikov <ynovikov@google.com> Commit-Queue: Yuly Novikov <ynovikov@google.com>
Jamie Madill 219ef05b 2018-09-25T20:16:37 Skip NoBufferData test on NVIDIA Shield TV. Bug: chromium:889303 Change-Id: Ie06ea7ff27e64d8b149a2200efd159f3a09780b7 Reviewed-on: https://chromium-review.googlesource.com/1244001 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 7620c739 2018-09-24T11:45:55 Prevent crash in robust access mode when buffer has no data This fixes a crash appearing in robust access mode when a buffer has no data by stopping the draw call. A better fix would be to ensure that fetches from an empty buffer result in zero, but this fix requires a lot more effort. This is not necessarily warranted since the client is either way doing something incorrect in this case. BUG=angleproject:2840 TEST=angle_end2end_tests Change-Id: Ie4ef5b1ca7c0091d7d26f91678d6e4768cc0c650 Reviewed-on: https://chromium-review.googlesource.com/1238622 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 161a89b1 2018-08-31T10:12:38 Skip DrawElementsIndexOutOfRangeWithStaticDraw on NVIDIA D3D11 FL9.3. This test started consistantly failing after changing the shard count on this test suite. BUG=angleproject:2799 Change-Id: I75769b08f9d4dda1d436facc34a8292193b4538e Reviewed-on: https://chromium-review.googlesource.com/1199723 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 18e323ab 2018-05-11T16:54:17 D3D11: Fix out-of-range access with robust access. When using a vertex buffer with DYNAMIC usage, with robust buffer access enabled, we would sometimes read out-of-bounds when using very large values for the index range. An unchecked signed addition would overflow and lead to reading a negative offset. Fix this problem by keeping the value size_t whenever possible. Also do clamped casts when converting to a smaller values. Also adds a regression test. Bug: chromium:842028 Change-Id: Ie630ac857c6acfc0bace849a03eebfbaa2fbe89a Reviewed-on: https://chromium-review.googlesource.com/1055928 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 69643438 2018-04-27T12:23:47 D3D11: Reorder VAO synchronization. The index range was being resolved in the call to VertexArray11::syncStateForDraw but the code which invalidates the input layout was being executed before this. BUG=837002 Change-Id: I4e00b53cdc51f8758b0e2ba9e2dfc93b5e22556c Reviewed-on: https://chromium-review.googlesource.com/1032633 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill a5dc625c 2017-09-20T21:08:14 Suppress two failing angle_end2end_tests. "Add test for GL_KHR_robust_buffer_access_behavior" introduced a failure in Windows 10 NVIDIA OpenGL configs. "ES31: Enable shader storage buffer support for OpenGL backend" introduced a failure on Linux Intel HD 630 configs. BUG=angleproject:1463 BUG=angleproject:1951 Change-Id: I791bc729893b7f31093ab1678dc8d01edfbd0a5a Reviewed-on: https://chromium-review.googlesource.com/676473 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiajia Qin 47bf2dc5 2017-09-05T15:00:25 Add test for GL_KHR_robust_buffer_access_behavior This test is ported from webgl test element-index-uint.html. BUG=angleproject:1393, angleproject:1463 Change-Id: I165e3dd2913968c8cc035c570a7bcaf91aed095a Reviewed-on: https://chromium-review.googlesource.com/651239 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>