Mesa (main): v3dv: remove feature checks from device creation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 1 18:11:06 UTC 2021


Module: Mesa
Branch: main
Commit: f056fb1e56b9976b61636a3af610edb75d10750e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f056fb1e56b9976b61636a3af610edb75d10750e

Author: Tapani Pälli <tapani.palli at intel.com>
Date:   Mon Sep 27 09:29:50 2021 +0300

v3dv: remove feature checks from device creation

This is already handled by vk_device_init(); drivers no longer
need to do it themselves.

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867>

---

 src/broadcom/vulkan/v3dv_device.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c
index 2f2f3f7cd07..ad06b97ec15 100644
--- a/src/broadcom/vulkan/v3dv_device.c
+++ b/src/broadcom/vulkan/v3dv_device.c
@@ -1732,19 +1732,6 @@ v3dv_CreateDevice(VkPhysicalDevice physicalDevice,
 
    assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO);
 
-   /* Check enabled features */
-   if (pCreateInfo->pEnabledFeatures) {
-      VkPhysicalDeviceFeatures supported_features;
-      v3dv_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);
-      }
-   }
-
    /* Check requested queues (we only expose one queue ) */
    assert(pCreateInfo->queueCreateInfoCount == 1);
    for (uint32_t i = 0; i < pCreateInfo->queueCreateInfoCount; i++) {



More information about the mesa-commit mailing list