Remove unnecessary comparison
It is not possible for swapchainPresentMode to ever be VK_PRESENT_MODE_MAILBOX_KHR given the break in the above if block
This commit is contained in:
parent
846413cc4b
commit
750a37f633
1 changed files with 2 additions and 2 deletions
|
|
@ -272,7 +272,7 @@ void VulkanSwapChain::create(uint32_t *width, uint32_t *height, bool vsync)
|
||||||
swapchainPresentMode = VK_PRESENT_MODE_MAILBOX_KHR;
|
swapchainPresentMode = VK_PRESENT_MODE_MAILBOX_KHR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((swapchainPresentMode != VK_PRESENT_MODE_MAILBOX_KHR) && (presentModes[i] == VK_PRESENT_MODE_IMMEDIATE_KHR))
|
if (presentModes[i] == VK_PRESENT_MODE_IMMEDIATE_KHR)
|
||||||
{
|
{
|
||||||
swapchainPresentMode = VK_PRESENT_MODE_IMMEDIATE_KHR;
|
swapchainPresentMode = VK_PRESENT_MODE_IMMEDIATE_KHR;
|
||||||
}
|
}
|
||||||
|
|
@ -594,4 +594,4 @@ void VulkanSwapChain::createDirect2DisplaySurface(uint32_t width, uint32_t heigh
|
||||||
delete[] pDisplayProperties;
|
delete[] pDisplayProperties;
|
||||||
delete[] pPlaneProperties;
|
delete[] pPlaneProperties;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue