26 #define NUM_FRAME_TIMES 50 126 } compositor_frame_times;
205 uint32_t sample_count,
249 #define COMP_SPEW(c, ...) \ 251 if (c->settings.print_spew) { \ 252 comp_compositor_print(c, __func__, __VA_ARGS__); \ 261 #define COMP_DEBUG(c, ...) \ 263 if (c->settings.print_debug) { \ 264 comp_compositor_print(c, __func__, __VA_ARGS__); \ 273 #define COMP_PRINT_MODE(c, ...) \ 275 if (c->settings.print_modes) { \ 276 comp_compositor_print(c, __func__, __VA_ARGS__); \ 285 #define COMP_ERROR(c, ...) \ 287 comp_compositor_print(c, __func__, __VA_ARGS__); \ struct u_var_timing * debug_var
Definition: comp_compositor.h:125
VkImageView * views
Views used by the renderer and distortion code, for each array layer.
Definition: comp_compositor.h:49
Main compositor.
Definition: xrt_compositor.h:527
int64_t expected_app_duration_ns
Estimated rendering time per frame of the application.
Definition: comp_compositor.h:135
Settings for the compositor.
Definition: comp_settings.h:56
struct comp_window * window
The window or display we are using.
Definition: comp_compositor.h:84
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:210
void comp_compositor_garbage_collect(struct comp_compositor *c)
Do garbage collection, destroying any resources that has been scheduled for destruction from other th...
Definition: comp_compositor.c:891
uint64_t VkImage
Definition: xrt_compositor.h:452
int64_t last_frame_time_ns
Timestamp of last-rendered (immersive) frame.
Definition: comp_compositor.h:96
int64_t last_end
Definition: comp_compositor.h:105
struct xrt_swapchain base
Definition: xrt_compositor.h:517
Settings struct for compositor header.
Main compositor struct tying everything in the compositor together.
Definition: comp_compositor.h:73
A swapchain that exposes fd to be imported into a client API.
Definition: xrt_compositor.h:515
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:44
int64_t last_next_display_time
The last time we provided in the results of wait_frame.
Definition: comp_compositor.h:137
Holds associated vulkan objects and state to render with a distortion.
Definition: comp_renderer.c:33
struct comp_compositor * c
Definition: comp_compositor.h:63
VkSampler sampler
Sampler used by the renderer and distortion code.
Definition: comp_compositor.h:46
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:39
float fps
Average FPS of last NUM_FRAME_TIMES rendered frames.
Definition: comp_compositor.h:123
#define NUM_FRAME_TIMES
Definition: comp_compositor.h:26
Common swapchain base.
Definition: xrt_compositor.h:75
uint32_t height
Definition: comp_compositor.h:147
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:303
uint64_t VkDeviceMemory
Definition: xrt_compositor.h:453
struct comp_renderer * r
Renderer helper.
Definition: comp_compositor.h:81
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:169
A output device or a window, often directly connected to the device.
Definition: comp_window.h:32
uint32_t width
Definition: comp_compositor.h:146
#define XRT_MAX_SWAPCHAIN_IMAGES
Max swapchain images, artificial limit.
Definition: xrt_compositor.h:24
int64_t frame_overhead_ns
The time our compositor needs to do rendering.
Definition: comp_compositor.h:109
Compositor window header.
struct xrt_compositor * client
A link back to the compositor we are presenting to the client.
Definition: comp_compositor.h:78
Header defining a XRT graphics provider.
void comp_swapchain_really_destroy(struct comp_swapchain *sc)
Swapchain destruct is delayed until it is safe to destroy them, this function does the actual destruc...
Definition: comp_swapchain.c:340
int64_t last_begin
Definition: comp_compositor.h:104
Slightly higher level thread safe helpers.
int index
Current Index for times_ns.
Definition: comp_compositor.h:114
struct xrt_compositor base
Definition: xrt_compositor.h:529
struct xrt_device * xdev
The device we are displaying to.
Definition: comp_compositor.h:87
#define XRT_PRINTF_FORMAT(fmt, list)
Definition: xrt_compiler.h:40
A swapchain that is almost a one to one mapping to a OpenXR swapchain.
Definition: comp_compositor.h:59
VkImage image
Vulkan image to create view from.
Definition: comp_compositor.h:42
A single HMD or input device.
Definition: xrt_device.h:202
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code...
Definition: vk_helpers.h:34
Definition: u_threading.h:16
xrt_swapchain_create_flags
Special flags for creating swapchain images.
Definition: xrt_compositor.h:38