diff options
author | Simon Ser <contact@emersion.fr> | 2022-09-07 10:49:09 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-09-14 12:13:17 +0200 |
commit | 80cb89aceed4047c1471c60b37f6acbc7d284590 (patch) | |
tree | 5aad1d88190c02d1f8145591ea1b242895703865 | |
parent | 4ad79d05ca1ade5cea2bacd72b4b2ab984c34c0d (diff) |
render/allocator/gbm: log human-readable format and modifier
-rw-r--r-- | render/allocator/gbm.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/render/allocator/gbm.c b/render/allocator/gbm.c index 8c670774..f77fedd8 100644 --- a/render/allocator/gbm.c +++ b/render/allocator/gbm.c @@ -138,9 +138,15 @@ static struct wlr_gbm_buffer *create_buffer(struct wlr_gbm_allocator *alloc, buffer->dmabuf.modifier = fallback_modifier; } - wlr_log(WLR_DEBUG, "Allocated %dx%d GBM buffer (format 0x%"PRIX32", " - "modifier 0x%"PRIX64")", buffer->base.width, buffer->base.height, - buffer->dmabuf.format, buffer->dmabuf.modifier); + char *format_name = drmGetFormatName(buffer->dmabuf.format); + char *modifier_name = drmGetFormatModifierName(buffer->dmabuf.modifier); + wlr_log(WLR_DEBUG, "Allocated %dx%d GBM buffer " + "with format %s (0x%08"PRIX32"), modifier %s (0x%016"PRIX64")", + buffer->base.width, buffer->base.height, + format_name ? format_name : "<unknown>", buffer->dmabuf.format, + modifier_name ? modifier_name : "<unknown>", buffer->dmabuf.modifier); + free(format_name); + free(modifier_name); return buffer; } |