Vulkan: Make queueSubmit without holding CommandQueue::mMutex VkQueueSubmit and VkQueuePresent could potentially take long. Right now it is called while holding CommandQueue::mMutex lock. In previous CL we moved mInFlightCommands to FixedQueue, which allows push/pop occur concurrently. This CL moves queueSubmit and queuePresent to not take mMutex but uses mSubmissionMutex. This allows other thread to checkCompletedCommands etc while we doing submit/present. The tricky part is that mPrimaryCommands is shared between all contexts. It can contain commands from different contexts, thus the vkQueueSubmit ordering must strictly follow the order of RendererVk::submitCommands() call. The mMutex and mQueueSubmitMutex are managed in a way that does the lock relay so that we always have a lock covering the submitCommands call all the way to vkQueueSubmit. Bug: b/267682377 Change-Id: Ic556cd4c64d334ad1cfc68942b803e401c6b0cc1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4218198 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>