render/vulkan: Recycle memory maps for stage spans

Remapping buffers on every use causes a lot of unwanted pagefaults.
Reuse the mapping to significantly speed up the memcpy.
This commit is contained in:
Kenny Levinsen 2024-06-20 01:56:09 +02:00 committed by Alexander Orzechowski
parent 09603cdb0b
commit 47c578945c
3 changed files with 14 additions and 12 deletions

View file

@ -483,6 +483,7 @@ struct wlr_vk_shared_buffer {
VkBuffer buffer;
VkDeviceMemory memory;
VkDeviceSize buf_size;
void *cpu_mapping;
struct wl_array allocs; // struct wlr_vk_allocation
};