Check that the drm kernel driver in use is nouveau, and
add a short description of the issue.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
if (!ver)
goto out_err;
+ if (strncmp("nouveau", ver->name, ver->name_len) != 0) {
+ fprintf(stderr,
+ "DRM kernel driver '%.*s' in use. NVK requires nouveau.\n",
+ ver->name_len, ver->name);
+ goto out_err;
+ }
+
uint32_t version =
ver->version_major << 24 |
ver->version_minor << 8 |
ver->version_patchlevel;
drmFreeVersion(ver);
+ ver = NULL;
if (version < 0x01000301)
goto out_err;
return device;
out_err:
+ if (ver)
+ drmFreeVersion(ver);
FREE(device);
close(fd);
return NULL;