aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--types/output/render.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/types/output/render.c b/types/output/render.c
index 97c62a58..985b93a9 100644
--- a/types/output/render.c
+++ b/types/output/render.c
@@ -74,7 +74,14 @@ static bool output_create_swapchain(struct wlr_output *output,
format->format, output->name);
if (!allow_modifiers && (format->len != 1 || format->modifiers[0] != DRM_FORMAT_MOD_LINEAR)) {
+ if (!wlr_drm_format_has(format, DRM_FORMAT_MOD_INVALID)) {
+ wlr_log(WLR_DEBUG, "Implicit modifiers not supported");
+ free(format);
+ return false;
+ }
+
format->len = 0;
+ wlr_drm_format_add(&format, DRM_FORMAT_MOD_INVALID);
}
struct wlr_swapchain *swapchain =