From 396195e8f1aac339cac85c0b1b554caab73f8abe Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Fri, 25 Oct 2019 10:26:50 +0200 Subject: [PATCH] radv: Enable VK_KHR_timeline_semaphore. Reviewed-by: Samuel Pitoiset --- docs/relnotes/new_features.txt | 1 + src/amd/vulkan/radv_device.c | 12 ++++++++++++ src/amd/vulkan/radv_extensions.py | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 9b1dfda0ea0..d7d7b746026 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -7,6 +7,7 @@ VK_ANDROID_external_memory_android_hardware_buffer on RADV. VK_KHR_shader_clock on Intel, RADV. VK_KHR_shader_float_controls on Intel, RADV. VK_KHR_spirv_1_4 on Intel, RADV. +VK_KHR_timeline_semaphore on RADV. VK_KHR_vulkan_memory_model on Intel. VK_EXT_shader_subgroup_ballot on Intel. VK_EXT_shader_subgroup_vote on Intel. diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index f5ce68e5ffd..8a008b527da 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1087,6 +1087,12 @@ void radv_GetPhysicalDeviceFeatures2( features->texelBufferAlignment = true; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR: { + VkPhysicalDeviceTimelineSemaphoreFeaturesKHR *features = + (VkPhysicalDeviceTimelineSemaphoreFeaturesKHR *) ext; + features->timelineSemaphore = true; + break; + } default: break; } @@ -1569,6 +1575,12 @@ void radv_GetPhysicalDeviceProperties2( properties->shaderSignedZeroInfNanPreserveFloat64 = pdevice->rad_info.chip_class >= GFX8; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR: { + VkPhysicalDeviceTimelineSemaphorePropertiesKHR *props = + (VkPhysicalDeviceTimelineSemaphorePropertiesKHR *) ext; + props->maxTimelineSemaphoreValueDifference = UINT64_MAX; + break; + } default: break; } diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py index 9f437f2253f..a081e2da87a 100644 --- a/src/amd/vulkan/radv_extensions.py +++ b/src/amd/vulkan/radv_extensions.py @@ -96,7 +96,7 @@ EXTENSIONS = [ Extension('VK_KHR_surface', 25, 'RADV_HAS_SURFACE'), Extension('VK_KHR_surface_protected_capabilities', 1, 'RADV_HAS_SURFACE'), Extension('VK_KHR_swapchain', 68, 'RADV_HAS_SURFACE'), - Extension('VK_KHR_timeline_semaphore', 2, False), + Extension('VK_KHR_timeline_semaphore', 2, 'device->rad_info.has_syncobj_wait_for_submit'), Extension('VK_KHR_uniform_buffer_standard_layout', 1, True), Extension('VK_KHR_variable_pointers', 1, True), Extension('VK_KHR_wayland_surface', 6, 'VK_USE_PLATFORM_WAYLAND_KHR'), -- 2.30.2