anv: set command buffer to NULL when allocations fail
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 25 Jan 2017 16:22:40 +0000 (16:22 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 25 Jan 2017 17:15:30 +0000 (17:15 +0000)
commit25e21cb8d065799888e0c5db80b0e616ffddc560
tree8f544c1a8a8d727e8335a6133b2cb25788297ba1
parentd6397dd62542215e655c0cab557729474c2ae973
anv: set command buffer to NULL when allocations fail

The spec section 5.2 says:

   "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 VK_NULL_HANDLE and return the error."

Fixes:
   dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_primary
   dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_secondary

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_cmd_buffer.c