Commit 9a64f307bfe192d2d6b1b585c08303f86490e29c

Mohan Maiya 2020-08-25T14:06:40

Vulkan: Reserve memory for ResourceUseList::mResourceUses ResourceUseList::add is called repeatedly when we need to track a resource's usage in a context. Instead of a potential memory operation on each add we reserve memory upfront for about 4k SharedResourceUse objects. If the vector grows larger, it will be automatically handled by std::vector's allocator. Bug: angleproject:4950 Change-Id: Ic85ed44a6662819621ee9a47f43dd2542b73114d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2375801 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>