allow DRM_FORMAT_MOD_LINEAR on nvidia

This commit is contained in:
JerryXiao 2023-05-24 14:41:22 +08:00
parent aff000aa05
commit 265c982409
Signed by: Jerry
GPG key ID: 22618F758B5BE2E5

2
drm.c
View file

@ -376,7 +376,9 @@ int drm_vendors() {
{
if (check_pixfmt_non_vaapi()) return 1;
printf("warn: nvidia card detected. Currently only x-tiled framebuffer is supported. Performance may suffer.\n");
if (drm->mfb->modifier != DRM_FORMAT_MOD_NONE && drm->mfb->modifier != DRM_FORMAT_MOD_LINEAR) {
drm->funcs->convert = &convert_nvidia_x_tiled_kmsbuf;
}
if (drm_kmsbuf_dumb()) return 1;
}
else if (strcmp(driver_name, "vmwgfx") == 0 ||