Commit 2fae9482c87e1782bccd9e1712ee6dda796b66c0

Charlie Lao 2022-05-02T11:05:36

Vulkan: Use heuristic to decide how many empty buffers to keep Instead of rely on static information (16 max empty buffers and not been used for a given period of time), this CL keeps track of how many new buffers are needed (either reused from empty buffer list or allocated new) since last prune. We use this heuristic information to decide how many empty buffers to keep around and trim the excessive empty buffers. Combined with the next few CLs, on pixel6 I am seeing 11.7M reduction with vsync_angry_birds_2_1500. The memory_max minus memory_median reduced from 49M to 38M. Bug: b/230538246 Change-Id: I51da745afe4bfdbff0ba165418531803bdce681b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3622264 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>