radv: remove unnecessary memset() in radv_AllocateCommandBuffers()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 10 Nov 2017 08:18:01 +0000 (09:18 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 13 Nov 2017 10:05:32 +0000 (11:05 +0100)
This should not be needed, if the allocation fails an error is
returned and the host should handle it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index 5f518f04aca994fcc9bc80115b163f72466aac73..8d69d2935a0cf9e9a473d01f9f1779560513d77e 100644 (file)
@@ -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)) {