| 387 | } |
| 388 | |
| 389 | static VkExtent2D ChooseSwapExtent() |
| 390 | { |
| 391 | if(g_SurfaceCapabilities.currentExtent.width != UINT_MAX) |
| 392 | return g_SurfaceCapabilities.currentExtent; |
| 393 | |
| 394 | VkExtent2D result = { |
| 395 | std::max(g_SurfaceCapabilities.minImageExtent.width, |
| 396 | std::min(g_SurfaceCapabilities.maxImageExtent.width, (uint32_t)g_SizeX)), |
| 397 | std::max(g_SurfaceCapabilities.minImageExtent.height, |
| 398 | std::min(g_SurfaceCapabilities.maxImageExtent.height, (uint32_t)g_SizeY)) }; |
| 399 | return result; |
| 400 | } |
| 401 | |
| 402 | static constexpr uint32_t GetVulkanApiVersion() |
| 403 | { |