Mesa (main): panvk: 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: c752bb459b386b4b6763c31208f9960f872abb03
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c752bb459b386b4b6763c31208f9960f872abb03
Author: Tapani Pälli <tapani.palli at intel.com>
Date: Mon Sep 27 09:31:46 2021 +0300
panvk: 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: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867>
---
src/panfrost/vulkan/panvk_device.c | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/src/panfrost/vulkan/panvk_device.c b/src/panfrost/vulkan/panvk_device.c
index 58cc68818cd..953bc9a371e 100644
--- a/src/panfrost/vulkan/panvk_device.c
+++ b/src/panfrost/vulkan/panvk_device.c
@@ -948,23 +948,6 @@ panvk_CreateDevice(VkPhysicalDevice physicalDevice,
VkResult result;
struct panvk_device *device;
- /* Check enabled features */
- if (pCreateInfo->pEnabledFeatures) {
- VkPhysicalDeviceFeatures2 supported_features = {
- .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
- };
- panvk_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_error(physical_device->instance,
- VK_ERROR_FEATURE_NOT_PRESENT);
- }
- }
-
device = vk_zalloc2(&physical_device->instance->vk.alloc, pAllocator,
sizeof(*device), 8, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);
if (!device)
More information about the mesa-commit
mailing list