From d5e5a1a734d4902ccc8756bb06ae72903e403b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Mon, 8 Aug 2022 12:17:25 -0700 Subject: [PATCH] anv: Remove duplicated memset() in physical device creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit device is allocated with vk_zalloc() that zeroes the allocated memory. Reviewed-by: Lionel Landwerlin Signed-off-by: José Roberto de Souza Part-of: --- src/intel/vulkan/anv_device.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index a1ada41ecc4..850ec612ce0 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -871,11 +871,6 @@ anv_physical_device_try_create(struct anv_instance *instance, device->supports_48bit_addresses = (device->info.ver >= 8) && device->gtt_size > (4ULL << 30 /* GiB */); - /* Initialize memory regions struct to 0. */ - memset(&device->vram_non_mappable, 0, sizeof(device->vram_non_mappable)); - memset(&device->vram_mappable, 0, sizeof(device->vram_mappable)); - memset(&device->sys, 0, sizeof(device->sys)); - result = anv_physical_device_init_heaps(device, fd); if (result != VK_SUCCESS) goto fail_base;