[mutter] renderer/native: Log render mode per device
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] renderer/native: Log render mode per device
- Date: Tue, 19 Oct 2021 16:45:39 +0000 (UTC)
commit e8249a572d669c4c0a8464d6bce556b2cbaca4ef
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Mon Oct 11 10:52:43 2021 +0200
renderer/native: Log render mode per device
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2051>
src/backends/native/meta-renderer-native.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index 752c924743..20b2ae34a7 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -1721,6 +1721,24 @@ meta_renderer_native_create_renderer_gpu_data (MetaRendererNative *renderer_nat
return NULL;
}
+static const char *
+renderer_data_mode_to_string (MetaRendererNativeMode mode)
+{
+ switch (mode)
+ {
+ case META_RENDERER_NATIVE_MODE_GBM:
+ return "gbm";
+ case META_RENDERER_NATIVE_MODE_SURFACELESS:
+ return "surfaceless";
+#ifdef HAVE_EGL_DEVICE
+ case META_RENDERER_NATIVE_MODE_EGL_DEVICE:
+ return "egldevice";
+#endif
+ }
+
+ g_assert_not_reached ();
+}
+
static gboolean
create_renderer_gpu_data (MetaRendererNative *renderer_native,
MetaGpuKms *gpu_kms,
@@ -1735,6 +1753,18 @@ create_renderer_gpu_data (MetaRendererNative *renderer_native,
if (!renderer_gpu_data)
return FALSE;
+ if (gpu_kms)
+ {
+ g_message ("Created %s renderer for '%s'",
+ renderer_data_mode_to_string (renderer_gpu_data->mode),
+ meta_gpu_kms_get_file_path (gpu_kms));
+ }
+ else
+ {
+ g_message ("Created %s renderer without GPU",
+ renderer_data_mode_to_string (renderer_gpu_data->mode));
+ }
+
g_hash_table_insert (renderer_native->gpu_datas,
gpu_kms,
renderer_gpu_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]