radv: only reset command buffers when the allocation fails
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 30 Nov 2017 21:23:37 +0000 (22:23 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 1 Dec 2017 10:38:34 +0000 (11:38 +0100)
commit80e6e71b823bf24050692a6a147fae7e0ec7231b
tree68b7c970a34f93c4a9d2d070ec34b9ca4500c2f7
parent921986b580d32ac0195d4ba348c408d952e7e20c
radv: only reset command buffers when the allocation fails

   "vkAllocateCommandBuffers can be used to create multiple command
    buffers. If the creation of any of those command buffers fails, the
    implementation must destroy all successfully created command buffer
    objects from this command, set all entries of the pCommandBuffers
    array to NULL and return the error."

This has been suggested by gabriel@system.is.

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