From 54325dd1383c9b392c8e62d961e8d73732a7bb82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Mon, 27 Sep 2021 09:30:37 +0300 Subject: [PATCH] lavapipe: 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: Mike Blumenkrantz Reviewed-by: Jason Ekstrand Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 2881670da8c..47ad0a5c9ff 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -1404,19 +1404,6 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateDevice( assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO); - /* Check enabled features */ - if (pCreateInfo->pEnabledFeatures) { - VkPhysicalDeviceFeatures supported_features; - lvp_GetPhysicalDeviceFeatures(physicalDevice, &supported_features); - VkBool32 *supported_feature = (VkBool32 *)&supported_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_error(instance, VK_ERROR_FEATURE_NOT_PRESENT); - } - } - device = vk_zalloc2(&physical_device->vk.instance->alloc, pAllocator, sizeof(*device), 8, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);