fix surface format selection

This commit is contained in:
Matthew 2025-08-25 05:39:49 +10:00
parent b1902658aa
commit 5c2a3ab5ef

View File

@ -2613,7 +2613,17 @@ SelectSwapchainFormats(Vulkan* vk)
}
}
vk.surface_format = formats[0];
VkSurfaceFormatKHR surface_format = formats[0];
foreach(format; formats)
{
if (format.format == VK_FORMAT_B8G8R8A8_UNORM)
{
surface_format = format;
break;
}
}
vk.surface_format = surface_format;
vk.present_mode = present_mode;
}