mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-24 15:50:37 +02:00
turnip: Do better TU_DEBUG=startup logging of drmGetDevices2() failure.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2769>
This commit is contained in:
parent
aba8c579a9
commit
e67c2e1c96
1 changed files with 6 additions and 2 deletions
|
|
@ -501,8 +501,12 @@ tu_enumerate_devices(struct tu_instance *instance)
|
|||
|
||||
max_devices = drmGetDevices2(0, devices, ARRAY_SIZE(devices));
|
||||
|
||||
if (instance->debug_flags & TU_DEBUG_STARTUP)
|
||||
tu_logi("Found %d drm nodes", max_devices);
|
||||
if (instance->debug_flags & TU_DEBUG_STARTUP) {
|
||||
if (max_devices < 0)
|
||||
tu_logi("drmGetDevices2 returned error: %s\n", strerror(max_devices));
|
||||
else
|
||||
tu_logi("Found %d drm nodes", max_devices);
|
||||
}
|
||||
|
||||
if (max_devices < 1)
|
||||
return vk_error(instance, VK_ERROR_INCOMPATIBLE_DRIVER);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue