From 40c798c6bc8731ce299c5d9ccee663b794df294a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Mon, 27 Sep 2021 09:25:43 +0300 Subject: [PATCH] turnip: remove feature checks from device creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is already handled by vk_device_init(); drivers no longer need to do it themselves. Signed-off-by: Tapani Pälli Reviewed-by: Hyunjun Ko Reviewed-by: Jason Ekstrand Part-of: --- src/freedreno/vulkan/tu_device.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index dd1ff49914f..272d3b8563a 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -1373,24 +1373,6 @@ tu_CreateDevice(VkPhysicalDevice physicalDevice, bool perf_query_pools = false; bool robust_buffer_access2 = false; - /* Check enabled features */ - if (pCreateInfo->pEnabledFeatures) { - VkPhysicalDeviceFeatures2 supported_features = { - .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, - }; - tu_GetPhysicalDeviceFeatures2(physicalDevice, &supported_features); - VkBool32 *supported_feature = (VkBool32 *) &supported_features.features; - VkBool32 *enabled_feature = (VkBool32 *) pCreateInfo->pEnabledFeatures; - unsigned num_features = - sizeof(VkPhysicalDeviceFeatures) / sizeof(VkBool32); - for (uint32_t i = 0; i < num_features; i++) { - if (enabled_feature[i] && !supported_feature[i]) - return vk_startup_errorf(physical_device->instance, - VK_ERROR_FEATURE_NOT_PRESENT, - "Missing feature bit %d\n", i); - } - } - vk_foreach_struct_const(ext, pCreateInfo->pNext) { switch (ext->sType) { case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: {