render: add explicit sync API

This commit is contained in:
Simon Ser 2023-07-10 10:53:12 +02:00
parent 4481c6b243
commit a1635fdb76
2 changed files with 28 additions and 0 deletions

View File

@ -33,6 +33,17 @@ struct wlr_buffer_pass_options {
/* Color transform to apply to the output of the render pass,
* leave NULL to indicate sRGB/no custom transform */
struct wlr_color_transform *color_transform;
/* Signal a timeline synchronization point when the render pass completes.
*
* When a compositor provides a signal timeline, the renderer may skip
* implicit signal synchronization.
*
* Support for this feature is advertised by features.timeline in
* struct wlr_renderer.
*/
struct wlr_drm_syncobj_timeline *signal_timeline;
uint64_t signal_point;
};
/**
@ -88,6 +99,17 @@ struct wlr_render_texture_options {
enum wlr_scale_filter_mode filter_mode;
/* Blend mode */
enum wlr_render_blend_mode blend_mode;
/* Wait for a timeline synchronization point before texturing.
*
* When a compositor provides a wait timeline, the renderer may skip
* implicit wait synchronization.
*
* Support for this feature is advertised by features.timeline in
* struct wlr_renderer.
*/
struct wlr_drm_syncobj_timeline *wait_timeline;
uint64_t wait_point;
};
/**

View File

@ -45,6 +45,12 @@ struct wlr_renderer {
* Does the renderer support color transforms on its output?
*/
bool output_color_transform;
/**
* Whether wait/signal timelines are supported.
*
* See struct wlr_drm_syncobj_timeline.
*/
bool timeline;
} features;
// private state