mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 13:50:11 +01:00
Merge branch 'wsi-headless-create-swapchain-cleanup-fix' into 'main'
vulkan/wsi/headless: do not destroy images that are never created See merge request mesa/mesa!39039
This commit is contained in:
commit
bd4efe8773
1 changed files with 4 additions and 1 deletions
|
|
@ -406,8 +406,11 @@ wsi_headless_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
|
||||||
for (uint32_t i = 0; i < chain->base.image_count; i++) {
|
for (uint32_t i = 0; i < chain->base.image_count; i++) {
|
||||||
result = wsi_create_image(&chain->base, &chain->base.image_info,
|
result = wsi_create_image(&chain->base, &chain->base.image_info,
|
||||||
&chain->images[i].base);
|
&chain->images[i].base);
|
||||||
if (result != VK_SUCCESS)
|
if (result != VK_SUCCESS) {
|
||||||
|
/* Record how many images need to be torn down */
|
||||||
|
chain->base.image_count = i;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
chain->images[i].busy_on_host = false;
|
chain->images[i].busy_on_host = false;
|
||||||
chain->images[i].busy_on_device = false;
|
chain->images[i].busy_on_device = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue