23 #define NUM_FRAME_TIMES 50 114 int64_t times_ns[NUM_FRAME_TIMES];
117 float timings_ms[NUM_FRAME_TIMES];
123 } compositor_frame_times;
187 uint32_t sample_count,
214 ...) XRT_PRINTF_FORMAT(3, 4);
221 #define COMP_SPEW(c, ...) \ 223 if (c->settings.print_spew) { \ 224 comp_compositor_print(c, __func__, __VA_ARGS__); \ 233 #define COMP_DEBUG(c, ...) \ 235 if (c->settings.print_debug) { \ 236 comp_compositor_print(c, __func__, __VA_ARGS__); \ 245 #define COMP_PRINT_MODE(c, ...) \ 247 if (c->settings.print_modes) { \ 248 comp_compositor_print(c, __func__, __VA_ARGS__); \ 257 #define COMP_ERROR(c, ...) \ 259 comp_compositor_print(c, __func__, __VA_ARGS__); \ VkImageView * views
Views used by the renderer and distortion code, for each array layer.
Definition: comp_compositor.h:46
Main compositor.
Definition: xrt_compositor.h:474
int64_t expected_app_duration_ns
Estimated rendering time per frame of the application.
Definition: comp_compositor.h:132
Settings for the compositor.
Definition: comp_settings.h:53
struct comp_window * window
The window or display we are using.
Definition: comp_compositor.h:81
struct xrt_swapchain * comp_swapchain_create(struct xrt_compositor *xc, enum xrt_swapchain_create_flags create, enum xrt_swapchain_usage_bits bits, int64_t format, uint32_t sample_count, uint32_t width, uint32_t height, uint32_t face_count, uint32_t array_size, uint32_t mip_count)
A compositor function that is implemented in the swapchain code.
Definition: comp_swapchain.c:215
int64_t last_frame_time_ns
Timestamp of last-rendered (immersive) frame.
Definition: comp_compositor.h:93
Settings struct for compositor header.
Main compositor struct tying everything in the compositor together.
Definition: comp_compositor.h:70
A swapchain that exposes fd to be imported into a client API.
Definition: xrt_compositor.h:462
void comp_compositor_print(struct comp_compositor *c, const char *func, const char *fmt,...) XRT_PRINTF_FORMAT(3
Printer helper.
VkDeviceMemory memory
Exported memory backing the image.
Definition: comp_compositor.h:41
int64_t last_next_display_time
The last time we provided in the results of wait_frame.
Definition: comp_compositor.h:134
Holds associated vulkan objects and state to render with a distortion.
Definition: comp_renderer.c:33
VkSampler sampler
Sampler used by the renderer and distortion code.
Definition: comp_compositor.h:43
xrt_swapchain_usage_bits
Usage of the swapchain images.
Definition: xrt_compositor.h:48
A single swapchain image, holds the needed state for tracking image usage.
Definition: comp_compositor.h:36
float fps
Average FPS of last NUM_FRAME_TIMES rendered frames.
Definition: comp_compositor.h:120
Common swapchain base.
Definition: xrt_compositor.h:75
void comp_swapchain_image_cleanup(struct vk_bundle *vk, uint32_t array_size, struct comp_swapchain_image *image)
Free and destroy any initialized fields on the given image, safe to pass in images that has one or al...
Definition: comp_swapchain.c:308
struct comp_renderer * r
Renderer helper.
Definition: comp_compositor.h:78
Compositor rendering code header.
uint32_t array_size
Number of array layers per image.
Definition: xrt_compositor.h:85
Common compositor base.
Definition: xrt_compositor.h:116
A output device or a window, often directly connected to the device.
Definition: comp_window.h:32
int64_t frame_overhead_ns
The time our compositor needs to do rendering.
Definition: comp_compositor.h:106
Compositor window header.
struct xrt_compositor * client
A link back to the compositor we are presenting to the client.
Definition: comp_compositor.h:75
Header defining a XRT graphics provider.
int index
Current Index for times_ns.
Definition: comp_compositor.h:111
struct xrt_device * xdev
The device we are displaying to.
Definition: comp_compositor.h:84
A swapchain that is almost a one to one mapping to a OpenXR swapchain.
Definition: comp_compositor.h:56
VkImage image
Vulkan image to create view from.
Definition: comp_compositor.h:39
A single HMD or input device.
Definition: xrt_device.h:203
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code...
Definition: vk_helpers.h:34
xrt_swapchain_create_flags
Special flags for creating swapchain images.
Definition: xrt_compositor.h:38