Vulkan: Fine-tune submission for multiple RPs This CL aims to fine-tune submission based on a certain command buffer size. This allows us to perform one submission for multiple smaller render passes. * Added mCommandsPendingSubmissionCount to ContextVk. * In ContextVk::syncState(), preferSubmitAtFBOBoundary is only used if the render pass pending command count exceeds the threshold: kMinCommandCountToSubmit * Currently set to 32. * For now, we still submit if the command is a clear (for example glClearBufferfv()). * For now, we also still submit if the command is an invalidate (for example, glInvalidateFramebuffer()). * In ContextVk::flushImpl(), if the pending command count exceeds the threshold (kMinCommandCountToSubmit) and the device is found to be idle, the work is submitted to keep the device busy. * Modified the following unit test from VulkanPerformanceCounterTest: VerifySubmitCounterForSwitchUserFBOToDirtyUserFBO * Since there is now a minimum command count for submission, the number of draw calls has been changed so that the submission is still issued at the new FBO boundary. * After this CL, life_is_strange shows the following improvements: (From the latest measurements) * +19% wall_time * +38% cpu_time Bug: angleproject:42265052 Change-Id: I18452cc1d39ca7e0ac376f6012974b498153cce8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6182927 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>