Use recommended 3 backbuffers on MoltenVK on Mac
This commit is contained in:
@@ -15,7 +15,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Amount of back buffers to use
|
// Amount of back buffers to use
|
||||||
|
#ifndef VULKAN_BACK_BUFFERS_COUNT
|
||||||
#define VULKAN_BACK_BUFFERS_COUNT 2
|
#define VULKAN_BACK_BUFFERS_COUNT 2
|
||||||
|
#endif
|
||||||
#define VULKAN_BACK_BUFFERS_COUNT_MAX 16
|
#define VULKAN_BACK_BUFFERS_COUNT_MAX 16
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ bool GPUSwapChainVulkan::CreateSwapChain(int32 width, int32 height)
|
|||||||
VkSwapchainCreateInfoKHR swapChainInfo;
|
VkSwapchainCreateInfoKHR swapChainInfo;
|
||||||
RenderToolsVulkan::ZeroStruct(swapChainInfo, VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR);
|
RenderToolsVulkan::ZeroStruct(swapChainInfo, VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR);
|
||||||
swapChainInfo.surface = _surface;
|
swapChainInfo.surface = _surface;
|
||||||
swapChainInfo.minImageCount = Math::Clamp<uint32_t>(VULKAN_BACK_BUFFERS_COUNT, surfProperties.minImageCount, surfProperties.maxImageCount);
|
swapChainInfo.minImageCount = Math::Clamp<uint32_t>(VULKAN_BACK_BUFFERS_COUNT, surfProperties.minImageCount, Math::Min<uint32_t>(surfProperties.maxImageCount, VULKAN_BACK_BUFFERS_COUNT_MAX));
|
||||||
swapChainInfo.imageFormat = result.format;
|
swapChainInfo.imageFormat = result.format;
|
||||||
swapChainInfo.imageColorSpace = result.colorSpace;
|
swapChainInfo.imageColorSpace = result.colorSpace;
|
||||||
swapChainInfo.imageExtent.width = width;
|
swapChainInfo.imageExtent.width = width;
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
#if GRAPHICS_API_VULKAN && PLATFORM_MAC
|
#if GRAPHICS_API_VULKAN && PLATFORM_MAC
|
||||||
|
|
||||||
|
#define VULKAN_BACK_BUFFERS_COUNT 3
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The implementation for the Vulkan API support for Mac platform.
|
/// The implementation for the Vulkan API support for Mac platform.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user