src/tests/gl_tests/DrawElementsTest.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi b3ab67d3 2024-03-14T15:06:02 tests: Remove unnecessary .get() from RAII objects Bug: chromium:40942995 Change-Id: I82509869bce3ad8f51811188fe04267f2de04786 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5370904 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 6769ef2b 2022-12-16T15:34:21 Vulkan: Bug fix in setupIndexedDraw Reset ContextVk::mCurrentIndexBufferOffset to 0 after a call to ContextVk::convertIndexBufferCPU(...) irrespective of whether the buffer binding is dirty. Bug: angleproject:7896 Test: DrawElementsTest.DrawElementsWithDifferentIndexBufferOffsets* Change-Id: I70a63b7e432aaa9f8c647e56bd162312143abd65 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4113446 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: mohan maiya <m.maiya@samsung.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>
Steven Noonan 04460fe8 2022-03-15T19:04:39 end2end tests: add regression test for GL_LINE_LOOP drawing This was fixed by 349636a05a3577a127adb6c79a1e947890bbe462. Adding a regression test which I didn't have ready at the time. Bug: angleproject:7102 Change-Id: Icbb685c1ffad6725a278e5ed65f881f86c5688ef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3527604 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao e9d9d933 2022-03-14T09:33:28 Vulkan: Fix another corner case of mCurrentElementArrayBuffer mCurrentElementArrayBuffer is vertex array state. But it gets modified with different draw call parameters. When this changes, we always re-calculate mCurrentElementArrayBuffer. And we have added updateCurrentElementArrayBuffer call at various places where we need to reset mCurrentElementArrayBuffer to back to what bound to vertex array. There is still one more places missing such call, that when a different vertex array is been bound, the new vertex array may still have mCurrentElementArrayBuffer set to the special array for LineLoop. We need to reset it upon it gets bound. This CL also adds a new test case DrawElementsTest.LineLoopTriangles from Steven Noonan. Bug: angleproject:6955 Change-Id: Ida95062b071d25be26e59f886bfe3d61e6886c5c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3522565 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Steven Noonan 584f1b78 2021-10-14T17:55:47 metal: fix crash when checking for flat attributes We can frontload the check of whether or not a shader program uses flat interpolation for its attributes. This prevents a crash where an application does: glAttachShader glLinkProgram glDetachShader glDeleteShader and the check tries to look at the shader attachments (which are no longer valid). Also add some tests to ensure that detaching shaders after program link doesn't cause crashes on indexed draws, and that the flat attribute detection works across program save/load. Bug: angleproject:6526 Signed-off-by: Steven Noonan <steven@valvesoftware.com> Change-Id: I70990808fdfd17608b4b720461cae1a0bdd064b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3224663 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Steven Noonan 397a27bb 2021-10-20T20:33:20 VertexArray: on destroy, remove observer on element array buffer Otherwise there will be a null pointer dereference in gl::Buffer::onContentsChange(). Signed-off-by: Steven Noonan <steven@valvesoftware.com> Bug: angleproject:6599 Change-Id: I73388b6d0ccc357ca1944452a18ccf462dd8046c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3236206 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov a6b16d29 2021-03-02T19:04:57 Suppress UNINSTANTIATED_PARAMETERIZED_TEST failures on Ozone We only support ES2 on Ozone, so tests that depend on ES3 or ES31 support are not instantiated there. Bug: chromium:1183147 Change-Id: Id58bcd9b44a5b9a70b5ae8115e27c44f5dc81226 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2726550 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Qin Jiajia 5abc0c56 2020-06-09T14:32:28 Fix failures that alpha channel is not correct Previously, the alpha channel was not set which resulted the intended swapchain buffer format is B8G8R8X8_UNORM. It means that the format supports 8 bits for each color channel and 8 bits unused. However, in our test case, we expect to compare the alpha channel. So we should set alpha channel explicitly. Bug: angleproject:4575 Bug: angleproject:4576 Change-Id: Ic26ee81a6a34dc44d0ae32e3dc463e9afa16e05c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2237189 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Ian Elliott a5e46552 2020-04-20T09:33:21 Vulkan: glDrawElements used old offset into index buffer When the vertex array binding is changed, the value of ContextVk::mLastIndexBufferOffset must be reset so that an old/cached offset (from a previous draw call) is not used for a new draw call. This addresses rendering artifacts and Vulkan validation errors seen with running NBA 2K20 on Android (or the ANGLE trace on Windows). Bug: b/153682968 Bug: angleproject:4575 Bug: angleproject:4576 Change-Id: I69089964b8d278c7fc8610ab003548864a215dab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2152850 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 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 5993d899 2019-06-03T13:05:38 Vulkan: Use storage buffers for index conversion shader. This allows us to use the shader regardless of driver support for texel buffer views. It also allows us to convert indices on the GPU unconditionally. We add a new internal compute shader that converts pairs of indices into a packed single uint value that stores two 16-bit values. In the future we could add support for converting primitive restart indices. Should speed up benchmarks on systems which didn't have R8_UINT support for compute shader buffers. Bug: angleproject:3490 Change-Id: I56ca0cabb094e97f36ab4edc779e6c8ad2d2601e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1639058 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
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 2c0d6a94 2018-11-28T14:03:58 WebGL: Fix DrawElements test and remove size check. Also optimizes the DrawElements validation to remove redundant tests. Also make some more validation WebGL-specific. Bug: angleproject:2979 Change-Id: I2d5c3094ed86ebadbc572e46b8ae105431f7ae68 Reviewed-on: https://chromium-review.googlesource.com/c/1343139 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Olli Etuaho 5804dc8e 2018-04-13T14:11:46 Refactor GL tests to use a shader library Instead of having the same simple shaders repeated over and over in the test code, reuse a single shader library. BUG=angleproject:2474 TEST=angle_end2end_tests Change-Id: I13f8ca8c0125e6d30f1761639bf8c3f69e0e77d2 Reviewed-on: https://chromium-review.googlesource.com/1012078 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 9fdaa497 2018-02-16T10:52:11 Don't no-op draw calls for zero count in validation. Make the no-op happen in the Context, so we can properly generator more errors for negative WebGL tests. Some validation tests still need to check for no-ops, such as range checks. BUG=angleproject:2050 Change-Id: I48d0b3cf640f7f128679600e5df108146cfd6348 Reviewed-on: https://chromium-review.googlesource.com/522869 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Brandon Jones ed5b46f1 2017-07-21T08:39:17 Add additional ES2 and WebGL 1.0 Validation Adds validation for various cases. Adds corresponding unit tests. Change-Id: I9451d286bcf2d6fa32de495e5d0bdec1eb5c955d Reviewed-on: https://chromium-review.googlesource.com/633157 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 3f6d4dff 2017-01-30T18:04:36 WebGLCompatibility implement and add tests for section 6.4 The checks for VertexAttribPointer were already implemented in a previous patch, so we only add the checks for DrawElements. BUG=angleproject:1523 BUG=chromium:668223 Change-Id: I5da55f9a7e7479627099c7f77618353a63b75a8e Reviewed-on: https://chromium-review.googlesource.com/434958 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e0cc2a4a 2016-01-20T10:58:17 Enable all angle_end2end_tests targeting OpenGL and OpenGL ES backends. Added failure supressions and filed bugs for failing tests. BUG=angleproject:1145 BUG=angleproject:1289 BUG=angleproject:1291 BUG=angleproject:1292 BUG=angleproject:1293 BUG=angleproject:1296 Change-Id: Ida78ba855500fe8a6ce6154d43ee01520330e3b1 Reviewed-on: https://chromium-review.googlesource.com/322695 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 77a90c26 2015-08-11T16:33:17 Reland of "Store the applied element array buffer as a binding pointer." To be consistent with how we start vertex attributes. A null pointer indicates we're using the streaming buffer. Will also aid the dirty state bits refactor. The re-land fixes a crash with WebGL related to element array buffers. BUG=angleproject:1040 TEST=WebGL CTS, end2end_tests, unittests Change-Id: I9b82e06825bf95f0fc2b7c7427e1eb6dd257c1ee Reviewed-on: https://chromium-review.googlesource.com/290044 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>