mirror of
https://github.com/brl/mutter.git
synced 2025-05-01 22:29:38 +00:00
wayland-dma-buf: Add debug logging of pixel format in use
Enable it with environment `MUTTER_DEBUG=wayland`. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1387
This commit is contained in:
parent
716ecf6cdf
commit
e480d0c71e
@ -53,6 +53,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_NATIVE_BACKEND
|
#ifdef HAVE_NATIVE_BACKEND
|
||||||
#include "backends/native/meta-drm-buffer-gbm.h"
|
#include "backends/native/meta-drm-buffer-gbm.h"
|
||||||
|
#include "backends/native/meta-kms-utils.h"
|
||||||
#include "backends/native/meta-renderer-native.h"
|
#include "backends/native/meta-renderer-native.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -96,6 +97,7 @@ meta_wayland_dma_buf_realize_texture (MetaWaylandBuffer *buffer,
|
|||||||
EGLImageKHR egl_image;
|
EGLImageKHR egl_image;
|
||||||
CoglEglImageFlags flags;
|
CoglEglImageFlags flags;
|
||||||
CoglTexture2D *texture;
|
CoglTexture2D *texture;
|
||||||
|
MetaDrmFormatBuf format_buf;
|
||||||
|
|
||||||
if (buffer->dma_buf.texture)
|
if (buffer->dma_buf.texture)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -139,6 +141,12 @@ meta_wayland_dma_buf_realize_texture (MetaWaylandBuffer *buffer,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
meta_topic (META_DEBUG_WAYLAND,
|
||||||
|
"[dma-buf] wl_buffer@%u DRM format %s -> CoglPixelFormat %s",
|
||||||
|
wl_resource_get_id (meta_wayland_buffer_get_resource (buffer)),
|
||||||
|
meta_drm_format_to_string (&format_buf, dma_buf->drm_format),
|
||||||
|
cogl_pixel_format_to_string (cogl_format));
|
||||||
|
|
||||||
for (n_planes = 0; n_planes < META_WAYLAND_DMA_BUF_MAX_FDS; n_planes++)
|
for (n_planes = 0; n_planes < META_WAYLAND_DMA_BUF_MAX_FDS; n_planes++)
|
||||||
{
|
{
|
||||||
if (dma_buf->fds[n_planes] < 0)
|
if (dma_buf->fds[n_planes] < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user