|
|
e82d74 |
From 63455680096e015eaf023760466593b6f42f9cf5 Mon Sep 17 00:00:00 2001
|
|
|
e82d74 |
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
|
|
e82d74 |
Date: Thu, 12 Sep 2019 11:50:34 +0200
|
|
|
e82d74 |
Subject: [PATCH 2/4] renderer/native: Add API to get primary GPU
|
|
|
e82d74 |
|
|
|
e82d74 |
Will be used when acquiring scanouts from Wayland buffers.
|
|
|
e82d74 |
|
|
|
e82d74 |
https://gitlab.gnome.org/GNOME/mutter/merge_requests/798
|
|
|
e82d74 |
---
|
|
|
e82d74 |
src/backends/native/meta-renderer-native.c | 6 ++++++
|
|
|
e82d74 |
src/backends/native/meta-renderer-native.h | 2 ++
|
|
|
e82d74 |
2 files changed, 8 insertions(+)
|
|
|
e82d74 |
|
|
|
e82d74 |
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
|
|
|
e82d74 |
index dbb88edb8e..25833b6cf6 100644
|
|
|
e82d74 |
--- a/src/backends/native/meta-renderer-native.c
|
|
|
e82d74 |
+++ b/src/backends/native/meta-renderer-native.c
|
|
|
e82d74 |
@@ -317,6 +317,12 @@ meta_gbm_device_from_gpu (MetaGpuKms *gpu_kms)
|
|
|
e82d74 |
return renderer_gpu_data->gbm.device;
|
|
|
e82d74 |
}
|
|
|
e82d74 |
|
|
|
e82d74 |
+MetaGpuKms *
|
|
|
e82d74 |
+meta_renderer_native_get_primary_gpu (MetaRendererNative *renderer_native)
|
|
|
e82d74 |
+{
|
|
|
e82d74 |
+ return renderer_native->primary_gpu_kms;
|
|
|
e82d74 |
+}
|
|
|
e82d74 |
+
|
|
|
e82d74 |
static MetaRendererNativeGpuData *
|
|
|
e82d74 |
meta_create_renderer_native_gpu_data (MetaGpuKms *gpu_kms)
|
|
|
e82d74 |
{
|
|
|
e82d74 |
diff --git a/src/backends/native/meta-renderer-native.h b/src/backends/native/meta-renderer-native.h
|
|
|
e82d74 |
index 9eecdead1c..b59366e267 100644
|
|
|
e82d74 |
--- a/src/backends/native/meta-renderer-native.h
|
|
|
e82d74 |
+++ b/src/backends/native/meta-renderer-native.h
|
|
|
e82d74 |
@@ -53,6 +53,8 @@ struct gbm_device * meta_gbm_device_from_gpu (MetaGpuKms *gpu_kms);
|
|
|
e82d74 |
|
|
|
e82d74 |
gboolean meta_renderer_native_supports_mirroring (MetaRendererNative *renderer_native);
|
|
|
e82d74 |
|
|
|
e82d74 |
+MetaGpuKms * meta_renderer_native_get_primary_gpu (MetaRendererNative *renderer_native);
|
|
|
e82d74 |
+
|
|
|
e82d74 |
void meta_renderer_native_finish_frame (MetaRendererNative *renderer_native);
|
|
|
e82d74 |
|
|
|
e82d74 |
int64_t meta_renderer_native_get_frame_counter (MetaRendererNative *renderer_native);
|
|
|
e82d74 |
--
|
|
|
e82d74 |
2.26.2
|
|
|
e82d74 |
|