mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
render/vulkan: drop ext params from vulkan_device_create()
These are unused.
This commit is contained in:
parent
30fafe4f4a
commit
e19007dede
3 changed files with 4 additions and 17 deletions
|
@ -76,10 +76,8 @@ struct wlr_vk_device {
|
|||
VkPhysicalDevice vulkan_find_drm_phdev(struct wlr_vk_instance *ini, int drm_fd);
|
||||
|
||||
// Creates a device for the given instance and physical device.
|
||||
// Will try to enable the given extensions but not fail if they are not
|
||||
// available which can later be checked by the caller.
|
||||
struct wlr_vk_device *vulkan_device_create(struct wlr_vk_instance *ini,
|
||||
VkPhysicalDevice phdev, size_t ext_count, const char **exts);
|
||||
VkPhysicalDevice phdev);
|
||||
void vulkan_device_destroy(struct wlr_vk_device *dev);
|
||||
|
||||
// Tries to find any memory bit for the given vulkan device that
|
||||
|
|
|
@ -1496,7 +1496,7 @@ struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(int drm_fd) {
|
|||
vkGetPhysicalDeviceQueueFamilyProperties(phdev, &qfam_count,
|
||||
queue_props);
|
||||
|
||||
struct wlr_vk_device *dev = vulkan_device_create(ini, phdev, 0, NULL);
|
||||
struct wlr_vk_device *dev = vulkan_device_create(ini, phdev);
|
||||
if (!dev) {
|
||||
wlr_log(WLR_ERROR, "Failed to create vulkan device");
|
||||
vulkan_instance_destroy(ini);
|
||||
|
|
|
@ -391,7 +391,7 @@ VkPhysicalDevice vulkan_find_drm_phdev(struct wlr_vk_instance *ini, int drm_fd)
|
|||
}
|
||||
|
||||
struct wlr_vk_device *vulkan_device_create(struct wlr_vk_instance *ini,
|
||||
VkPhysicalDevice phdev, size_t ext_count, const char **exts) {
|
||||
VkPhysicalDevice phdev) {
|
||||
VkResult res;
|
||||
|
||||
// check for extensions
|
||||
|
@ -426,23 +426,12 @@ struct wlr_vk_device *vulkan_device_create(struct wlr_vk_instance *ini,
|
|||
dev->phdev = phdev;
|
||||
dev->instance = ini;
|
||||
dev->drm_fd = -1;
|
||||
dev->extensions = calloc(16 + ext_count, sizeof(*ini->extensions));
|
||||
dev->extensions = calloc(16, sizeof(*ini->extensions));
|
||||
if (!dev->extensions) {
|
||||
wlr_log_errno(WLR_ERROR, "allocation failed");
|
||||
goto error;
|
||||
}
|
||||
|
||||
// find extensions
|
||||
for (unsigned i = 0; i < ext_count; ++i) {
|
||||
if (find_extensions(avail_ext_props, avail_extc, &exts[i], 1)) {
|
||||
wlr_log(WLR_DEBUG, "vulkan device extension %s not found",
|
||||
exts[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
dev->extensions[dev->extension_count++] = exts[i];
|
||||
}
|
||||
|
||||
// For dmabuf import we require at least the external_memory_fd,
|
||||
// external_memory_dma_buf, queue_family_foreign and
|
||||
// image_drm_format_modifier extensions.
|
||||
|
|
Loading…
Reference in a new issue