Module: Mesa
Branch: main
Commit: 7cad28571bfe10ce3f7d5db08926c1577524fb86
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7cad28571bfe10ce3f7d5db08926c1577524fb86

Author: Friedrich Vock <[email protected]>
Date:   Mon Apr 17 16:18:37 2023 +0200

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>

---

 src/amd/vulkan/radv_rmv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/amd/vulkan/radv_rmv.c b/src/amd/vulkan/radv_rmv.c
index a2689d08d21..27f57da647d 100644
--- a/src/amd/vulkan/radv_rmv.c
+++ b/src/amd/vulkan/radv_rmv.c
@@ -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);
 

Reply via email to