From 21d777a122dc73481785e6f0ae050932b933d9ad Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Wed, 19 Jul 2017 23:55:58 +0200 Subject: radv: Add support for VK_KHR_variable_pointers. Just a trivial enable. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Connor Abbott Acked-by: Dave Airlie --- src/amd/vulkan/radv_device.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/amd/vulkan/radv_device.c') diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index e3655dabe3a..d87be66da8b 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -157,6 +157,10 @@ static const VkExtensionProperties common_device_extensions[] = { .extensionName = VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME, .specVersion = 1, }, + { + .extensionName = VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME, + .specVersion = 1, + }, }; static VkResult @@ -589,6 +593,18 @@ void radv_GetPhysicalDeviceFeatures2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR *pFeatures) { + vk_foreach_struct(ext, pFeatures->pNext) { + switch (ext->sType) { + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR: { + VkPhysicalDeviceVariablePointerFeaturesKHR *features = (void *)ext; + features->variablePointersStorageBuffer = true; + features->variablePointers = false; + break; + } + default: + break; + } + } return radv_GetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features); } -- cgit v1.2.3