mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 07:50:11 +01:00
turnip: 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: Hyunjun Ko <zzoon@igalia.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
814d6b626f
commit
40c798c6bc
1 changed files with 0 additions and 18 deletions
|
|
@ -1373,24 +1373,6 @@ tu_CreateDevice(VkPhysicalDevice physicalDevice,
|
|||
bool perf_query_pools = false;
|
||||
bool robust_buffer_access2 = false;
|
||||
|
||||
/* Check enabled features */
|
||||
if (pCreateInfo->pEnabledFeatures) {
|
||||
VkPhysicalDeviceFeatures2 supported_features = {
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
|
||||
};
|
||||
tu_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_startup_errorf(physical_device->instance,
|
||||
VK_ERROR_FEATURE_NOT_PRESENT,
|
||||
"Missing feature bit %d\n", i);
|
||||
}
|
||||
}
|
||||
|
||||
vk_foreach_struct_const(ext, pCreateInfo->pNext) {
|
||||
switch (ext->sType) {
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue