mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-13 14:32:57 -04:00
render/vulkan: use KHR variant for physical device properties
The Vulkan renderer calls vkGetPhysicalDeviceProperties2 while the instance is created with API version 1.0. This violates the specification because the function was promoted to core in 1.1. The resulting validation error leads to undefined behavior and a crash on drivers that enforce strict API checking (e.g. AMD RADV). Replace the core function with the KHR extension variant, which is available when VK_KHR_get_physical_device_properties_2 is enabled, and maintains compatibility with Vulkan 1.0 instances.
This commit is contained in:
parent
bd99e8c2bd
commit
dd745dbc37
3 changed files with 15 additions and 5 deletions
|
|
@ -2818,7 +2818,7 @@ struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(int drm_fd) {
|
|||
|
||||
// Do not use the drm_fd that was passed in: we should prefer the render
|
||||
// node even if a primary node was provided
|
||||
dev->drm_fd = vulkan_open_phdev_drm_fd(phdev);
|
||||
dev->drm_fd = vulkan_open_phdev_drm_fd(ini, phdev);
|
||||
|
||||
return vulkan_renderer_create_for_device(dev);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue