[mutter/wip/carlosg/drop-caps: 4/4] backend/native: Use high priority contexts for secondary GPUs
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/drop-caps: 4/4] backend/native: Use high priority contexts for secondary GPUs
- Date: Fri, 8 Nov 2019 15:04:35 +0000 (UTC)
commit 4a13153da5b7610603584af548d8cf95b303e116
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Nov 8 15:30:53 2019 +0100
backend/native: Use high priority contexts for secondary GPUs
Ensure the context requests EGL_CONTEXT_PRIORITY_HIGH_IMG, and
that we use cogl_egl_create_context() to ensure that is honored.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/923
src/backends/meta-egl.c | 4 +++-
src/backends/native/meta-renderer-native.c | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c
index fdeff4f77..a19bef2b3 100644
--- a/src/backends/meta-egl.c
+++ b/src/backends/meta-egl.c
@@ -35,6 +35,7 @@
#include "backends/meta-backend-private.h"
#include "backends/meta-egl.h"
#include "backends/meta-egl-ext.h"
+#include "cogl/cogl-egl.h"
#include "meta/util.h"
struct _MetaEgl
@@ -508,7 +509,8 @@ meta_egl_create_context (MetaEgl *egl,
{
EGLContext context;
- context = eglCreateContext (display, config, share_context, attrib_list);
+ context = cogl_egl_create_context (display, config,
+ share_context, attrib_list);
if (context == EGL_NO_CONTEXT)
{
set_egl_error (error);
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index 84b6a7323..cd549ece0 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -3509,6 +3509,7 @@ create_secondary_egl_context (MetaEgl *egl,
{
EGLint attributes[] = {
EGL_CONTEXT_CLIENT_VERSION, 3,
+ EGL_CONTEXT_PRIORITY_LEVEL_IMG, EGL_CONTEXT_PRIORITY_HIGH_IMG,
EGL_NONE
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]