mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
render/allocator/gbm: log human-readable format and modifier
This commit is contained in:
parent
4ad79d05ca
commit
80cb89acee
1 changed files with 9 additions and 3 deletions
|
@ -138,9 +138,15 @@ static struct wlr_gbm_buffer *create_buffer(struct wlr_gbm_allocator *alloc,
|
||||||
buffer->dmabuf.modifier = fallback_modifier;
|
buffer->dmabuf.modifier = fallback_modifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_log(WLR_DEBUG, "Allocated %dx%d GBM buffer (format 0x%"PRIX32", "
|
char *format_name = drmGetFormatName(buffer->dmabuf.format);
|
||||||
"modifier 0x%"PRIX64")", buffer->base.width, buffer->base.height,
|
char *modifier_name = drmGetFormatModifierName(buffer->dmabuf.modifier);
|
||||||
buffer->dmabuf.format, 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;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue