mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2025-12-20 06:50:08 +01:00
Add surfaces the layer supports in unsupported_surfaces
Extends the unsupported_surfaces_ext_array to contain surfaces supported by the layer, when the layer is built without supporting them. Also handles the presentWait2 feature similar to presentWait. Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com> Change-Id: I2e61d56425ff657de949797be86436c9675d1b1f
This commit is contained in:
parent
04d2ba65d5
commit
9c9dff2291
2 changed files with 24 additions and 6 deletions
|
|
@ -553,7 +553,7 @@ wsi_layer_vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physical_device,
|
||||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_2_FEATURES_KHR, pFeatures->pNext);
|
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_2_FEATURES_KHR, pFeatures->pNext);
|
||||||
if (present_wait2_features != nullptr)
|
if (present_wait2_features != nullptr)
|
||||||
{
|
{
|
||||||
present_wait2_features->presentWait2 = VK_TRUE;
|
present_wait2_features->presentWait2 = VK_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto *image_compression_control_swapchain_features =
|
auto *image_compression_control_swapchain_features =
|
||||||
|
|
@ -578,18 +578,26 @@ wsi_layer_vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physical_device,
|
||||||
{
|
{
|
||||||
present_id2_features->presentId2 = VK_TRUE;
|
present_id2_features->presentId2 = VK_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wsi::set_swapchain_maintenance1_state(physical_device, swapchain_maintenance1_features);
|
wsi::set_swapchain_maintenance1_state(physical_device, swapchain_maintenance1_features);
|
||||||
|
|
||||||
if (present_wait_features != nullptr)
|
if (present_wait_features != nullptr)
|
||||||
{
|
{
|
||||||
/* If there is an surface extension in use that is unsupported by the layer, defer to the ICD */
|
/* If there is a surface extension in use that is unsupported by the layer, defer to the ICD */
|
||||||
if (!instance.is_unsupported_surface_extension_enabled())
|
if (!instance.is_unsupported_surface_extension_enabled())
|
||||||
{
|
{
|
||||||
present_wait_features->presentWait = VK_TRUE;
|
present_wait_features->presentWait = VK_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (present_wait2_features != nullptr)
|
||||||
|
{
|
||||||
|
/* If there is a surface extension in use that is unsupported by the layer, defer to the ICD */
|
||||||
|
if (!instance.is_unsupported_surface_extension_enabled())
|
||||||
|
{
|
||||||
|
present_wait2_features->presentWait2 = VK_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||||
auto *present_timing_features = util::find_extension<VkPhysicalDevicePresentTimingFeaturesEXT>(
|
auto *present_timing_features = util::find_extension<VkPhysicalDevicePresentTimingFeaturesEXT>(
|
||||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_TIMING_FEATURES_EXT, pFeatures->pNext);
|
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_TIMING_FEATURES_EXT, pFeatures->pNext);
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,18 @@ namespace wsi
|
||||||
{
|
{
|
||||||
/* A list of platform-specific unsupported surface extensions
|
/* A list of platform-specific unsupported surface extensions
|
||||||
Not using the extension macros and symbols due to missing definitions for native platform symbols. */
|
Not using the extension macros and symbols due to missing definitions for native platform symbols. */
|
||||||
static constexpr std::array unsupported_surfaces_ext_array = { "VK_KHR_win32_surface", "VK_KHR_xlib_surface",
|
static constexpr std::array unsupported_surfaces_ext_array = {
|
||||||
"VK_KHR_xcb_surface", "VK_EXT_metal_surface",
|
"VK_KHR_win32_surface", "VK_KHR_xlib_surface", "VK_KHR_xcb_surface",
|
||||||
"VK_KHR_android_surface" };
|
"VK_EXT_metal_surface", "VK_KHR_android_surface",
|
||||||
|
#if !BUILD_WSI_HEADLESS
|
||||||
|
"VK_EXT_headless_surface",
|
||||||
|
#endif
|
||||||
|
#if !BUILD_WSI_WAYLAND
|
||||||
|
"VK_KHR_wayland_surface",
|
||||||
|
#endif
|
||||||
|
#if !BUILD_WSI_DISPLAY
|
||||||
|
"VK_KHR_display",
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace wsi
|
} // namespace wsi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue