MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / ChooseSwapExtent

Function ChooseSwapExtent

src/VulkanSample.cpp:389–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387}
388
389static 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
402static constexpr uint32_t GetVulkanApiVersion()
403{

Callers 1

CreateSwapchainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected