mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2026-05-05 16:58:06 +02:00
Update the layer's readme and release notes with VK_KHR_present_id2 support
Removed experimental flags around this extension. Signed-off-by: Nir.Ekhauz <nir.ekhauz@arm.com> Change-Id: If314e8c05d0f0fd7405379fe1c714f0e56519b4b
This commit is contained in:
parent
60f53bddd0
commit
7fac7b1339
12 changed files with 11 additions and 47 deletions
|
|
@ -332,7 +332,7 @@ if (VULKAN_WSI_LAYER_EXPERIMENTAL)
|
|||
target_sources(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/wsi/extensions/present_timing.cpp)
|
||||
add_definitions("-DVULKAN_WSI_LAYER_EXPERIMENTAL=1")
|
||||
else()
|
||||
list(APPEND JSON_COMMANDS COMMAND sed -Ei '/VK_EXT_present_timing|VK_KHR_present_id2/d' ${CMAKE_CURRENT_BINARY_DIR}/VkLayer_window_system_integration.json)
|
||||
list(APPEND JSON_COMMANDS COMMAND sed -Ei '/VK_EXT_present_timing/d' ${CMAKE_CURRENT_BINARY_DIR}/VkLayer_window_system_integration.json)
|
||||
add_definitions("-DVULKAN_WSI_LAYER_EXPERIMENTAL=0")
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ implements the following extensions:
|
|||
* VK_KHR_present_wait
|
||||
* VK_EXT_swapchain_maintenance1
|
||||
* VK_EXT_present_mode_fifo_latest_ready (For Headless and Wayland only)
|
||||
* VK_KHR_present_id2
|
||||
|
||||
## Building
|
||||
|
||||
|
|
|
|||
|
|
@ -365,14 +365,12 @@ VKAPI_ATTR VkResult create_device(VkPhysicalDevice physicalDevice, const VkDevic
|
|||
device_data.set_present_id_feature_enabled(present_id_features->presentId);
|
||||
}
|
||||
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
const auto present_id2_features = util::find_extension<VkPhysicalDevicePresentId2FeaturesKHR>(
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_2_FEATURES_KHR, pCreateInfo->pNext);
|
||||
if (present_id2_features != nullptr)
|
||||
{
|
||||
device_data.set_present_id2_feature_enabled(present_id2_features->presentId2);
|
||||
}
|
||||
#endif
|
||||
|
||||
const auto present_mode_fifo_latest_ready_features =
|
||||
util::find_extension<VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT>(
|
||||
|
|
@ -523,14 +521,12 @@ wsi_layer_vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physical_device,
|
|||
present_id_features->presentId = VK_TRUE;
|
||||
}
|
||||
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
auto *present_id2_features = util::find_extension<VkPhysicalDevicePresentId2FeaturesKHR>(
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_2_FEATURES_KHR, pFeatures->pNext);
|
||||
if (present_id2_features != nullptr)
|
||||
{
|
||||
present_id2_features->presentId2 = VK_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
wsi::set_swapchain_maintenance1_state(physical_device, swapchain_maintenance1_features);
|
||||
|
||||
|
|
|
|||
|
|
@ -433,9 +433,9 @@ device_private_data::device_private_data(instance_private_data &inst_data, VkPhy
|
|||
, swapchain_maintenance1_enabled{ false }
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
, present_timing_enabled { true }
|
||||
, present_id2_enabled { false }
|
||||
#endif
|
||||
, present_mode_fifo_latest_ready_enabled { false }
|
||||
, present_id2_enabled { false }
|
||||
, present_mode_fifo_latest_ready_enabled { false }
|
||||
/* clang-format on */
|
||||
{
|
||||
}
|
||||
|
|
@ -607,7 +607,6 @@ bool device_private_data::is_present_id_enabled()
|
|||
return present_id_enabled;
|
||||
}
|
||||
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
void device_private_data::set_present_id2_feature_enabled(bool enable)
|
||||
{
|
||||
present_id2_enabled = enable;
|
||||
|
|
@ -617,7 +616,6 @@ bool device_private_data::is_present_id2_enabled()
|
|||
{
|
||||
return present_id2_enabled;
|
||||
}
|
||||
#endif
|
||||
|
||||
void device_private_data::set_swapchain_maintenance1_enabled(bool enable)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -931,7 +931,6 @@ public:
|
|||
*/
|
||||
bool is_present_id_enabled();
|
||||
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
/**
|
||||
* @brief Set whether the device supports the present ID2 feature.
|
||||
*
|
||||
|
|
@ -945,7 +944,6 @@ public:
|
|||
* @return true if supported, false otherwise.
|
||||
*/
|
||||
bool is_present_id2_enabled();
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Selectively enable/disable the fifo_latest_ready for this device
|
||||
|
|
@ -1050,13 +1048,13 @@ private:
|
|||
* @brief Stores whether the device has enabled support for the present timing features.
|
||||
*/
|
||||
bool present_timing_enabled{ false };
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Stores whether the device supports the present ID2 feature.
|
||||
*
|
||||
*/
|
||||
bool present_id2_enabled{ false };
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Stores whether the device supports the fifo latest ready present mode.
|
||||
|
|
|
|||
|
|
@ -191,7 +191,6 @@ wsi_layer_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo)
|
|||
|
||||
VkResult ret = VK_SUCCESS;
|
||||
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
struct present_ids
|
||||
{
|
||||
uint32_t ids_num{ 0 };
|
||||
|
|
@ -224,9 +223,6 @@ wsi_layer_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo)
|
|||
present_ids.p_present_ids = ext->pPresentIds;
|
||||
}
|
||||
}
|
||||
#else
|
||||
auto *present_ids = util::find_extension<VkPresentIdKHR>(VK_STRUCTURE_TYPE_PRESENT_ID_KHR, pPresentInfo->pNext);
|
||||
#endif
|
||||
|
||||
const auto present_fence_info = util::find_extension<VkSwapchainPresentFenceInfoEXT>(
|
||||
VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT, present_info->pNext);
|
||||
|
|
@ -248,17 +244,10 @@ wsi_layer_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo)
|
|||
|
||||
uint64_t present_id = 0; /* No present ID by default */
|
||||
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
if (present_ids.p_present_ids && present_ids.ids_num == pPresentInfo->swapchainCount)
|
||||
{
|
||||
present_id = present_ids.p_present_ids[i];
|
||||
}
|
||||
#else
|
||||
if (present_ids && present_ids->pPresentIds && present_ids->swapchainCount == pPresentInfo->swapchainCount)
|
||||
{
|
||||
present_id = present_ids->pPresentIds[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
wsi::swapchain_presentation_parameters present_params{};
|
||||
present_params.present_fence = (present_fence_info == nullptr) ? VK_NULL_HANDLE : present_fence_info->pFences[i];
|
||||
|
|
|
|||
|
|
@ -99,14 +99,12 @@ VkResult surface_properties::get_surface_capabilities(VkPhysicalDevice physical_
|
|||
surface_scaling_capabilities->maxScaledImageExtent = pSurfaceCapabilities->surfaceCapabilities.maxImageExtent;
|
||||
}
|
||||
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
auto present_id2_surface_cap = util::find_extension<VkSurfaceCapabilitiesPresentId2KHR>(
|
||||
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_ID_2_KHR, pSurfaceCapabilities->pNext);
|
||||
if (present_id2_surface_cap != nullptr)
|
||||
{
|
||||
present_id2_surface_cap->presentId2Supported = VK_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,11 +85,8 @@ VkResult swapchain::add_required_extensions(VkDevice device, const VkSwapchainCr
|
|||
}
|
||||
}
|
||||
|
||||
if (m_device_data.is_present_id_enabled()
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
|| (swapchain_create_info->flags & VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR)
|
||||
#endif
|
||||
)
|
||||
if (m_device_data.is_present_id_enabled() ||
|
||||
(swapchain_create_info->flags & VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR))
|
||||
{
|
||||
if (!add_swapchain_extension(m_allocator.make_unique<wsi_ext_present_id>()))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -105,14 +105,12 @@ VkResult surface_properties::get_surface_capabilities(VkPhysicalDevice physical_
|
|||
surface_scaling_capabilities->maxScaledImageExtent = surface_capabilities->surfaceCapabilities.maxImageExtent;
|
||||
}
|
||||
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
auto present_id2_surface_cap = util::find_extension<VkSurfaceCapabilitiesPresentId2KHR>(
|
||||
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_ID_2_KHR, surface_capabilities->pNext);
|
||||
if (present_id2_surface_cap != nullptr)
|
||||
{
|
||||
present_id2_surface_cap->presentId2Supported = VK_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,15 +71,9 @@ swapchain::~swapchain()
|
|||
VkResult swapchain::add_required_extensions(VkDevice device, const VkSwapchainCreateInfoKHR *swapchain_create_info)
|
||||
{
|
||||
UNUSED(device);
|
||||
#if !VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
UNUSED(swapchain_create_info);
|
||||
#endif
|
||||
|
||||
if (m_device_data.is_present_id_enabled()
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
|| (swapchain_create_info->flags & VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR)
|
||||
#endif
|
||||
)
|
||||
if (m_device_data.is_present_id_enabled() ||
|
||||
(swapchain_create_info->flags & VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR))
|
||||
{
|
||||
if (!add_swapchain_extension(m_allocator.make_unique<wsi_ext_present_id>()))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -119,14 +119,12 @@ VkResult surface_properties::get_surface_capabilities(VkPhysicalDevice physical_
|
|||
surface_scaling_capabilities->maxScaledImageExtent = pSurfaceCapabilities->surfaceCapabilities.maxImageExtent;
|
||||
}
|
||||
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
auto present_id2_surface_cap = util::find_extension<VkSurfaceCapabilitiesPresentId2KHR>(
|
||||
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_ID_2_KHR, pSurfaceCapabilities->pNext);
|
||||
if (present_id2_surface_cap != nullptr)
|
||||
{
|
||||
present_id2_surface_cap->presentId2Supported = VK_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,11 +92,8 @@ VkResult swapchain::add_required_extensions(VkDevice device, const VkSwapchainCr
|
|||
}
|
||||
}
|
||||
|
||||
if (m_device_data.is_present_id_enabled()
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
|| (swapchain_create_info->flags & VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR)
|
||||
#endif
|
||||
)
|
||||
if (m_device_data.is_present_id_enabled() ||
|
||||
(swapchain_create_info->flags & VK_SWAPCHAIN_CREATE_PRESENT_ID_2_BIT_KHR))
|
||||
{
|
||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
||||
if (!add_swapchain_extension(m_allocator.make_unique<wsi_ext_present_id_wayland>()))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue