kathenas / rpms / mutter

Forked from rpms/mutter 5 years ago
Clone

Blame SOURCES/0002-renderer-native-Add-API-to-get-primary-GPU.patch

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