Commit 878e1c92af0b6ce4cc1885e6260fe529acadc864

Amirali Abdolrashidi 2024-10-07T16:34:54

Vulkan: Fix line-loop draw arrays after elements Currently, when drawing line-loop arrays in Vulkan, an index buffer is created to assist in drawing (since Vulkan does not natively include a line-loop draw mode). However, when LL array draw calls are mixed with non-LL element draw calls, it can lead to some rendering issues due to the fact that the proper index buffer is not obtained. * In VertexArrayVk::handleLineLoop(), if the cached indices are the same as the last draw, the same index buffer is obtained from the LineLoopHelper object. * (Using the newly added getCurrentIndexBuffer()) * Added unit test in which a triangle element draw is places between two LL array draws. Before the fix, the second LL draw would result in an incorrect line draw. Bug: chromium:40911000 Change-Id: Ibba9a0cb2b77a2b6ae2c1e9230afe3d16b70cb63 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5908694 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>