radv: Enable VK_KHR_timeline_semaphore.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 25 Oct 2019 08:26:50 +0000 (10:26 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 30 Oct 2019 10:57:07 +0000 (11:57 +0100)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
docs/relnotes/new_features.txt
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_extensions.py

index 9b1dfda0ea0faafbe91a656af82e1df9b2515a25..d7d7b7460262a2e8b7bc74d623f0a504c10f2111 100644 (file)
@@ -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.
index f5ce68e5ffdac2fa6a05e03316577da1a8193ea1..8a008b527da299b2e8d6afc06ca67f418d3b2d63 100644 (file)
@@ -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;
                }
index 9f437f2253feb80365c48bd782650a466940f8df..a081e2da87ad5b575f09dbd5e416b56411975d24 100644 (file)
@@ -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'),