Vulkan: Add assert to ensure never setQueueSerial backwards This CL add an assertion in ResourceUse::SetQueueSerial to ensure that we never set a serial smaller than what it already has. If that happens, we could potentially destroy it while GPU still accessing it. With this assertion, it exposed a bug that when a buffer is read accessed by a renderpassCommands and then read accessed by outsideRenderPassCommands, we were incorrectly setting the queueSerial with outsideRP's serial, overwriting the queueSerial already set by renderPassCommands. To fix this, this CL detects this case and keeps the queueSerial set by renderPassCommands. Bug: b/262047600 Change-Id: I51b17ab4a93bccd0d0b079784af96cef9d79f16f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4099804 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>