mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2025-12-20 06:50:08 +01:00
Merge branch 'main' of upstream into 'ext_refactor'
Merges upstream 'main' into 'ext_refactor' branch and fix merge conflict. Change-Id: I718ec54cb11b7f456d713728b976c61ea7811eb0 Signed-off-by: Normunds Rieksts <normunds.rieksts@arm.com>
This commit is contained in:
commit
279896dda6
3 changed files with 3 additions and 8 deletions
|
|
@ -290,7 +290,6 @@ if (VULKAN_WSI_LAYER_EXPERIMENTAL)
|
||||||
add_definitions("-DVULKAN_WSI_LAYER_EXPERIMENTAL=1")
|
add_definitions("-DVULKAN_WSI_LAYER_EXPERIMENTAL=1")
|
||||||
else()
|
else()
|
||||||
list(APPEND JSON_COMMANDS COMMAND sed -i '/VK_EXT_present_timing/d' ${CMAKE_CURRENT_BINARY_DIR}/VkLayer_window_system_integration.json)
|
list(APPEND JSON_COMMANDS COMMAND sed -i '/VK_EXT_present_timing/d' ${CMAKE_CURRENT_BINARY_DIR}/VkLayer_window_system_integration.json)
|
||||||
list(APPEND JSON_COMMANDS COMMAND sed -i '/VK_EXT_swapchain_maintenance1/d' ${CMAKE_CURRENT_BINARY_DIR}/VkLayer_window_system_integration.json)
|
|
||||||
add_definitions("-DVULKAN_WSI_LAYER_EXPERIMENTAL=0")
|
add_definitions("-DVULKAN_WSI_LAYER_EXPERIMENTAL=0")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,12 @@ The Vulkan® WSI Layer in addition to the window system integration extensions
|
||||||
implements the following extensions:
|
implements the following extensions:
|
||||||
* Instance extensions
|
* Instance extensions
|
||||||
* VK_KHR_get_surface_capabilities2
|
* VK_KHR_get_surface_capabilities2
|
||||||
|
* VK_EXT_surface_maintenance1
|
||||||
* Device extensions
|
* Device extensions
|
||||||
* VK_KHR_shared_presentable_image
|
* VK_KHR_shared_presentable_image
|
||||||
* VK_EXT_image_compression_control_swapchain
|
* VK_EXT_image_compression_control_swapchain
|
||||||
* VK_KHR_present_id
|
* VK_KHR_present_id
|
||||||
|
* VK_EXT_swapchain_maintenance1
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,6 @@ VKAPI_ATTR VkResult create_device(VkPhysicalDevice physicalDevice, const VkDevic
|
||||||
device_data.set_present_id_feature_enabled(present_id_features->presentId);
|
device_data.set_present_id_feature_enabled(present_id_features->presentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
|
||||||
auto *physical_device_swapchain_maintenance1_features =
|
auto *physical_device_swapchain_maintenance1_features =
|
||||||
util::find_extension<VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT>(
|
util::find_extension<VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT>(
|
||||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT, pCreateInfo->pNext);
|
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT, pCreateInfo->pNext);
|
||||||
|
|
@ -386,7 +385,6 @@ VKAPI_ATTR VkResult create_device(VkPhysicalDevice physicalDevice, const VkDevic
|
||||||
device_data.set_swapchain_maintenance1_enabled(
|
device_data.set_swapchain_maintenance1_enabled(
|
||||||
physical_device_swapchain_maintenance1_features->swapchainMaintenance1);
|
physical_device_swapchain_maintenance1_features->swapchainMaintenance1);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
@ -479,7 +477,6 @@ wsi_layer_vkGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice,
|
||||||
VkPhysicalDeviceFeatures2 *pFeatures) VWL_API_POST
|
VkPhysicalDeviceFeatures2 *pFeatures) VWL_API_POST
|
||||||
{
|
{
|
||||||
auto &instance = layer::instance_private_data::get(physicalDevice);
|
auto &instance = layer::instance_private_data::get(physicalDevice);
|
||||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
|
||||||
auto *physical_device_swapchain_maintenance1_features =
|
auto *physical_device_swapchain_maintenance1_features =
|
||||||
util::find_extension<VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT>(
|
util::find_extension<VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT>(
|
||||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT, pFeatures->pNext);
|
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT, pFeatures->pNext);
|
||||||
|
|
@ -487,7 +484,6 @@ wsi_layer_vkGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice,
|
||||||
{
|
{
|
||||||
physical_device_swapchain_maintenance1_features->swapchainMaintenance1 = false;
|
physical_device_swapchain_maintenance1_features->swapchainMaintenance1 = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
instance.disp.GetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures);
|
instance.disp.GetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures);
|
||||||
|
|
||||||
auto *image_compression_control_swapchain_features =
|
auto *image_compression_control_swapchain_features =
|
||||||
|
|
@ -506,9 +502,9 @@ wsi_layer_vkGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice,
|
||||||
present_id_features->presentId = true;
|
present_id_features->presentId = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
|
||||||
wsi::set_swapchain_maintenance1_state(physicalDevice, physical_device_swapchain_maintenance1_features);
|
wsi::set_swapchain_maintenance1_state(physicalDevice, physical_device_swapchain_maintenance1_features);
|
||||||
|
|
||||||
|
#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);
|
||||||
if (present_timing_features != nullptr)
|
if (present_timing_features != nullptr)
|
||||||
|
|
@ -557,14 +553,12 @@ wsi_layer_vkGetDeviceProcAddr(VkDevice device, const char *funcName) VWL_API_POS
|
||||||
GET_PROC_ADDR(vkCreateImage);
|
GET_PROC_ADDR(vkCreateImage);
|
||||||
GET_PROC_ADDR(vkBindImageMemory2);
|
GET_PROC_ADDR(vkBindImageMemory2);
|
||||||
|
|
||||||
#if VULKAN_WSI_LAYER_EXPERIMENTAL
|
|
||||||
/* VK_EXT_swapchain_maintenance1 */
|
/* VK_EXT_swapchain_maintenance1 */
|
||||||
if (layer::device_private_data::get(device).is_device_extension_enabled(
|
if (layer::device_private_data::get(device).is_device_extension_enabled(
|
||||||
VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME))
|
VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME))
|
||||||
{
|
{
|
||||||
GET_PROC_ADDR(vkReleaseSwapchainImagesEXT);
|
GET_PROC_ADDR(vkReleaseSwapchainImagesEXT);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return layer::device_private_data::get(device).disp.get_user_enabled_entrypoint(
|
return layer::device_private_data::get(device).disp.get_user_enabled_entrypoint(
|
||||||
device, layer::device_private_data::get(device).instance_data.api_version, funcName);
|
device, layer::device_private_data::get(device).instance_data.api_version, funcName);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue