2020-08-07 19:02:49 +02:00
|
|
|
#ifndef RENDER_DRM_FORMAT_SET_H
|
|
|
|
#define RENDER_DRM_FORMAT_SET_H
|
|
|
|
|
|
|
|
#include <wlr/render/drm_format_set.h>
|
|
|
|
|
2023-05-05 00:26:45 +02:00
|
|
|
void wlr_drm_format_init(struct wlr_drm_format *fmt, uint32_t format);
|
2021-03-31 16:50:17 +02:00
|
|
|
bool wlr_drm_format_has(const struct wlr_drm_format *fmt, uint64_t modifier);
|
2023-05-05 00:17:55 +02:00
|
|
|
bool wlr_drm_format_add(struct wlr_drm_format *fmt, uint64_t modifier);
|
2023-05-10 22:00:22 +02:00
|
|
|
bool wlr_drm_format_copy(struct wlr_drm_format *dst, const struct wlr_drm_format *src);
|
2020-11-25 15:58:37 +01:00
|
|
|
/**
|
2023-05-05 01:24:44 +02:00
|
|
|
* Intersect modifiers for two DRM formats. The `dst` must be zeroed or initialized
|
|
|
|
* with other state being replaced.
|
2020-11-25 15:58:37 +01:00
|
|
|
*
|
|
|
|
* Both arguments must have the same format field. If the formats aren't
|
|
|
|
* compatible, NULL is returned. If either format doesn't support any modifier,
|
|
|
|
* a format that doesn't support any modifier is returned.
|
|
|
|
*/
|
2023-05-05 01:24:44 +02:00
|
|
|
bool wlr_drm_format_intersect(struct wlr_drm_format *dst,
|
2020-11-25 15:58:37 +01:00
|
|
|
const struct wlr_drm_format *a, const struct wlr_drm_format *b);
|
2020-08-07 19:02:49 +02:00
|
|
|
|
2022-12-02 14:32:50 +01:00
|
|
|
bool wlr_drm_format_set_copy(struct wlr_drm_format_set *dst, const struct wlr_drm_format_set *src);
|
|
|
|
|
2020-08-07 19:02:49 +02:00
|
|
|
#endif
|