Commit bd18d589 by Hernan Liatis

Implement vkGetPhysicalDeviceXlibPresentationSupportKHR

Add support for function as dictated by the Vulkan spec for Xlib WSI (32.4.5) Bug: b/124265819 Change-Id: I61e9ca4b34c7b57102d32ff24cecde2b9e513a5f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/32228 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarHernan Liatis <hliatis@google.com>
parent 9659e34f
...@@ -91,6 +91,7 @@ static const std::unordered_map<std::string, PFN_vkVoidFunction> instanceFunctio ...@@ -91,6 +91,7 @@ static const std::unordered_map<std::string, PFN_vkVoidFunction> instanceFunctio
#ifdef VK_USE_PLATFORM_XLIB_KHR #ifdef VK_USE_PLATFORM_XLIB_KHR
// VK_KHR_xlib_surface // VK_KHR_xlib_surface
MAKE_VULKAN_INSTANCE_ENTRY(vkCreateXlibSurfaceKHR), MAKE_VULKAN_INSTANCE_ENTRY(vkCreateXlibSurfaceKHR),
MAKE_VULKAN_INSTANCE_ENTRY(vkGetPhysicalDeviceXlibPresentationSupportKHR),
#endif #endif
}; };
#undef MAKE_VULKAN_INSTANCE_ENTRY #undef MAKE_VULKAN_INSTANCE_ENTRY
......
...@@ -322,7 +322,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(VkPhysic ...@@ -322,7 +322,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(VkPhysic
} }
} }
// "Images created with a format from one of those listed in Formats requiring sampler YCBCR conversion for VK_IMAGE_ASPECT_COLOR_BIT image views // "Images created with a format from one of those listed in Formats requiring sampler Y'CBCR conversion for VK_IMAGE_ASPECT_COLOR_BIT image views
// have further restrictions on their limits and capabilities compared to images created with other formats." // have further restrictions on their limits and capabilities compared to images created with other formats."
if(vk::Format(format).isYcbcrFormat()) if(vk::Format(format).isYcbcrFormat())
{ {
...@@ -432,7 +432,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, c ...@@ -432,7 +432,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, c
// YCbCr conversion is supported. // YCbCr conversion is supported.
// samplerYcbcrConversionFeatures->samplerYcbcrConversion can be VK_TRUE or VK_FALSE. // samplerYcbcrConversionFeatures->samplerYcbcrConversion can be VK_TRUE or VK_FALSE.
// No action needs to be taken on our end in either case; it's the apps responsibility that // No action needs to be taken on our end in either case; it's the apps responsibility that
// "To create a sampler YCbCr conversion, the samplerYcbcrConversion feature must be enabled." // "To create a sampler Y'CbCr conversion, the samplerYcbcrConversion feature must be enabled."
(void)samplerYcbcrConversionFeatures->samplerYcbcrConversion; (void)samplerYcbcrConversionFeatures->samplerYcbcrConversion;
} }
break; break;
...@@ -2584,6 +2584,14 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(VkInstance instance, const ...@@ -2584,6 +2584,14 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(VkInstance instance, const
return vk::XlibSurfaceKHR::Create(pAllocator, pCreateInfo, pSurface); return vk::XlibSurfaceKHR::Create(pAllocator, pCreateInfo, pSurface);
} }
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID)
{
TRACE("(VkPhysicalDevice physicalDevice = %p, uint32_t queueFamilyIndex = %d, Display* dpy = %p, VisualID visualID = %lu)",
physicalDevice, int(queueFamilyIndex), dpy, visualID);
return VK_TRUE;
}
#endif #endif
#ifndef __ANDROID__ #ifndef __ANDROID__
...@@ -2604,7 +2612,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDe ...@@ -2604,7 +2612,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDe
return VK_SUCCESS; return VK_SUCCESS;
} }
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities)
{ {
TRACE("(VkPhysicalDevice physicalDevice = %p, VkSurfaceKHR surface = %p, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities = %p)", TRACE("(VkPhysicalDevice physicalDevice = %p, VkSurfaceKHR surface = %p, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities = %p)",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment