diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-03-27 02:50:36 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-03-27 02:50:36 +0000 |
| commit | 79acfb39aaab7f3b34e94dfe9228384088984e7e (patch) | |
| tree | 3df18ba341012c03c1ca4ea006e38f27b2762c47 /Graphics/GraphicsEngineVulkan | |
| parent | Updated linux Vulkan library (fixed https://github.com/DiligentGraphics/Dilig... (diff) | |
| download | DiligentCore-79acfb39aaab7f3b34e94dfe9228384088984e7e.tar.gz DiligentCore-79acfb39aaab7f3b34e94dfe9228384088984e7e.zip | |
Enabled format validation on Linux
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp index acee6307..da2f9b98 100644 --- a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp @@ -233,6 +233,24 @@ void SwapChainVkImpl::CreateVulkanSwapChain() if (!PresentModeSupported) { VERIFY(swapchainPresentMode != VK_PRESENT_MODE_FIFO_KHR, "The FIFO present mode is guaranteed by the spec to be supported"); + + const char* PresentModeName = nullptr; + +#define PRESENT_MODE_CASE(Mode) \ + case Mode: PresentModeName = #Mode; break; + switch (swapchainPresentMode) + { + PRESENT_MODE_CASE(VK_PRESENT_MODE_IMMEDIATE_KHR) + PRESENT_MODE_CASE(VK_PRESENT_MODE_MAILBOX_KHR) + PRESENT_MODE_CASE(VK_PRESENT_MODE_FIFO_KHR) + PRESENT_MODE_CASE(VK_PRESENT_MODE_FIFO_RELAXED_KHR) + PRESENT_MODE_CASE(VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR) + PRESENT_MODE_CASE(VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR) + default: PresentModeName = "<UNKNOWN>"; + } +#undef PRESENT_MODE_CASE + LOG_WARNING_MESSAGE(PresentModeName, " is not supported. Defaulting to VK_PRESENT_MODE_FIFO_KHR"); + swapchainPresentMode = VK_PRESENT_MODE_FIFO_KHR; // The FIFO present mode is guaranteed by the spec to be supported VERIFY(std::find(presentModes.begin(), presentModes.end(), swapchainPresentMode) != presentModes.end(), "FIFO present mode must be supported"); |
