anv: call base finish only if pass given in DestroyRenderPass

Fixes: 682c81bdfb ("vulkan,anv: Add a base object struct type")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4936>
This commit is contained in:
Tapani Pälli 2020-05-07 09:24:44 +03:00
parent a885ee5258
commit ee2aef3ea5

View file

@ -593,6 +593,9 @@ void anv_DestroyRenderPass(
ANV_FROM_HANDLE(anv_device, device, _device);
ANV_FROM_HANDLE(anv_render_pass, pass, _pass);
if (!pass)
return;
vk_object_base_finish(&pass->base);
vk_free2(&device->vk.alloc, pAllocator, pass);
}