Monado OpenXR Runtime
xrt_handles.h File Reference

Native handle types. More...

#include "xrt_config_os.h"
#include <stdbool.h>
#include <stddef.h>
#include "unistd.h"
Include dependency graph for xrt_handles.h:

Go to the source code of this file.

Macros

#define XRT_IPC_HANDLE_INVALID   (-1)
 An invalid value for an IPC handle. More...
 
#define XRT_GRAPHICS_BUFFER_HANDLE_IS_FD   1
 Defined to allow detection of the underlying type. More...
 
#define XRT_GRAPHICS_BUFFER_HANDLE_CONSUMED_BY_VULKAN_IMPORT   1
 Defined to indicate that the graphics buffer is consumed by the import into Vulkan. More...
 
#define XRT_GRAPHICS_BUFFER_HANDLE_INVALID   (-1)
 An invalid value for a graphics buffer. More...
 
#define XRT_GRAPHICS_SYNC_HANDLE_IS_FD   1
 Defined to allow detection of the underlying type. More...
 
#define XRT_GRAPHICS_SYNC_HANDLE_INVALID   (-1)
 An invalid value for a graphics sync primitive. More...
 

Typedefs

typedef int xrt_ipc_handle_t
 The type for an IPC handle. More...
 
typedef int xrt_shmem_handle_t
 The type for shared memory blocks shared over IPC. More...
 
typedef int xrt_graphics_buffer_handle_t
 The type underlying buffers shared between compositor clients and the main compositor. More...
 
typedef int xrt_graphics_sync_handle_t
 The type underlying synchronization primitives (semaphores, etc) shared between compositor clients and the main compositor. More...
 

Detailed Description

Macro Definition Documentation

◆ XRT_GRAPHICS_BUFFER_HANDLE_CONSUMED_BY_VULKAN_IMPORT

#define XRT_GRAPHICS_BUFFER_HANDLE_CONSUMED_BY_VULKAN_IMPORT   1

Defined to indicate that the graphics buffer is consumed by the import into Vulkan.

See also
XRT_GRAPHICS_BUFFER_HANDLE_REFERENCE_ADDED_BY_VULKAN_IMPORT

◆ XRT_GRAPHICS_BUFFER_HANDLE_INVALID

#define XRT_GRAPHICS_BUFFER_HANDLE_INVALID   (-1)

An invalid value for a graphics buffer.

Note that there may be more than one value that's invalid - use xrt_graphics_buffer_is_valid() instead of comparing against this!

◆ XRT_GRAPHICS_BUFFER_HANDLE_IS_FD

#define XRT_GRAPHICS_BUFFER_HANDLE_IS_FD   1

Defined to allow detection of the underlying type.

◆ XRT_GRAPHICS_SYNC_HANDLE_INVALID

#define XRT_GRAPHICS_SYNC_HANDLE_INVALID   (-1)

An invalid value for a graphics sync primitive.

Note that there may be more than one value that's invalid - use xrt_graphics_sync_handle_is_valid() instead of comparing against this!

◆ XRT_GRAPHICS_SYNC_HANDLE_IS_FD

#define XRT_GRAPHICS_SYNC_HANDLE_IS_FD   1

Defined to allow detection of the underlying type.

◆ XRT_IPC_HANDLE_INVALID

#define XRT_IPC_HANDLE_INVALID   (-1)

An invalid value for an IPC handle.

Note that there may be more than one value that's invalid - use xrt_ipc_handle_is_valid instead of comparing against this!

Typedef Documentation

◆ xrt_graphics_buffer_handle_t

The type underlying buffers shared between compositor clients and the main compositor.

On Linux, this is a file descriptor.

We selected the graphics handle to be FDs on OSX because that allowed the code to compile, but it's probably not what we want to actually use on OSX. So we will need to change that down the line, as it looks like OSX uses byte only arrays to share MTLTextures.

◆ xrt_graphics_sync_handle_t

The type underlying synchronization primitives (semaphores, etc) shared between compositor clients and the main compositor.

On Linux, this is a file descriptor.

◆ xrt_ipc_handle_t

typedef int xrt_ipc_handle_t

The type for an IPC handle.

On non-Windows, this is a file descriptor.

◆ xrt_shmem_handle_t

typedef int xrt_shmem_handle_t

The type for shared memory blocks shared over IPC.

On Linux, this is a file descriptor.