From e1a8fd80d411a5ff8fa19ffcf09516ac5099a25c Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Wed, 27 Nov 2024 09:17:49 +0100 Subject: [PATCH] panvk: Use vk_zalloc for queue array allocation No need to call memset that way. Signed-off-by: Mary Guillemard Reviewed-by: Erik Faye-Lund Part-of: --- src/panfrost/vulkan/panvk_vX_device.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/panfrost/vulkan/panvk_vX_device.c b/src/panfrost/vulkan/panvk_vX_device.c index a2d8a597512..b6c14000e3e 100644 --- a/src/panfrost/vulkan/panvk_vX_device.c +++ b/src/panfrost/vulkan/panvk_vX_device.c @@ -337,7 +337,7 @@ panvk_per_arch(create_device)(struct panvk_physical_device *physical_device, uint32_t qfi = queue_create->queueFamilyIndex; device->queues[qfi] = - vk_alloc(&device->vk.alloc, + vk_zalloc(&device->vk.alloc, queue_create->queueCount * sizeof(struct panvk_queue), 8, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE); if (!device->queues[qfi]) { @@ -345,9 +345,6 @@ panvk_per_arch(create_device)(struct panvk_physical_device *physical_device, goto err_finish_queues; } - memset(device->queues[qfi], 0, - queue_create->queueCount * sizeof(struct panvk_queue)); - for (unsigned q = 0; q < queue_create->queueCount; q++) { result = panvk_per_arch(queue_init)(device, &device->queues[qfi][q], q, queue_create);