panvk: Use vk_zalloc for queue array allocation

No need to call memset that way.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32368>
This commit is contained in:
Mary Guillemard
2024-11-27 09:17:49 +01:00
parent e5877cefc4
commit e1a8fd80d4
+1 -4
View File
@@ -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);