radv: vkAllocateCommandBuffers should NULL all output handles
authorAndres Rodriguez <andresx7@gmail.com>
Fri, 27 Jan 2017 05:03:03 +0000 (00:03 -0500)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 30 Jan 2017 07:38:13 +0000 (08:38 +0100)
This is part of the spec and fixes CTS tests:
dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_*

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index a83090f66584665bb98ce714567eaa152050bd2d..c4e8324a33863fe390d27043b867352a601ce7ed 100644 (file)
@@ -1351,6 +1351,9 @@ VkResult radv_AllocateCommandBuffers(
        VkResult result = VK_SUCCESS;
        uint32_t i;
 
+       memset(pCommandBuffers, 0,
+                       sizeof(*pCommandBuffers)*pAllocateInfo->commandBufferCount);
+
        for (i = 0; i < pAllocateInfo->commandBufferCount; i++) {
                result = radv_create_cmd_buffer(device, pool, pAllocateInfo->level,
                                                &pCommandBuffers[i]);