lavapipe: 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: Mike Blumenkrantz <michael.blumenkrantz@gmail.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
f056fb1e56
commit
54325dd138
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue