Monado OpenXR Runtime
xrt_compositor.h File Reference

Header declaring XRT graphics interfaces. More...

#include "xrt/xrt_limits.h"
#include "xrt/xrt_defines.h"
#include "xrt/xrt_handles.h"
#include "xrt/xrt_config_os.h"
#include "xrt/xrt_config_have.h"
#include "xrt/xrt_windows.h"
Include dependency graph for xrt_compositor.h:

Go to the source code of this file.

Data Structures

struct  xrt_layer_advanced_blend_data
 Advanced blend provides explicit control over source and destination blend factors, with separate controls for color and alpha. More...
 
struct  xrt_sub_image
 Specifies a sub-image in a layer. More...
 
struct  xrt_layer_projection_view_data
 All of the pure data values associated with a single view in a projection layer. More...
 
struct  xrt_layer_projection_data
 All the pure data values associated with a projection layer. More...
 
struct  xrt_layer_depth_data
 All the pure data values associated with a depth information attached to a layer. More...
 
struct  xrt_layer_depth_test_data
 
struct  xrt_layer_projection_depth_data
 All the pure data values associated with a projection layer with depth swapchain attached. More...
 
struct  xrt_layer_quad_data
 All the pure data values associated with a quad layer. More...
 
struct  xrt_layer_cube_data
 All the pure data values associated with a cube layer. More...
 
struct  xrt_layer_cylinder_data
 All the pure data values associated with a cylinder layer. More...
 
struct  xrt_layer_equirect1_data
 All the pure data values associated with a equirect1 layer. More...
 
struct  xrt_layer_equirect2_data
 All the pure data values associated with a equirect2 layer. More...
 
interface  xrt_passthrough
 
interface  xrt_passthrough_layer
 
struct  xrt_layer_passthrough_data
 All the pure data values associated with a passthrough layer. More...
 
struct  xrt_layer_data
 All the pure data values associated with a composition layer. More...
 
struct  xrt_layer_frame_data
 Per frame data for the layer submission calls, used in xrt_compositor::layer_begin. More...
 
interface  xrt_swapchain
 Common swapchain interface/base. More...
 
struct  xrt_compositor_fence
 Compositor fence used for syncornization. More...
 
struct  xrt_compositor_semaphore
 Compositor semaphore used for synchronization, needs to be as capable as a Vulkan pipeline semaphore. More...
 
struct  xrt_swapchain_create_info
 Swapchain creation info. More...
 
struct  xrt_passthrough_create_info
 Passthrough creation info. More...
 
struct  xrt_passthrough_layer_create_info
 Passthrough layer creation info. More...
 
struct  xrt_swapchain_create_properties
 Struct used to negotiate properties of a swapchain that is created outside of the compositor. More...
 
struct  xrt_session_info
 Session information, mostly overlay extension data. More...
 
struct  xrt_compositor_info
 Capabilities and information about the compositor and device together. More...
 
struct  xrt_begin_session_info
 Begin Session information not known until clients have created an xrt-instance such as which extensions are enabled, view type, etc. More...
 
interface  xrt_compositor
 Common compositor client interface/base. More...
 
struct  xrt_swapchain_gl
 Base class for an OpenGL (ES) client swapchain. More...
 
struct  xrt_compositor_gl
 Base class for an OpenGL (ES) client compositor. More...
 
struct  xrt_swapchain_vk
 Base class for a Vulkan client swapchain. More...
 
struct  xrt_compositor_vk
 Base class for a Vulkan client compositor. More...
 
struct  xrt_swapchain_d3d11
 Base class for a D3D11 client swapchain. More...
 
struct  xrt_compositor_d3d11
 Base class for a D3D11 client compositor. More...
 
struct  xrt_d3d_requirements
 Graphics usage requirements for D3D APIs. More...
 
struct  xrt_swapchain_d3d12
 Base class for a D3D12 client swapchain. More...
 
struct  xrt_compositor_d3d12
 Base class for a D3D12 client compositor. More...
 
struct  xrt_image_native
 A single image of a swapchain based on native buffer handles. More...
 
interface  xrt_swapchain_native
 Base class for a swapchain that exposes a native buffer handle to be imported into a client API. More...
 
interface  xrt_compositor_native
 Main compositor server interface. More...
 
struct  xrt_system_compositor_info
 Capabilities and information about the system compositor (and its wrapped native compositor, if any), and device together. More...
 
interface  xrt_multi_compositor_control
 Special functions to control multi session/clients. More...
 
struct  xrt_system_compositor
 The system compositor handles composition for a system. More...
 
struct  xrt_image_native_allocator
 Allocator for system native images, in general you do not need to free the images as they will be consumed by importing them to the graphics API. More...
 

Typedefs

typedef struct VkCommandBuffer_T * VkCommandBuffer
 
typedef uint64_t VkImage
 
typedef uint64_t VkDeviceMemory
 

Enumerations

enum  xrt_layer_type {
  XRT_LAYER_PROJECTION , XRT_LAYER_PROJECTION_DEPTH , XRT_LAYER_QUAD , XRT_LAYER_CUBE ,
  XRT_LAYER_CYLINDER , XRT_LAYER_EQUIRECT1 , XRT_LAYER_EQUIRECT2 , XRT_LAYER_PASSTHROUGH
}
 Layer type. More...
 
enum  xrt_layer_composition_flags {
  XRT_LAYER_COMPOSITION_CORRECT_CHROMATIC_ABERRATION_BIT = 1u << 0u , XRT_LAYER_COMPOSITION_BLEND_TEXTURE_SOURCE_ALPHA_BIT = 1u << 1u , XRT_LAYER_COMPOSITION_UNPREMULTIPLIED_ALPHA_BIT = 1u << 2u , XRT_LAYER_COMPOSITION_VIEW_SPACE_BIT = 1u << 3u ,
  XRT_LAYER_COMPOSITION_COLOR_BIAS_SCALE = 1u << 4u , XRT_COMPOSITION_LAYER_PROCESSING_NORMAL_SUPER_SAMPLING_BIT_FB = 1u << 5u , XRT_COMPOSITION_LAYER_PROCESSING_QUALITY_SUPER_SAMPLING_BIT_FB = 1u << 6u , XRT_COMPOSITION_LAYER_PROCESSING_NORMAL_SHARPENING_BIT_FB = 1u << 7u ,
  XRT_COMPOSITION_LAYER_PROCESSING_QUALITY_SHARPENING_BIT_FB = 1u << 8u , XRT_LAYER_COMPOSITION_ADVANCED_BLENDING_BIT = 1u << 9u , XRT_LAYER_COMPOSITION_DEPTH_TEST = 1u << 10u
}
 Bit field for holding information about how a layer should be composited. More...
 
enum  xrt_compare_op_fb {
  XRT_COMPARE_OP_NEVER_FB = 0 , XRT_COMPARE_OP_LESS_FB = 1 , XRT_COMPARE_OP_EQUAL_FB = 2 , XRT_COMPARE_OP_LESS_OR_EQUAL_FB = 3 ,
  XRT_COMPARE_OP_GREATER_FB = 4 , XRT_COMPARE_OP_NOT_EQUAL_FB = 5 , XRT_COMPARE_OP_GREATER_OR_EQUAL_FB = 6 , XRT_COMPARE_OP_ALWAYS_FB = 7 ,
  XRT_COMPARE_OP_MAX_ENUM_FB = 0x7FFFFFFF
}
 XrCompareOpFB. More...
 
enum  xrt_layer_eye_visibility { XRT_LAYER_EYE_VISIBILITY_NONE = 0x0 , XRT_LAYER_EYE_VISIBILITY_LEFT_BIT = 0x1 , XRT_LAYER_EYE_VISIBILITY_RIGHT_BIT = 0x2 , XRT_LAYER_EYE_VISIBILITY_BOTH = 0x3 }
 Which view is the layer visible to? More...
 
enum  xrt_blend_factor {
  XRT_BLEND_FACTOR_ZERO = 0 , XRT_BLEND_FACTOR_ONE = 1 , XRT_BLEND_FACTOR_SRC_ALPHA = 2 , XRT_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 3 ,
  XRT_BLEND_FACTOR_DST_ALPHA = 4 , XRT_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 5 , XRT_BLEND_FACTOR_MAX_ENUM_FB = 0x7FFFFFFF
}
 Blend factors. More...
 
enum  xrt_swapchain_create_flags { XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT = (1u << 0u) , XRT_SWAPCHAIN_CREATE_STATIC_IMAGE = (1u << 1u) }
 Special flags for creating swapchain images. More...
 
enum  xrt_swapchain_usage_bits {
  XRT_SWAPCHAIN_USAGE_COLOR = 0x00000001 , XRT_SWAPCHAIN_USAGE_DEPTH_STENCIL = 0x00000002 , XRT_SWAPCHAIN_USAGE_UNORDERED_ACCESS = 0x00000004 , XRT_SWAPCHAIN_USAGE_TRANSFER_SRC = 0x00000008 ,
  XRT_SWAPCHAIN_USAGE_TRANSFER_DST = 0x00000010 , XRT_SWAPCHAIN_USAGE_SAMPLED = 0x00000020 , XRT_SWAPCHAIN_USAGE_MUTABLE_FORMAT = 0x00000040 , XRT_SWAPCHAIN_USAGE_INPUT_ATTACHMENT = 0x00000080
}
 Usage of the swapchain images. More...
 
enum  xrt_barrier_direction { XRT_BARRIER_TO_APP = 1 , XRT_BARRIER_TO_COMP = 2 }
 The direction of a transition. More...
 
enum  xrt_view_type { XRT_VIEW_TYPE_MONO = 1 , XRT_VIEW_TYPE_STEREO = 2 }
 View type to be rendered to by the compositor. More...
 
enum  xrt_compositor_frame_point { XRT_COMPOSITOR_FRAME_POINT_WOKE }
 
enum  xrt_thread_hint { XRT_THREAD_HINT_APPLICATION_MAIN = 1 , XRT_THREAD_HINT_APPLICATION_WORKER = 2 , XRT_THREAD_HINT_RENDERER_MAIN = 3 , XRT_THREAD_HINT_RENDERER_WORKER = 4 }
 Hints the XR runtime what type of task the thread is doing. More...
 

Functions

Function pointers for extensions
static xrt_result_t xrt_comp_set_thread_hint (struct xrt_compositor *xc, enum xrt_thread_hint hint, uint32_t thread_id)
 Set thread attributes according to thread type. More...
 

Detailed Description