panvk: Fix null pointer dereference on cmd_buffer->ops

Fixes: 84cd81e104 (panvk: Use common code for command buffer lifecycle
management)

Signed-off-by: Hui Ni <shuizhuyuanluo@126.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20406>
This commit is contained in:
nihui 2022-12-21 15:41:28 +00:00 committed by Marge Bot
parent 2024115b79
commit e584447aed

View file

@ -1125,7 +1125,8 @@ panvk_create_cmdbuf(struct vk_command_pool *vk_pool,
if (!cmdbuf)
return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
VkResult result = vk_command_buffer_init(&pool->vk, &cmdbuf->vk, NULL, 0);
VkResult result = vk_command_buffer_init(&pool->vk, &cmdbuf->vk,
&panvk_per_arch(cmd_buffer_ops), 0);
if (result != VK_SUCCESS) {
vk_free(&device->vk.alloc, cmdbuf);
return result;