Module: Mesa Branch: master Commit: 72b8e643b0232dfcdcbc9f071c410653bc10d079 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=72b8e643b0232dfcdcbc9f071c410653bc10d079
Author: Giovanni Mascellani <[email protected]> Date: Fri Feb 12 08:36:58 2021 +0100 anv: Allow null handle in DestroyDescriptorUpdateTemplate. By the Vulkan specification, and similarly to many other Vulkan calls, it is allowed to destroy a null descriptor update template. Signed-off-by: Giovanni Mascellani <[email protected]> Fixes: af5f13e58c9dfe ("anv: add VK_KHR_descriptor_update_template support") Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9005> --- src/intel/vulkan/anv_descriptor_set.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index e3895a77234..a8d91b36ed0 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -1805,6 +1805,9 @@ void anv_DestroyDescriptorUpdateTemplate( ANV_FROM_HANDLE(anv_descriptor_update_template, template, descriptorUpdateTemplate); + if (!template) + return; + vk_object_base_finish(&template->base); vk_free2(&device->vk.alloc, pAllocator, template); } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
