render/vulkan: Garbage collect unused buffers

Perform a primitive garbage collection of buffers that have not been
used in the past 10 seconds, an arbitrarily selected number.

As garbage collection also makes span buffer allocation happen much more
often, logging on allocation activity leads to a lot of log noise so get
rid of that while at it.
This commit is contained in:
Kenny Levinsen 2024-11-04 22:56:16 +01:00 committed by Simon Ser
parent 0d728f96b7
commit 1f13bc72fe
2 changed files with 16 additions and 4 deletions

View file

@ -500,6 +500,7 @@ struct wlr_vk_shared_buffer {
VkDeviceSize buf_size;
void *cpu_mapping;
struct wl_array allocs; // struct wlr_vk_allocation
int64_t last_used_ms;
};
// Suballocated range on a buffer.