Merge pull request #366 from mnstrmnch/master

Added support for VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR for D2D
This commit is contained in:
Sascha Willems 2017-08-16 22:08:57 +02:00 committed by GitHub
commit ed1134d6d2

View file

@ -606,7 +606,7 @@ public:
VkDisplayPlaneCapabilitiesKHR planeCap; VkDisplayPlaneCapabilitiesKHR planeCap;
vkGetDisplayPlaneCapabilitiesKHR(physicalDevice, displayMode, bestPlaneIndex, &planeCap); vkGetDisplayPlaneCapabilitiesKHR(physicalDevice, displayMode, bestPlaneIndex, &planeCap);
VkDisplayPlaneAlphaFlagBitsKHR alphaMode; VkDisplayPlaneAlphaFlagBitsKHR alphaMode = (VkDisplayPlaneAlphaFlagBitsKHR)0;
if (planeCap.supportedAlpha & VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR) if (planeCap.supportedAlpha & VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR)
{ {
@ -614,13 +614,16 @@ public:
} }
else if (planeCap.supportedAlpha & VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR) else if (planeCap.supportedAlpha & VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR)
{ {
alphaMode = VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR; alphaMode = VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR;
} }
else else if (planeCap.supportedAlpha & VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR)
{ {
alphaMode = VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR; alphaMode = VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR;
} }
else if (planeCap.supportedAlpha & VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR)
{
alphaMode = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR;
}
VkDisplaySurfaceCreateInfoKHR surfaceInfo{}; VkDisplaySurfaceCreateInfoKHR surfaceInfo{};
surfaceInfo.sType = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR; surfaceInfo.sType = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR;