mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
render/egl: log whether DMA-BUF modifiers are supported
This commit is contained in:
parent
f1d37c54c8
commit
01d21cdd9f
1 changed files with 6 additions and 1 deletions
|
@ -104,6 +104,7 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool has_modifiers = false;
|
||||||
for (int i = 0; i < formats_len; i++) {
|
for (int i = 0; i < formats_len; i++) {
|
||||||
uint32_t fmt = formats[i];
|
uint32_t fmt = formats[i];
|
||||||
|
|
||||||
|
@ -115,6 +116,8 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
has_modifiers = has_modifiers || modifiers_len > 0;
|
||||||
|
|
||||||
if (modifiers_len == 0) {
|
if (modifiers_len == 0) {
|
||||||
wlr_drm_format_set_add(&egl->dmabuf_texture_formats, fmt,
|
wlr_drm_format_set_add(&egl->dmabuf_texture_formats, fmt,
|
||||||
DRM_FORMAT_MOD_INVALID);
|
DRM_FORMAT_MOD_INVALID);
|
||||||
|
@ -143,7 +146,9 @@ static void init_dmabuf_formats(struct wlr_egl *egl) {
|
||||||
snprintf(&str_formats[i*5], (formats_len - i) * 5 + 1, "%.4s ",
|
snprintf(&str_formats[i*5], (formats_len - i) * 5 + 1, "%.4s ",
|
||||||
(char*)&formats[i]);
|
(char*)&formats[i]);
|
||||||
}
|
}
|
||||||
wlr_log(WLR_DEBUG, "Supported dmabuf buffer formats: %s", str_formats);
|
wlr_log(WLR_DEBUG, "Supported DMA-BUF formats: %s", str_formats);
|
||||||
|
wlr_log(WLR_DEBUG, "EGL DMA-BUF format modifiers %s",
|
||||||
|
has_modifiers ? "supported" : "unsupported");
|
||||||
free(str_formats);
|
free(str_formats);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
Loading…
Reference in a new issue