mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
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@intel.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12867>
This commit is contained in:
parent
54325dd138
commit
c752bb459b
1 changed files with 0 additions and 17 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue