From: Samuel Pitoiset Date: Fri, 10 Nov 2017 08:18:01 +0000 (+0100) Subject: radv: remove unnecessary memset() in radv_AllocateCommandBuffers() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f68208f1d1d3b7b2963dab40e84c60212518692;p=mesa.git radv: remove unnecessary memset() in radv_AllocateCommandBuffers() This should not be needed, if the allocation fails an error is returned and the host should handle it. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 5f518f04aca..8d69d2935a0 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2142,9 +2142,6 @@ VkResult radv_AllocateCommandBuffers( VkResult result = VK_SUCCESS; uint32_t i; - memset(pCommandBuffers, 0, - sizeof(*pCommandBuffers)*pAllocateInfo->commandBufferCount); - for (i = 0; i < pAllocateInfo->commandBufferCount; i++) { if (!list_empty(&pool->free_cmd_buffers)) {