mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-14 14:32:57 -04:00
Replace other 1.1 api device_features
https://docs.vulkan.org/refpages/latest/refpages/source/vkGetPhysicalDeviceFeatures2.html
This commit is contained in:
parent
dd745dbc37
commit
280cc0742a
2 changed files with 9 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ struct wlr_vk_instance {
|
||||||
} api;
|
} api;
|
||||||
|
|
||||||
PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR;
|
PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR;
|
||||||
|
PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Creates and initializes a vulkan instance.
|
// Creates and initializes a vulkan instance.
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,13 @@ struct wlr_vk_instance *vulkan_instance_create(bool debug) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ini->vkGetPhysicalDeviceFeatures2KHR = (PFN_vkGetPhysicalDeviceFeatures2KHR)
|
||||||
|
vkGetInstanceProcAddr(ini->instance, "vkGetPhysicalDeviceFeatures2KHR");
|
||||||
|
if (!ini->vkGetPhysicalDeviceFeatures2KHR) {
|
||||||
|
wlr_log(WLR_ERROR, "vkGetPhysicalDeviceFeatures2KHR not found");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return ini;
|
return ini;
|
||||||
|
|
||||||
|
|
@ -555,7 +562,7 @@ struct wlr_vk_device *vulkan_device_create(struct wlr_vk_instance *ini,
|
||||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
|
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
|
||||||
.pNext = &phdev_sampler_ycbcr_features,
|
.pNext = &phdev_sampler_ycbcr_features,
|
||||||
};
|
};
|
||||||
vkGetPhysicalDeviceFeatures2(phdev, &phdev_features);
|
ini->vkGetPhysicalDeviceFeatures2KHR(phdev, &phdev_features);
|
||||||
|
|
||||||
dev->sampler_ycbcr_conversion = phdev_sampler_ycbcr_features.samplerYcbcrConversion;
|
dev->sampler_ycbcr_conversion = phdev_sampler_ycbcr_features.samplerYcbcrConversion;
|
||||||
wlr_log(WLR_DEBUG, "Sampler YCbCr conversion %s",
|
wlr_log(WLR_DEBUG, "Sampler YCbCr conversion %s",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue