llvmpipe: Only return null resource handle when dt is not mapped

Fixes #10995

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28810>
This commit is contained in:
Lucas Fryzek 2024-04-17 11:38:34 -04:00 committed by Marge Bot
parent 639fe038ce
commit 053b5f3e0c
1 changed files with 2 additions and 2 deletions

View File

@ -758,11 +758,11 @@ llvmpipe_resource_get_handle(struct pipe_screen *_screen,
}
whandle->handle = lpr->dmabuf_alloc->dmabuf_fd;
return true;
} else if (whandle->type == WINSYS_HANDLE_TYPE_KMS) {
} else if (!lpr->dt && whandle->type == WINSYS_HANDLE_TYPE_KMS) {
/* dri winsys code will use this to query the drm modifiers
* We can just return an null handle and return DRM_FORMAT_MOD_LINEAR */
whandle->handle = 0;
return true;
return true;
}
#endif
assert(lpr->dt);