Vulkan: finishToSerial only if the buffer is in use
Vulkan: finishToSerial only if the buffer is in use

The call to flushImpl() was conditioned on the buffer
being used but the call to finishToSerial() was outside.
This caused an unconditional wait and unnecessary pipeline
stall. The fix is to make sure to perform a flush and
wait only when the buffer is in use.

Bug: angleproject:3994
Change-Id: I1b297cf11a67f7611d37808cb111d6b52ac16f90
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1854881
Commit-Queue: Mohan Maiya <fbcab303f71178634c736986d06722fc897795f2@samsung.com>
Reviewed-by: Jamie Madill <7e492b4f1c8458024932de3ba475cbf015424c30@chromium.org>

ppy/angle,ppy/angle,ppy/angle,ppy/angle