src/tests/gl_tests/ProvokingVertexTest.cpp


Log

Author Commit Date CI Message
Tom Sepez 25390156 2025-08-21T00:13:19 Suppress unsafe buffers on a file-by-file basis in src/ [1 of N] In this CL, we suppress many files but stop short of actually enabling the warning by not removing the line from the unsafe_buffers_paths.txt file. That will happen in a follow-on CL, along with resolving any stragglers missed here. This is mostly a manual change so as to familiarize myself with the kinds of issues faced by the Angle codebase when applying buffer safety warnings. -- Re-generate affected hashes. -- Clang-format applied to all changed files. -- Add a few missing .reserve() calls to vectors as noticed. -- Fix some mismatches between file names and header comments. -- Be more consistent with header comment format (blank lines and trailing //-only lines when a filename comment adjoins license boilerplate). Bug: b/436880895 Change-Id: I3bde5cc2059acbe8345057289214f1a26f1c34aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6869022 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 44d8fef8 2022-11-01T00:00:00 Add ANGLE_provoking_vertex spec Renamed provoking vertex enums to use _ANGLE suffix. The newly defined enums alias those from the desktop OpenGL extensions. Updated tests to use the new enum names. Bug: angleproject:2829 Change-Id: I72b686773536d3d54a653114cee5292007510a55 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4013700 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Gregg Tavares 7d712c47 2022-09-08T09:42:10 Metal: ProvokingVertexHelper stop using a separate cmdbuffer This simplifies the code. Without this you always need to be aware that the provoking vertex helper's command buffer might have commands in it that need to be committed before starting other operations. Bug: angleproject:7643 Change-Id: I1c73d451c12c268ecbdb6a1cd63a77c291949ef9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3884275 Commit-Queue: Gregg Tavares <gman@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kyle Piddington <kpiddington@apple.com>
Alexey Knyazev 00411e2c 2022-08-25T00:00:00 Support provoking vertex state query When ANGLE_provoking_vertex is enabled, glGetIntegerv should accept GL_PROVOKING_VERTEX parameter name. Bug: angleproject:2829 Change-Id: I6316de2c6b4cdbf4365df3ffb88f75c4b095f99c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3858264 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.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>
Jamie Madill 6b94a71c 2022-04-01T10:12:07 Vulkan: Lift SwS suppressions. Bug: angleproject:4092 Change-Id: I0e72b95ba5ba2b60420d5b685349c405864c2e6e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3563513 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@google.com>
Kyle Piddington cfc4db34 2021-11-04T16:54:15 Metal: Provoking vertex support for Metal DrawArrays Add in provoking vertex rewrite support for drawArrays command, enabling 6 dEQP tests. GLES3/functional_rasterization_flatshading_line_loop GLES3/functional_rasterization_flatshading_line_strip GLES3/functional_rasterization_flatshading_lines GLES3/functional_rasterization_flatshading_triangle_fan GLES3/functional_rasterization_flatshading_triangle_strip GLES3/functional_rasterization_flatshading_triangles This patch adds a new shader to the Provoking Vertex helper that generates draw commands for all simple data types. Fix bug in provoking vertex helper that caused reused index buffers to suffer from allocation issues. Also fix Provoking vertex for triangle fan generation Bug: angleproject:5325 Change-Id: I7a1211dfcd99329868269ea0666eef1915d487b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3261635 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kyle Piddington <kpiddington@apple.com>
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>
James Darpinian ebf00703 2020-12-29T16:25:54 angle_end2end_tests passes on iOS! Miscellaneous test skips and fixes for iOS. Bug: angleproject:5417 Bug: angleproject:5491 Change-Id: Id0785e6243949fc756e4d7923dbbe77a411052f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2606656 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: James Darpinian <jdarpinian@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 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>
Jeff Gilbert 465d6090 2019-01-02T16:21:18 Add GL_ANGLE_provoking_vertex on D3D11 and GL. This extension is a subset of GL_ARB_provoking_vertex without the QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION query. Bug: angleproject:2829 Change-Id: I907a4d16b7b13d3bbfb948842091eedd7b6a8b77 Reviewed-on: https://chromium-review.googlesource.com/c/1410289 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Yunchao He 9550c603 2018-02-13T14:47:05 Code refactoring for end2end tests. This change: 1) uses the new style ANGLE_SKIP_TEST_IF to skip tests. 2) replaces compile-time definition for OSX to skip tests by run-time function IsOSX() to skip tests, in order to align with ANGLE_SKIP_TEST_IF. 3) fixes a couple of typos. BUG=angleproject:2005 Change-Id: I5af77d82257536b9eb79e26afa502f5b91ff6d31 Reviewed-on: https://chromium-review.googlesource.com/915861 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 231c7f56 2017-04-26T13:45:37 Apply clang-format to many files. This cleans up the formatting in many places. BUG=None Change-Id: I6c6652ebc042f1f0ffecced53582d09d66b4f384 Reviewed-on: https://chromium-review.googlesource.com/487884 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 876429b7 2017-04-20T15:46:24 Update gl2.h and update entry points. Some method signatures were updated. Types like GLclampf and GLvoid were replaced with other equivalents. BUG=angleproject:1309 Change-Id: I05e8e2072c5a063d87ad96a855b907424661e680 Reviewed-on: https://chromium-review.googlesource.com/475011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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 518b9fab 2016-03-02T11:26:02 Suppress some failing end2end_tests on Intel. BUG=589851 Change-Id: Ia580cee30e6842aaddb4683025f425166f0f6120 Reviewed-on: https://chromium-review.googlesource.com/329735 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f09bf669 2016-03-02T11:26:01 Revert "Suppress some failing end2end_tests on Intel." This reverts commit 7208f6994cf7d810c2226965362aad43d2a66f53. Still some failures on Intel, requires a slightly different solution. BUG=589851 Change-Id: I6ac6599249e9e0f6319c917e04734cd48ca9274d Reviewed-on: https://chromium-review.googlesource.com/329734 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7208f699 2016-02-29T10:47:35 Suppress some failing end2end_tests on Intel. BUG=589851 Change-Id: I91588014784a8a9b75389aeb596923458c30d80a Reviewed-on: https://chromium-review.googlesource.com/329427 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
Corentin Wallez dd46e643 2016-01-20T15:13:10 Suppress ProvokingVertexTest.FlatTriWithTransformFeedback on Mac AMD BUG= Change-Id: Ia6e7c67aaed40cca70be5522e0b9edff2610b63a Reviewed-on: https://chromium-review.googlesource.com/322212 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Jamie Madill c7a92fdb 2015-10-29T10:08:09 D3D11: Fix provoking vertex for flat triangle strips. Triangle strips alternate the provoking vertex based on the primitive, so use the primitive ID in the GS to determine this. This might interact poorly with primitive restart, so we might have to use a slow path for that. BUG=angleproject:754 Change-Id: I4f6f520887d4c4c52d2ad020e6db148607f68325 Reviewed-on: https://chromium-review.googlesource.com/309156 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3e14e2b1 2015-10-29T14:38:53 D3D11: Fix basic provoking vertex flat shading cases. The enables geometry shaders that correct for the flat shading on provoking vertexes. It does not fix it for triangle strips, or in conjunction with primitive restart (which is not yet implemented in D3D11). Also ensure we do not regress with flat shading enabled and transform feedback. In cases where we use flat shading, do a double draw call, first with an untransformed vertex stream, and no geometry shader, then with the geometry shader enabled. This also fixes the dEQP fragment output tests with ints. BUG=angleproject:754 Change-Id: Ib37e8ec32d19db17ea5d4dc88158cdae0c956bfc Reviewed-on: https://chromium-review.googlesource.com/309155 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d55d283c 2015-10-27T13:59:19 Add a test for flat shader 'provoking vertex'. The provoking vertex, or leading vertex, is the vertex in a triangle which produces the value that gets used for a flat-shaded triangle. Flat shading means the same value gets used for the entire triangle. It seems as though D3D and OpenGL have different definitions of which vertex is the leading/provoking one; GL says it is the *last* vertex of a primitive, while while D3D says it is the first. Additional complexity comes about from triangle strips, which switch winding order, and primitive restart, which defines new primitives in the middle of prior primitives. BUG=angleproject:754 Change-Id: If1217cba33dabf3b1e4ad13fd639d049cb16fe44 Reviewed-on: https://chromium-review.googlesource.com/309152 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>