summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/SwapChain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/SwapChain.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/SwapChain.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/SwapChain.cpp b/Source/Core/VideoBackends/Vulkan/SwapChain.cpp
index d43a0e4499..21009510bb 100644
--- a/Source/Core/VideoBackends/Vulkan/SwapChain.cpp
+++ b/Source/Core/VideoBackends/Vulkan/SwapChain.cpp
@@ -320,6 +320,9 @@ bool SwapChain::CreateSwapChain()
return false;
}
+ // Select the number of image layers for Quad-Buffered stereoscopy
+ uint32_t image_layers = g_ActiveConfig.iStereoMode == STEREO_QUADBUFFER ? 2 : 1;
+
// Store the old/current swap chain when recreating for resize
VkSwapchainKHR old_swap_chain = m_swap_chain;
@@ -333,7 +336,7 @@ bool SwapChain::CreateSwapChain()
m_surface_format.format,
m_surface_format.colorSpace,
size,
- 1,
+ image_layers,
image_usage,
VK_SHARING_MODE_EXCLUSIVE,
0,
@@ -359,6 +362,7 @@ bool SwapChain::CreateSwapChain()
m_width = size.width;
m_height = size.height;
+ m_layers = image_layers;
return true;
}
@@ -400,7 +404,7 @@ bool SwapChain::SetupSwapChainImages()
&view,
m_width,
m_height,
- 1};
+ m_layers};
res = vkCreateFramebuffer(g_vulkan_context->GetDevice(), &framebuffer_info, nullptr,
&image.framebuffer);