zink: add fail logging for drmPrimeFDToHandle

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14541>
This commit is contained in:
Mike Blumenkrantz 2022-03-22 15:21:26 -04:00 committed by Marge Bot
parent 6998dbb778
commit e37f33cc8d
1 changed files with 3 additions and 1 deletions

View File

@ -1161,8 +1161,10 @@ zink_resource_get_handle(struct pipe_screen *pscreen,
uint32_t h;
bool success = drmPrimeFDToHandle(screen->drm_fd, fd, &h) == 0;
close(fd);
if (!success)
if (!success) {
mesa_loge("zink: failed drmPrimeFDToHandle %s", strerror(errno));
return false;
}
fd = h;
}
whandle->handle = fd;