diff options
author | Samuel Pitoiset <[email protected]> | 2017-11-10 09:18:02 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-11-13 11:05:35 +0100 |
commit | ebab5c8ff47e089bca3626adce7a8cc4801b4c16 (patch) | |
tree | 7f4ac87bf216890e34a6a9d26b2789c11584e314 /src/amd/vulkan/radv_image.c | |
parent | 0f68208f1d1d3b7b2963dab40e84c60212518692 (diff) |
radv: use vk_zalloc instead of vk_alloc+memset
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_image.c')
-rw-r--r-- | src/amd/vulkan/radv_image.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 0564454c776..163d35d76bd 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -863,12 +863,11 @@ radv_image_create(VkDevice _device, radv_assert(pCreateInfo->extent.height > 0); radv_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->info.width = pCreateInfo->extent.width; image->info.height = pCreateInfo->extent.height; |