src/tests/gl_tests/DrawBaseVertexBaseInstanceTest.cpp


Log

Author Commit Date CI Message
Tim Van Patten fdff1170 2025-06-06T10:46:03 tests: SystemEGL: Skip tests needing unsupported ANGLE EXTs The system EGL may not expose ANGLE extensions, even if it *is* ANGLE, due to platform EGL restrictions (e.g., Android platform EGL). Skip any tests requiring ANGLE-specific extensions during test setup, rather than failing them. This also requires refactoring ANGLETestBase to derive ::testing::Test so it has access to Test::IsSkipped(). Bug: b/279980674 Change-Id: I8e424509c41fa5a69dee9fc8e0c92da58e4758fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6622112 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Alexey Knyazev 7855312a 2025-05-15T00:00:00 Adjust multi draw validation * Fixed validation of negative drawcount for all MultiDraw*ANGLE entry points. * Added missing extension checks to MultiDraw*BaseInstanceANGLE entry points. Fixed: angleproject:420956723 Change-Id: I3a058471446cd96a883970d4e38ba5af2fa07a8c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6597176 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 6fddb18d 2024-07-26T12:44:23 GL: Disable heavily emulated extensions for non-WebGL. The multidraw and base vertex base instance extensions are heavily emulated in ANGLE's GL backend, manipulating vertex arrays multiple times per draw. This is often a performance improvement for deep pipelines such as WebGL but slower for shallow stacks like Chrome's rasterization. Mark these extensions as "emulated" and disable them in the frontend for non-WebGL contexts. Only EXT_base_instance can have true native support. Add a frontend feature to re-enable these extensions and use it in the existing end2end tests. Bug: angleproject:355645824 Change-Id: I897559fb270e2aa0f476d7784d25d97574e28f43 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5743837 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
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>
Alexey Knyazev ede15b85 2023-12-07T00:00:00 Metal: Run multi draw tests Added ANGLE_INSTANTIATE_TEST_COMBINE_3. Used the new macro for multi draw and BVBI tests. Bug: angleproject:6963 Change-Id: If05800f92f670bf21b7ff889a2fb8bb30f62a488 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5106508 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Faye Zhang 123bd542 2022-08-04T12:56:28 Add Variable Initialization in Base Instance Tests Bug: angleproject:7547 Change-Id: Ic01b933fb1e0291b42c48a6b5bf2ed3bd9267c0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3811873 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Faye Zhang <ffz@google.com>
Faye Zhang 714f680f 2022-06-08T16:19:20 Implement GL_EXT_base_instance * Added the validation functions for DrawElementsInstancedBaseVertexBaseInstance(), DrawElementsInstancedBaseInstance(), and DrawArraysInstancedBaseInstance() according to the specs. * Added generic implementation for glDrawElementsInstancedBaseInstance() that can be called by back-ends. * Added flags for back-ends so they can enable the extension. * Added tests for DrawElementsInstancedBaseVertexBaseInstance(), glDrawElementsInstancedBaseInstance(), and DrawArraysInstancedBaseInstance(). * Disabled ES3_D3D11__DynamicDraw tests due to angleproject:7441 bug. Bug: angleproject:6983 Bug: angleproject:7441 Change-Id: Ia664b01c87bc64c05e29adec23a8f80792eaa037 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3697206 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Faye Zhang <ffz@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev 7c616871 2022-02-01T15:12:53 Metal: Implement ANGLE_base_vertex_base_instance Includes command buffer and MSL translator updates. The DrawElementsInstancedBaseVertexBaseInstance tests from DrawBaseVertexVariantsTest suite fail for dynamic draw and stream draw buffer usages. Bug: angleproject:6963 Change-Id: I6caa144860356d5fc85948b72458bec282ea3a3b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3429819 Reviewed-by: Kyle Piddington <kpiddington@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Yuly Novikov f64f9546 2021-12-07T20:17:32 Reland "Decouple gl_BaseVertex/gl_BaseInstance uniforms" This reverts commit 10e5f34d1439f0bcd5b30bea5bfbf6bdaafd4935. Reason for revert: exonerated from flaky crash suspect Original change's description: > Revert "Decouple gl_BaseVertex/gl_BaseInstance uniforms" > > This reverts commit 36bf1ebe5e9500704dd235254bd22a1f2bbd7059. > > Reason for revert: suspect causing flaky crashes > > Bug: angleproject:6763 > > Original change's description: > > Decouple gl_BaseVertex/gl_BaseInstance uniforms > > > > These are builtin uniforms removed in > > https://github.com/KhronosGroup/WebGL/pull/3278 > > > > Decouple them from the original ANGLE_base_vertex_base_instance > > extension. > > > > Make a new ANGLE_base_vertex_base_instance_shader_builtin > > extension for these builtin uniforms. > > > > Bug: angleproject:3402 > > Change-Id: I77b93917976ce435db9c578c0ade37bff18a42b0 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3290304 > > Commit-Queue: Shrek Shao <shrekshao@google.com> > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > Reviewed-by: Kenneth Russell <kbr@chromium.org> > > Bug: angleproject:3402 > Change-Id: I75830baa14cf4e7c53750fd14ff76501145b4823 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3315610 > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Commit-Queue: Shrek Shao <shrekshao@google.com> Bug: angleproject:6763 Bug: angleproject:3402 Change-Id: Ie436dc5d55364e464897d407a53b793941cd5d0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3321703 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Shrek Shao 10e5f34d 2021-12-04T00:10:21 Revert "Decouple gl_BaseVertex/gl_BaseInstance uniforms" This reverts commit 36bf1ebe5e9500704dd235254bd22a1f2bbd7059. Reason for revert: suspect causing flaky crashes Bug: angleproject:6763 Original change's description: > Decouple gl_BaseVertex/gl_BaseInstance uniforms > > These are builtin uniforms removed in > https://github.com/KhronosGroup/WebGL/pull/3278 > > Decouple them from the original ANGLE_base_vertex_base_instance > extension. > > Make a new ANGLE_base_vertex_base_instance_shader_builtin > extension for these builtin uniforms. > > Bug: angleproject:3402 > Change-Id: I77b93917976ce435db9c578c0ade37bff18a42b0 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3290304 > Commit-Queue: Shrek Shao <shrekshao@google.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> Bug: angleproject:3402 Change-Id: I75830baa14cf4e7c53750fd14ff76501145b4823 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3315610 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Shrek Shao <shrekshao@google.com>
Shrek Shao 36bf1ebe 2021-11-17T13:31:17 Decouple gl_BaseVertex/gl_BaseInstance uniforms These are builtin uniforms removed in https://github.com/KhronosGroup/WebGL/pull/3278 Decouple them from the original ANGLE_base_vertex_base_instance extension. Make a new ANGLE_base_vertex_base_instance_shader_builtin extension for these builtin uniforms. Bug: angleproject:3402 Change-Id: I77b93917976ce435db9c578c0ade37bff18a42b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3290304 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@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>
shrekshao 9349e262 2020-06-25T14:28:17 Fix multiDraw* with DYNAMIC_DRAW buffer usage Specialized Context11 impl to prevent promote Dynamic during MultiDraw. Add different buffer usage to MultiDraw and BaseVertexBaseInstance tests. Bug: angleproject:3402, angleproject:4754 Change-Id: I50e1a6fd6c8b6fd48f130c43545b895335d2e55b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2268581 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ad782a84 2020-07-02T16:21:59 Tests: Use "__" to delineate test config names. This will allow the ANGLE test runner to identify test configs for tests that use parameterization to break up different test permutations with the same config. Note that GoogleTest doesn't allow for anything other than alphanumeric characters or "_" in test names. Bug: angleproject:3162 Change-Id: Iee215fbd8c397eef04dce0269da9b58ec568fce7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2280402 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
shrekshao e6124500 2020-06-02T12:02:55 Fix baseVertex and baseInstance with streaming attributes baseInstance: Fixed by adding the intial offset to each copy for streaming attributes baseVertex: make sure mShaderConstants.onFirstVertexChange takes in correct firstVertex value for dynamic attribs (where firstVertex passed to StateManager11::updateState already include baseVertex) Bug: chromium:1078330, angleproject:3402 Change-Id: I289c4e3733fdf6f78af8c3adee84112c05a5abce Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2227022 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shrek Shao <shrekshao@google.com>
David Benjamin f60da874 2019-11-19T18:45:45 Fix out-of-bounds access bug in ANGLE tests When not filled in, as in Android, activeGPUIndex is -1. This is fine for Android because it doesn't use vendorID, but the function computed vendorID unconditionally without checking for -1. Default activeGPUIndex to 0 instead of -1. Note code still needs to check for systemInfo.gpus.empty(). This caused crashes when _LIBCPP_DEBUG=0 was enabled. Bug: chromium:923166 Change-Id: If4d1dff9553a580fd92bc0497fc092789d07ed93 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1925031 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
shrekshao 35f74cd6 2019-10-31T16:47:10 Reorder BaseVertexBaseInstance draw calls parameters To match the parameter order of MultiDraw* calls. And potentially expose in chromium directly with ANGLE_ prefix. Bug: angleproject:3402, chromium:891861 Change-Id: I19548f4c3c7faa422e43905850b218039de43015 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1894241 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
shrekshao c847a75f 2019-09-20T14:08:32 Fix redundant draw in DrawBaseVertexBaseInstanceTest Discovered this redundant draw issue when writing javascript webgl conformance test. Together fix some broken formatting. TBR=geofflang@chromium.org Bug: 3402 Change-Id: I29dbcd04da7e47d9e0bc79074ff69202378c1214 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1816822 Reviewed-by: Shrek Shao <shrekshao@google.com> Commit-Queue: Shrek Shao <shrekshao@google.com>
shrekshao b5560486 2019-08-30T17:09:04 BaseInstance VertexAttribDivisor fix Add tests not using gl_InstanceID/gl_BaseInstance but set vertexAttribDivisor which implicitly reference base instance value. Add fixes and workarounds based on this change. Bug: chromium:891861, angleproject:3402 Change-Id: I2d93c181029f4ca1741f244363568096964d6b19 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1779350 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
shrekshao cd31f286 2019-06-25T14:22:41 Implement Draw base vertex and base instance functions This patch implements functionality of glDrawArraysInstancedBaseInstanceANGLE, glDrawElementsInstancedBaseVertexBaseInstanceANGLE, glMultiDrawArraysInstancedBaseInstanceANGLE, and glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE Workaround for OpenGL driver on Mac: gl_VertexID on Mac with AMD GPU doesn't include baseVertex value. So replace gl_VertexID with (gl_VertexID + angle_BaseVertex) if any. Workaround for Vulkan GLSL: gl_InstanceIndex on Vulkan includes baseInstance. So replace gl_InstanceIndex with (gl_InstanceIndex - angle_BaseInstance) when angle_BaseInstance is declared. Bug: chromium:891861, angleproject:3402 Change-Id: Ia1d94b5d4d7da7e635468c05c962c4f7eb1b1919 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1750126 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>