v3dv: Fix assertion failure for not-found primary_fd during enumeration.

Found when I had v3dv built in my aarch64 turnip setup.

Fixes: 451a0bd490 ("v3dv: use v3d primary node for VK_EXT_physical_device_drm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38147>
This commit is contained in:
Emma Anholt 2025-10-29 11:46:19 -07:00 committed by Marge Bot
parent a3c8740c2e
commit bb532a7a39

View file

@ -1582,9 +1582,7 @@ enumerate_devices(struct vk_instance *vk_instance)
break;
}
assert(primary_fd >= 0);
if (render_fd < 0)
if (render_fd < 0 || primary_fd < 0)
result = VK_ERROR_INCOMPATIBLE_DRIVER;
else
result = create_physical_device(instance, primary_fd, render_fd, display_fd);