mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
pvr: Check if the buffer/image was bound before unbinding.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15641>
This commit is contained in:
parent
d876abeaa8
commit
860e3f6ff9
2 changed files with 6 additions and 2 deletions
|
|
@ -1579,7 +1579,9 @@ void pvr_DestroyBuffer(VkDevice _device,
|
|||
if (!buffer)
|
||||
return;
|
||||
|
||||
pvr_unbind_memory(device, buffer->vma);
|
||||
if (buffer->vma)
|
||||
pvr_unbind_memory(device, buffer->vma);
|
||||
|
||||
vk_object_free(&device->vk, pAllocator, buffer);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,9 @@ void pvr_DestroyImage(VkDevice _device,
|
|||
if (!image)
|
||||
return;
|
||||
|
||||
pvr_unbind_memory(device, image->vma);
|
||||
if (image->vma)
|
||||
pvr_unbind_memory(device, image->vma);
|
||||
|
||||
vk_image_destroy(&device->vk, pAllocator, &image->vk);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue