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>
(cherry picked from commit 7cad28571b)
This commit is contained in:
Friedrich Vock 2023-04-17 16:18:37 +02:00 committed by Eric Engestrom
parent ec55e467f5
commit ef41157341
2 changed files with 5 additions and 1 deletions

View file

@ -679,7 +679,7 @@
"description": "radv/rmv: Fix import memory",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

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);