radv/rmv: Fix import memory

For some import memory, it is valid to specify zero size.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22532>
This commit is contained in:
Friedrich Vock
2023-04-17 16:18:37 +02:00
committed by Marge Bot
parent fd389ade5c
commit 7cad28571b
+4
View File
@@ -492,6 +492,10 @@ radv_rmv_log_heap_create(struct radv_device *device, VkDeviceMemory heap, bool i
RADV_FROM_HANDLE(radv_device_memory, memory, heap);
/* Do not log zero-sized device memory objects. */
if (!memory->alloc_size)
return;
radv_rmv_log_bo_allocate(device, memory->bo, memory->alloc_size, false);
simple_mtx_lock(&device->vk.memory_trace_data.token_mtx);