Revert "radv: remove unnecessary memset() in radv_AllocateCommandBuffers()"
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 22 Nov 2017 15:13:28 +0000 (16:13 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 24 Nov 2017 11:26:35 +0000 (12:26 +0100)
This fixes two CTS regressions:
- dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_primary
- dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_secondary

These two tests are part the mustpass lists, so presumably they
are correct and my change was wrong.

This reverts commit 0f68208f1d1d3b7b2963dab40e84c60212518692.

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

index 7d86eee97915b34d41d0d512d25269867d4127cb..bd72ba2a878fcf948aa1778471e44c25b1db6264 100644 (file)
@@ -2139,6 +2139,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++) {
 
                if (!list_empty(&pool->free_cmd_buffers)) {