vulkan/wsi/headless: Remove unnecessary wsi_configure_image()
wsi_configure_image() with the same info is already called by
configure_image() in wsi_swapchain_init(), so this second call is
unnecessary. Furthermore, calling it the second time caused a memory
leak of queue family indices array.
Fixes: d4a2c0fc ("vulkan/wsi: add a headless swapchain implementation/option")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12811
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34194>
This commit is contained in:
committed by
Marge Bot
parent
2b2bcbb96d
commit
64980c4f05
@@ -471,12 +471,6 @@ wsi_headless_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
|
||||
chain->base.image_count = num_images;
|
||||
chain->extent = pCreateInfo->imageExtent;
|
||||
chain->vk_format = pCreateInfo->imageFormat;
|
||||
|
||||
result = wsi_configure_image(&chain->base, pCreateInfo,
|
||||
0, &chain->base.image_info);
|
||||
if (result != VK_SUCCESS) {
|
||||
goto fail;
|
||||
}
|
||||
chain->base.image_info.create_mem = wsi_create_null_image_mem;
|
||||
|
||||
|
||||
@@ -484,7 +478,7 @@ wsi_headless_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
|
||||
result = wsi_create_image(&chain->base, &chain->base.image_info,
|
||||
&chain->images[i].base);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
goto fail;
|
||||
|
||||
chain->images[i].busy = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user