vk: Fix vkCreate/DestroyRenderPass
authorChad Versace <chad.versace@intel.com>
Wed, 15 Jul 2015 22:02:47 +0000 (15:02 -0700)
committerChad Versace <chad.versace@intel.com>
Wed, 15 Jul 2015 22:07:41 +0000 (15:07 -0700)
commit188f2328de8d28cf67428e6707af74c07f783166
treec2bf471c6cf9761197d5db25f5a2fb4eae507941
parentc6270e8044782080a0c38b5290eac96caa608168
vk: Fix vkCreate/DestroyRenderPass

While updating vkDestroyObject, I discovered that vkDestroyPass reliably
crashes. That hasn't been an issue yet, though, because it is never
called.

In vkCreateRenderPass:
    - Don't allocate empty attachment arrays.
    - Ensure that pointers to empty attachment arrays are NULL.
    - Store VkRenderPassCreateInfo::subpassCount as
      anv_render_pass::subpass_count.

In vkDestroyRenderPass:
    - Fix loop bounds: s/attachment_count/subpass_count/
    - Don't call anv_device_free on null pointers.
src/vulkan/device.c
src/vulkan/private.h