Skip to content
Snippets Groups Projects
Commit a1cad821 authored by Faith Ekstrand's avatar Faith Ekstrand :speech_balloon:
Browse files

anv/image: Use vk_zalloc instead of an explicit memset


Reviewed-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
parent 1e32c830
No related branches found
No related tags found
No related merge requests found
......@@ -358,12 +358,11 @@ anv_image_create(VkDevice _device,
anv_assert(pCreateInfo->extent.height > 0);
anv_assert(pCreateInfo->extent.depth > 0);
image = vk_alloc2(&device->alloc, alloc, sizeof(*image), 8,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
image = vk_zalloc2(&device->alloc, alloc, sizeof(*image), 8,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
if (!image)
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
memset(image, 0, sizeof(*image));
image->type = pCreateInfo->imageType;
image->extent = pCreateInfo->extent;
image->vk_format = pCreateInfo->format;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment