mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
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:
parent
0d728f96b7
commit
1f13bc72fe
2 changed files with 16 additions and 4 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue