mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-22 07:02:28 +00:00
render/vulkan: Unmap span before freeing memory
This commit is contained in:
parent
6d197eef94
commit
53464074e9
@ -181,16 +181,16 @@ static void shared_buffer_destroy(struct wlr_vk_renderer *r,
|
|||||||
}
|
}
|
||||||
|
|
||||||
wl_array_release(&buffer->allocs);
|
wl_array_release(&buffer->allocs);
|
||||||
|
if (buffer->cpu_mapping) {
|
||||||
|
vkUnmapMemory(r->dev->dev, buffer->memory);
|
||||||
|
buffer->cpu_mapping = NULL;
|
||||||
|
}
|
||||||
if (buffer->buffer) {
|
if (buffer->buffer) {
|
||||||
vkDestroyBuffer(r->dev->dev, buffer->buffer, NULL);
|
vkDestroyBuffer(r->dev->dev, buffer->buffer, NULL);
|
||||||
}
|
}
|
||||||
if (buffer->memory) {
|
if (buffer->memory) {
|
||||||
vkFreeMemory(r->dev->dev, buffer->memory, NULL);
|
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);
|
wl_list_remove(&buffer->link);
|
||||||
free(buffer);
|
free(buffer);
|
||||||
|
Loading…
Reference in New Issue
Block a user