aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-09-07 10:49:25 +0200
committerSimon Ser <contact@emersion.fr>2022-09-14 12:13:17 +0200
commitb5a474189e64c8292407fcbba1afaa6ca29d516f (patch)
tree58952587c48237fe1ff438789d68cdb882cfceda
parent80cb89aceed4047c1471c60b37f6acbc7d284590 (diff)
output/render: log human-readable format
-rw-r--r--types/output/render.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/types/output/render.c b/types/output/render.c
index eaacf8a0..e6e74764 100644
--- a/types/output/render.c
+++ b/types/output/render.c
@@ -4,6 +4,7 @@
#include <wlr/interfaces/wlr_output.h>
#include <wlr/render/interface.h>
#include <wlr/util/log.h>
+#include <xf86drm.h>
#include "backend/backend.h"
#include "render/allocator/allocator.h"
#include "render/drm_format_set.h"
@@ -70,8 +71,10 @@ static bool output_create_swapchain(struct wlr_output *output,
return true;
}
- wlr_log(WLR_DEBUG, "Choosing primary buffer format 0x%"PRIX32" for output '%s'",
- format->format, output->name);
+ char *format_name = drmGetFormatName(format->format);
+ wlr_log(WLR_DEBUG, "Choosing primary buffer format %s (0x%08"PRIX32") for output '%s'",
+ format_name ? format_name : "<unknown>", format->format, output->name);
+ free(format_name);
if (!allow_modifiers && (format->len != 1 || format->modifiers[0] != DRM_FORMAT_MOD_LINEAR)) {
if (!wlr_drm_format_has(format, DRM_FORMAT_MOD_INVALID)) {