28#if defined(XRT_OS_WINDOWS)
44#define XRT_IPC_HANDLE_INVALID INVALID_HANDLE_VALUE
54 return handle != INVALID_HANDLE_VALUE;
85#define XRT_IPC_HANDLE_INVALID (-1)
117#if defined(XRT_OS_WINDOWS)
133 return handle != NULL;
144#define XRT_SHMEM_HANDLE_INVALID (NULL)
160#define XRT_SHMEM_HANDLE_IS_FD 1
181#define XRT_SHMEM_HANDLE_INVALID (-1)
191#if defined(XRT_OS_ANDROID) && defined(XRT_OS_ANDROID_USE_AHB) && (__ANDROID_API__ >= 26)
192typedef struct AHardwareBuffer AHardwareBuffer;
207#define XRT_GRAPHICS_BUFFER_HANDLE_IS_AHARDWAREBUFFER 1
216#define XRT_GRAPHICS_BUFFER_HANDLE_REFERENCE_ADDED_BY_VULKAN_IMPORT 1
226 return handle != NULL;
237#define XRT_GRAPHICS_BUFFER_HANDLE_INVALID NULL
239#elif defined(XRT_OS_ANDROID) && !defined(XRT_OS_ANDROID_USE_AHB) || defined(XRT_OS_LINUX) || defined(XRT_OS_OSX)
259#define XRT_GRAPHICS_BUFFER_HANDLE_IS_FD 1
267#define XRT_GRAPHICS_BUFFER_HANDLE_CONSUMED_BY_VULKAN_IMPORT 1
288#define XRT_GRAPHICS_BUFFER_HANDLE_INVALID (-1)
290#elif defined(XRT_OS_WINDOWS)
305#define XRT_GRAPHICS_BUFFER_HANDLE_IS_WIN32_HANDLE 1
313#define XRT_GRAPHICS_BUFFER_HANDLE_CONSUMED_BY_VULKAN_IMPORT 1
323 return handle != NULL;
334#define XRT_GRAPHICS_BUFFER_HANDLE_INVALID (NULL)
336#error "Not yet implemented for this platform"
361#define XRT_GRAPHICS_SYNC_HANDLE_IS_FD 1
382#define XRT_GRAPHICS_SYNC_HANDLE_INVALID (-1)
384#elif defined(XRT_OS_WINDOWS)
399#define XRT_GRAPHICS_SYNC_HANDLE_IS_WIN32_HANDLE 1
409 return handle != NULL;
420#define XRT_GRAPHICS_SYNC_HANDLE_INVALID (NULL)
424#if (!defined(XRT_GRAPHICS_BUFFER_HANDLE_REFERENCE_ADDED_BY_VULKAN_IMPORT)) && \
425 (!defined(XRT_GRAPHICS_BUFFER_HANDLE_CONSUMED_BY_VULKAN_IMPORT))
427#error "Needs port: Must define a macro indicating the Vulkan image import buffer behavior"
Generic typedef for platform-specific shared memory handle.
static bool xrt_shmem_is_valid(xrt_shmem_handle_t handle)
Check whether a shared memory handle is valid.
Definition: xrt_handles.h:168
Auto detect OS and certain features.
int xrt_graphics_buffer_handle_t
The type underlying buffers shared between compositor clients and the main compositor.
Definition: xrt_handles.h:252
int xrt_shmem_handle_t
The type for shared memory blocks shared over IPC.
Definition: xrt_handles.h:153
int xrt_graphics_sync_handle_t
The type underlying synchronization primitives (semaphores, etc) shared between compositor clients an...
Definition: xrt_handles.h:354
int xrt_ipc_handle_t
The type for an IPC handle.
Definition: xrt_handles.h:75
A minimal way to include Windows.h.