mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-23 01:40:31 -05:00
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:
parent
09603cdb0b
commit
47c578945c
3 changed files with 14 additions and 12 deletions
|
|
@ -187,6 +187,10 @@ static void shared_buffer_destroy(struct wlr_vk_renderer *r,
|
|||
if (buffer->memory) {
|
||||
vkFreeMemory(r->dev->dev, buffer->memory, NULL);
|
||||
}
|
||||
if (buffer->cpu_mapping) {
|
||||
vkUnmapMemory(r->dev->dev, buffer->memory);
|
||||
buffer->cpu_mapping = NULL;
|
||||
}
|
||||
|
||||
wl_list_remove(&buffer->link);
|
||||
free(buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue