diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index e0c198b4d3..9346ee8467 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -2002,7 +2002,7 @@ gdk_display_init_dmabuf (GdkDisplay *self) self->dmabuf_formats = gdk_dmabuf_formats_builder_free_to_formats (builder); GDK_DISPLAY_DEBUG (self, DMABUF, - "Initialized support for %zu dmabuf formats", + "Initialization finished. Advertising %zu dmabuf formats", gdk_dmabuf_formats_get_n_formats (self->dmabuf_formats)); } diff --git a/gdk/gdkdmabuf.c b/gdk/gdkdmabuf.c index c609c2fad6..de8d7d6df0 100644 --- a/gdk/gdkdmabuf.c +++ b/gdk/gdkdmabuf.c @@ -2068,7 +2068,7 @@ gdk_dmabuf_get_mmap_formats (void) continue; GDK_DEBUG (DMABUF, - "mmap dmabuf format %.4s:%#0" G_GINT64_MODIFIER "x", + "mmap advertises dmabuf format %.4s::%016" G_GINT64_MODIFIER "x", (char *) &supported_formats[i].fourcc, (guint64) DRM_FORMAT_MOD_LINEAR); gdk_dmabuf_formats_builder_add_format (builder, diff --git a/gdk/gdkdmabufegl.c b/gdk/gdkdmabufegl.c index 452746da13..50ab874b6a 100644 --- a/gdk/gdkdmabufegl.c +++ b/gdk/gdkdmabufegl.c @@ -94,20 +94,22 @@ gdk_dmabuf_egl_downloader_collect_formats (GdkDisplay *display, for (int j = 0; j < num_modifiers; j++) { - /* All linear formats we support are already added my the mmap downloader. + /* All linear formats we support are already advertised by the mmap downloader. * We don't add external formats, unless we can use them (via GLES) */ - if (modifiers[j] != DRM_FORMAT_MOD_LINEAR && - (!external_only[j] || gdk_gl_context_get_use_es (context))) - { - GDK_DISPLAY_DEBUG (display, DMABUF, - "%s EGL dmabuf format %.4s:%#" G_GINT64_MODIFIER "x", - external_only[j] ? "external " : "", - (char *) &fourccs[i], - modifiers[j]); + gboolean advertise = modifiers[j] != DRM_FORMAT_MOD_LINEAR && + (!external_only[j] || gdk_gl_context_get_use_es (context)); + + GDK_DISPLAY_DEBUG (display, DMABUF, + "EGL %s %sdmabuf format %.4s::%016" G_GINT64_MODIFIER "x", + advertise ? "advertises" : "supports", + external_only[j] ? "external " : "", + (char *) &fourccs[i], + modifiers[j]); + + if (advertise) + gdk_dmabuf_formats_builder_add_format (formats, fourccs[i], modifiers[j]); - gdk_dmabuf_formats_builder_add_format (formats, fourccs[i], modifiers[j]); - } if (!external_only[j]) { gdk_dmabuf_formats_builder_add_format (internal, fourccs[i], modifiers[j]); diff --git a/gdk/gdkvulkancontext.c b/gdk/gdkvulkancontext.c index a9f27eb7fb..fdfecd8400 100644 --- a/gdk/gdkvulkancontext.c +++ b/gdk/gdkvulkancontext.c @@ -1911,19 +1911,20 @@ gdk_vulkan_init_dmabuf (GdkDisplay *display) g_warn_if_fail (modifier_props.drmFormatModifierCount < sizeof (modifier_list)); for (j = 0; j < modifier_props.drmFormatModifierCount; j++) { + gboolean advertise = modifier_list[j].drmFormatModifier != DRM_FORMAT_MOD_LINEAR; + GDK_DISPLAY_DEBUG (display, DMABUF, - "Vulkan supports dmabuf format %.4s::%016llx with %u planes and features 0x%x", + "Vulkan %s dmabuf format %.4s::%016"G_GINT64_MODIFIER"x with %u planes and features 0x%x", + advertise ? "advertises" : "supports", (char *) &fourcc, - (long long unsigned) modifier_list[j].drmFormatModifier, + modifier_list[j].drmFormatModifier, modifier_list[j].drmFormatModifierPlaneCount, modifier_list[j].drmFormatModifierTilingFeatures); - if (modifier_list[j].drmFormatModifier == DRM_FORMAT_MOD_LINEAR) - continue; - - gdk_dmabuf_formats_builder_add_format (vulkan_builder, - fourcc, - modifier_list[j].drmFormatModifier); + if (advertise) + gdk_dmabuf_formats_builder_add_format (vulkan_builder, + fourcc, + modifier_list[j].drmFormatModifier); } }