Vulkan: Fix undefined behavior accessing empty vertex buffer This fixes undefined behavior detected by VVL: [ SYNC-HAZARD-READ-AFTER-WRITE ] vkCmdDraw(): READ_AFTER_WRITE hazard detected. vkCmdDraw reads vertex VkBuffer 0xe000000000e, which was previously written by vkCmdBeginRenderingKHR. No sufficient synchronization is present to ensure that a read (VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT) at VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT does not conflict with a prior write (VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT) at VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT. This is regression from the old CL: https://crrev.com/c/angle/angle/+/3297026 Vulkan: Don't attempt to convert vertices in empty buffers Above change made `if (bufferVk->getSize() == 0)` branch a dead code. In the current code this branch is `if (numVertices == 0)` and is no longer a dead code. It sets zero stride to prevent reading beyond the empty buffer (which is only 16 bytes). This fix also sets `mCurrentArrayBufferStrides[attribIndex]` to zero when it is not a streaming attribute (in case of zero sized buffer). Bug: chromium:1271671 Change-Id: I3460201ae7366b8de1089efef6fbefe359d28460 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6440439 Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>