Commit f996d4d879434de5056e3210c8d41d28d0f15ae2

Charlie Lao 2022-02-16T09:27:04

Vulkan: Fix DynamicBuffer cache reuse. There is a regression bug that the DynamicBuffer's BufferHelper's size is no longer the size of entire buffer block's size, but the size of suballocation. This caused buffer reuse logic to screw up since it relies on the size to make the decision to keep or free the mFreeBufferList. This CL fixes this bug by using the buffer block's size. This CL also removes DynamicBufferPolicy since it is not used any more since most of DynamicBuffer usages that triggered that DynamicBufferPolicy implementation have been switched to BufferPool. The remaining DynamicBuffer usage is only for attributes and uniforms which are generally small and per context. Bug: angleproject:6980 Change-Id: I9e013cbd67dd74f5e7fc5bb7d9c9696bd1f69965 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3469714 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>