|
|
5c9faf |
From fa70ee1cd78e2b161545bc47a1c1083063030f77 Mon Sep 17 00:00:00 2001
|
|
|
5c9faf |
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
|
|
5c9faf |
Date: Mon, 11 Oct 2021 10:52:43 +0200
|
|
|
5c9faf |
Subject: [PATCH 1/5] renderer/native: Log render mode per device
|
|
|
5c9faf |
|
|
|
5c9faf |
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2051>
|
|
|
5c9faf |
(cherry picked from commit e8249a572d669c4c0a8464d6bce556b2cbaca4ef)
|
|
|
5c9faf |
(cherry picked from commit fe0ea79b83256d80f1dee1e4a49c94a5d6fd18a6)
|
|
|
5c9faf |
---
|
|
|
5c9faf |
src/backends/native/meta-renderer-native.c | 30 ++++++++++++++++++++++
|
|
|
5c9faf |
1 file changed, 30 insertions(+)
|
|
|
5c9faf |
|
|
|
5c9faf |
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
|
|
|
5c9faf |
index 735c37202..f92f648e5 100644
|
|
|
5c9faf |
--- a/src/backends/native/meta-renderer-native.c
|
|
|
5c9faf |
+++ b/src/backends/native/meta-renderer-native.c
|
|
|
5c9faf |
@@ -1808,6 +1808,24 @@ meta_renderer_native_create_renderer_gpu_data (MetaRendererNative *renderer_nat
|
|
|
5c9faf |
return NULL;
|
|
|
5c9faf |
}
|
|
|
5c9faf |
|
|
|
5c9faf |
+static const char *
|
|
|
5c9faf |
+renderer_data_mode_to_string (MetaRendererNativeMode mode)
|
|
|
5c9faf |
+{
|
|
|
5c9faf |
+ switch (mode)
|
|
|
5c9faf |
+ {
|
|
|
5c9faf |
+ case META_RENDERER_NATIVE_MODE_GBM:
|
|
|
5c9faf |
+ return "gbm";
|
|
|
5c9faf |
+ case META_RENDERER_NATIVE_MODE_SURFACELESS:
|
|
|
5c9faf |
+ return "surfaceless";
|
|
|
5c9faf |
+#ifdef HAVE_EGL_DEVICE
|
|
|
5c9faf |
+ case META_RENDERER_NATIVE_MODE_EGL_DEVICE:
|
|
|
5c9faf |
+ return "egldevice";
|
|
|
5c9faf |
+#endif
|
|
|
5c9faf |
+ }
|
|
|
5c9faf |
+
|
|
|
5c9faf |
+ g_assert_not_reached ();
|
|
|
5c9faf |
+}
|
|
|
5c9faf |
+
|
|
|
5c9faf |
static gboolean
|
|
|
5c9faf |
create_renderer_gpu_data (MetaRendererNative *renderer_native,
|
|
|
5c9faf |
MetaGpuKms *gpu_kms,
|
|
|
5c9faf |
@@ -1822,6 +1840,18 @@ create_renderer_gpu_data (MetaRendererNative *renderer_native,
|
|
|
5c9faf |
if (!renderer_gpu_data)
|
|
|
5c9faf |
return FALSE;
|
|
|
5c9faf |
|
|
|
5c9faf |
+ if (gpu_kms)
|
|
|
5c9faf |
+ {
|
|
|
5c9faf |
+ g_message ("Created %s renderer for '%s'",
|
|
|
5c9faf |
+ renderer_data_mode_to_string (renderer_gpu_data->mode),
|
|
|
5c9faf |
+ meta_gpu_kms_get_file_path (gpu_kms));
|
|
|
5c9faf |
+ }
|
|
|
5c9faf |
+ else
|
|
|
5c9faf |
+ {
|
|
|
5c9faf |
+ g_message ("Created %s renderer without GPU",
|
|
|
5c9faf |
+ renderer_data_mode_to_string (renderer_gpu_data->mode));
|
|
|
5c9faf |
+ }
|
|
|
5c9faf |
+
|
|
|
5c9faf |
g_hash_table_insert (renderer_native->gpu_datas,
|
|
|
5c9faf |
gpu_kms,
|
|
|
5c9faf |
renderer_gpu_data);
|
|
|
5c9faf |
--
|
|
|
5c9faf |
2.35.1
|
|
|
5c9faf |
|