aboutsummaryrefslogtreecommitdiff
path: root/include/render/drm_format_set.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/render/drm_format_set.h')
-rw-r--r--include/render/drm_format_set.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/render/drm_format_set.h b/include/render/drm_format_set.h
index ae1fcc47..78b70e9b 100644
--- a/include/render/drm_format_set.h
+++ b/include/render/drm_format_set.h
@@ -4,5 +4,14 @@
#include <wlr/render/drm_format_set.h>
struct wlr_drm_format *wlr_drm_format_dup(const struct wlr_drm_format *format);
+/**
+ * Intersect modifiers for two DRM formats.
+ *
+ * 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.
+ */
+struct wlr_drm_format *wlr_drm_format_intersect(
+ const struct wlr_drm_format *a, const struct wlr_drm_format *b);
#endif