mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-24 03:39:07 +02:00
Vulkan: Correct initial swapchain compositeAlpha.
We'll just need to deal with the fact that we have to output 1.0 so that blending doesn't matter, I think.
This commit is contained in:
1 parent
ed41af41d0
commit
e263bb945e
1 file changed
+7
-1
@@ -1030,7 +1030,13 @@ void VulkanContext::InitSwapchain(VkCommandBuffer cmd) {
|
||||
swap_chain_info.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
swap_chain_info.queueFamilyIndexCount = 0;
|
||||
swap_chain_info.pQueueFamilyIndices = NULL;
|
||||
swap_chain_info.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
|
||||
// OPAQUE is not supported everywhere.
|
||||
if (surfCapabilities.supportedCompositeAlpha & VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR) {
|
||||
swap_chain_info.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
|
||||
} else {
|
||||
// This should be supported anywhere, and is the only thing supported on the SHIELD TV, for example.
|
||||
swap_chain_info.compositeAlpha = VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR;
|
||||
}
|
||||
|
||||
res = vkCreateSwapchainKHR(device_, &swap_chain_info, NULL, &swap_chain_);
|
||||
assert(res == VK_SUCCESS);
|
||||
|
||||
Reference in new issue
Block a user