mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-09 09:39:13 +00:00
Vulkan: Implement Quad-Buffered stereoscopy support.
This commit is contained in:
parent
f3508742ac
commit
1f2d43c870
4 changed files with 21 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue