mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
vulkan/wsi: treat EBADF as missing DMA_BUF_IOCTL_{EXPORT,IMPORT}_SYNC_FILE
FreeBSD supports DMA-BUF but not DMA_BUF_IOCTL_SYNC and similar yet.
As it returns EBADF instead of ENOTTY all consumers fail due to
VK_ERROR_OUT_OF_HOST_MEMORY.
Fixes: 30b57f10b3 ("vulkan/wsi: Signal semaphores and fences from the dma-buf")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17070>
This commit is contained in:
parent
1783a261f6
commit
78523eea2f
1 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ wsi_dma_buf_export_sync_file(int dma_buf_fd, int *sync_file_fd)
|
|||
};
|
||||
int ret = drmIoctl(dma_buf_fd, DMA_BUF_IOCTL_EXPORT_SYNC_FILE_WSI, &export);
|
||||
if (ret) {
|
||||
if (errno == ENOTTY) {
|
||||
if (errno == ENOTTY || errno == EBADF) {
|
||||
no_dma_buf_sync_file = true;
|
||||
return VK_ERROR_FEATURE_NOT_PRESENT;
|
||||
} else {
|
||||
|
|
@ -95,7 +95,7 @@ wsi_dma_buf_import_sync_file(int dma_buf_fd, int sync_file_fd)
|
|||
};
|
||||
int ret = drmIoctl(dma_buf_fd, DMA_BUF_IOCTL_IMPORT_SYNC_FILE_WSI, &import);
|
||||
if (ret) {
|
||||
if (errno == ENOTTY) {
|
||||
if (errno == ENOTTY || errno == EBADF) {
|
||||
no_dma_buf_sync_file = true;
|
||||
return VK_ERROR_FEATURE_NOT_PRESENT;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue