From b5ac476b98f8ebc8b0a66f380f4aacd75d8bcc84 Mon Sep 17 00:00:00 2001 From: Matt Coster Date: Tue, 16 May 2023 09:07:48 +0100 Subject: [PATCH] pvr: Fix segfault in pvr_physical_device_init() This was introduced (by me) in a previous commit. Part of pdevice->vk was initialised before calling vk_physical_device_init() which then overwrite our values. Fixes: 4ba553ab9ad ("pvr: Use common vkGetPhysicalDeviceFeatures2() implementation") Signed-off-by: Matt Coster Reviewed-by: Karmjit Mahil Part-of: --- src/imagination/vulkan/pvr_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/imagination/vulkan/pvr_device.c b/src/imagination/vulkan/pvr_device.c index 2031170cd4b..f533daa1bc9 100644 --- a/src/imagination/vulkan/pvr_device.c +++ b/src/imagination/vulkan/pvr_device.c @@ -396,7 +396,6 @@ static VkResult pvr_physical_device_init(struct pvr_physical_device *pdevice, pdevice->render_path = render_path; pdevice->display_path = display_path; pdevice->ws = ws; - pdevice->vk.supported_sync_types = ws->sync_types; result = ws->ops->device_info_init(ws, &pdevice->dev_info, @@ -426,6 +425,8 @@ static VkResult pvr_physical_device_init(struct pvr_physical_device *pdevice, if (result != VK_SUCCESS) goto err_pvr_winsys_destroy; + pdevice->vk.supported_sync_types = ws->sync_types; + result = pvr_physical_device_init_uuids(pdevice); if (result != VK_SUCCESS) goto err_vk_physical_device_finish;