27 #if defined(XRT_OS_WINDOWS)
43 #define XRT_IPC_HANDLE_INVALID INVALID_HANDLE_VALUE
53 return handle != INVALID_HANDLE_VALUE;
84 #define XRT_IPC_HANDLE_INVALID (-1)
116 #if defined(XRT_OS_WINDOWS)
132 return handle != NULL;
143 #define XRT_SHMEM_HANDLE_INVALID (NULL)
159 #define XRT_SHMEM_HANDLE_IS_FD 1
180 #define XRT_SHMEM_HANDLE_INVALID (-1)
190 #if defined(XRT_OS_ANDROID) && (__ANDROID_API__ >= 26)
191 typedef struct AHardwareBuffer AHardwareBuffer;
206 #define XRT_GRAPHICS_BUFFER_HANDLE_IS_AHARDWAREBUFFER 1
215 #define XRT_GRAPHICS_BUFFER_HANDLE_REFERENCE_ADDED_BY_VULKAN_IMPORT 1
225 return handle != NULL;
236 #define XRT_GRAPHICS_BUFFER_HANDLE_INVALID NULL
238 #elif defined(XRT_OS_LINUX)
253 #define XRT_GRAPHICS_BUFFER_HANDLE_IS_FD 1
261 #define XRT_GRAPHICS_BUFFER_HANDLE_CONSUMED_BY_VULKAN_IMPORT 1
282 #define XRT_GRAPHICS_BUFFER_HANDLE_INVALID (-1)
284 #elif defined(XRT_OS_WINDOWS)
299 #define XRT_GRAPHICS_BUFFER_HANDLE_IS_WIN32_HANDLE 1
307 #define XRT_GRAPHICS_BUFFER_HANDLE_CONSUMED_BY_VULKAN_IMPORT 1
317 return handle != NULL;
328 #define XRT_GRAPHICS_BUFFER_HANDLE_INVALID (NULL)
330 #error "Not yet implemented for this platform"
355 #define XRT_GRAPHICS_SYNC_HANDLE_IS_FD 1
376 #define XRT_GRAPHICS_SYNC_HANDLE_INVALID (-1)
378 #elif defined(XRT_OS_WINDOWS)
393 #define XRT_GRAPHICS_SYNC_HANDLE_IS_WIN32_HANDLE 1
403 return handle != NULL;
414 #define XRT_GRAPHICS_SYNC_HANDLE_INVALID (NULL)
418 #if (!defined(XRT_GRAPHICS_BUFFER_HANDLE_REFERENCE_ADDED_BY_VULKAN_IMPORT)) && \
419 (!defined(XRT_GRAPHICS_BUFFER_HANDLE_CONSUMED_BY_VULKAN_IMPORT))
421 #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:167
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:246
int xrt_shmem_handle_t
The type for shared memory blocks shared over IPC.
Definition: xrt_handles.h:152
int xrt_graphics_sync_handle_t
The type underlying synchronization primitives (semaphores, etc) shared between compositor clients an...
Definition: xrt_handles.h:348
int xrt_ipc_handle_t
The type for an IPC handle.
Definition: xrt_handles.h:74
A minimal way to include Windows.h.