radv/amdgpu: Fix build on BSD
Some BSDs don't define ENODATA.
Fixes: c58cff3c ("radv/amdgpu: Handle -ENODATA and -ETIME from cs_submit")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27181>
This commit is contained in:
committed by
Marge Bot
parent
9cc3e842bb
commit
963813fbfd
@@ -29,6 +29,7 @@
|
||||
#include <stdlib.h>
|
||||
#include "drm-uapi/amdgpu_drm.h"
|
||||
|
||||
#include "util/detect_os.h"
|
||||
#include "util/os_time.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "ac_debug.h"
|
||||
@@ -43,6 +44,15 @@
|
||||
#include "vk_sync.h"
|
||||
#include "vk_sync_dummy.h"
|
||||
|
||||
/* Some BSDs don't define ENODATA (and ENODATA is replaced with different error
|
||||
* codes in the kernel).
|
||||
*/
|
||||
#if DETECT_OS_OPENBSD
|
||||
#define ENODATA ENOTSUP
|
||||
#elif DETECT_OS_FREEBSD || DETECT_OS_DRAGONFLY
|
||||
#define ENODATA ECONNREFUSED
|
||||
#endif
|
||||
|
||||
/* Maximum allowed total number of submitted IBs. */
|
||||
#define RADV_MAX_IBS_PER_SUBMIT 192
|
||||
|
||||
|
||||
Reference in New Issue
Block a user