Vulkan: Improve VertexArrayVk::syncState VertexArrayVk::syncState often time shows up the biggest single API in simpleperf. For example, in tower_of_fantasy it is 7.9% of all CPU time in libANGLE. This function also uses macros which made it hard to debug. This CL removes the usage of macros which makes code much easier to handle. The other real problem is that we are repeatedly calling syncDirtyAttrib() function for disabled attributes. This CL breaks the dirty bits into bindingDirtyBits and bufferDataDiryBits and attribDirtyBits. Only attribDirtyBits will end up doing the actual state sync. All other dirty bits will just turn them into attribDirtyBits. Also disabled attributes will be looped separately. This simplification makes it impossible to have duplicate state syncs since we only call sync*Attrib at the end of function. By splitting syncDirtyAttrib into syncDirtyEnabledAttrib/syncDirtyDIsabledAttrib/syncNeedsConversionAttrib, we also moved the if check from syncDirtyAttrib (which is called within for loop) to syncState. With this CL, simpleperf shows this function has reduced from 7.9% to 5.9%. Bug: b/439073246 Change-Id: I99b5ff0b34a5992e31541d2e9cd81ff5c9dda716 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6876527 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Charlie Lao <cclao@google.com>