From a6c0441ee060c7045b24aff943c7d0bf0f47412b Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 8 Jan 2025 08:21:58 +0100 Subject: [PATCH] config/output: don't hardcode DMA-BUF in search_render_format() We could be running with a backend which doesn't support DMA-BUFs, e.g. inside a parent Wayland compositor without GPU acceleration. --- sway/config/output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sway/config/output.c b/sway/config/output.c index 9ae2ee6a9..277084762 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -773,7 +774,7 @@ static bool search_render_format(struct search_context *ctx, size_t output_idx) } const struct wlr_drm_format_set *primary_formats = - wlr_output_get_primary_formats(wlr_output, WLR_BUFFER_CAP_DMABUF); + wlr_output_get_primary_formats(wlr_output, server.allocator->buffer_caps); enum render_bit_depth needed_bits = RENDER_BIT_DEPTH_8; if (cfg->config && cfg->config->render_bit_depth != RENDER_BIT_DEPTH_DEFAULT) { needed_bits = cfg->config->render_bit_depth;