radv: Remove redundant memset in radv_descriptor_set_create.
authorGeorg Lehmann <dadschoorse@gmail.com>
Sun, 19 Jun 2022 20:12:54 +0000 (22:12 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 20 Jun 2022 10:50:01 +0000 (10:50 +0000)
The memset below also clears this memory, plus the descriptor set header.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17127>

src/amd/vulkan/radv_descriptor_set.c

index 92b8dba..ba3dc3d 100644 (file)
@@ -648,7 +648,6 @@ radv_descriptor_set_create(struct radv_device *device, struct radv_descriptor_po
 
       set = (struct radv_descriptor_set *)pool->host_memory_ptr;
       pool->host_memory_ptr += mem_size;
-      memset(set->descriptors, 0, sizeof(struct radeon_winsys_bo *) * buffer_count);
    } else {
       set = vk_alloc2(&device->vk.alloc, NULL, mem_size, 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);