mirror of
https://github.com/Ishan09811/pine.git
synced 2025-04-24 08:55:10 +00:00
presentation_engine: fallback to FIFO if selected mode isn't supported (#60)
This commit is contained in:
parent
dfa6aab36a
commit
184ee1ab26
@ -342,8 +342,10 @@ namespace skyline::gpu {
|
||||
break;
|
||||
}
|
||||
auto modes{gpu.vkPhysicalDevice.getSurfacePresentModesKHR(**vkSurface)};
|
||||
if (std::find(modes.begin(), modes.end(), requestedMode) == modes.end())
|
||||
throw exception("Swapchain doesn't support present mode: {}", vk::to_string(requestedMode));
|
||||
if (std::find(modes.begin(), modes.end(), requestedMode) == modes.end()) {
|
||||
LOGW("Swapchain doesn't support present mode: {} fallbacking to fifo mode", vk::to_string(requestedMode));
|
||||
requestedMode = vk::PresentModeKHR::eFifo;
|
||||
}
|
||||
|
||||
vkSwapchain.emplace(gpu.vkDevice, vk::SwapchainCreateInfoKHR{
|
||||
.surface = **vkSurface,
|
||||
|
Loading…
x
Reference in New Issue
Block a user