summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2019-11-08 15:30:53 +0100
committerCarlos Garnacho <carlosg@gnome.org>2019-11-13 15:12:12 +0100
commit4d6f99c95dc689d92871709b4d2e9e363f6b1e57 (patch)
tree94a18af448c8e0aef1d5da5af42335b7d051897c
parent9e54e404ee77c9cdd5fa7dfd10481f685a0f70e1 (diff)
downloadmutter-wip/carlosg/drop-caps.tar.gz
backend/native: Use high priority contexts for secondary GPUswip/carlosg/drop-caps
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
-rw-r--r--src/backends/meta-egl.c14
-rw-r--r--src/backends/native/meta-renderer-native.c1
2 files changed, 5 insertions, 10 deletions
diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c
index fdeff4f77..5f9a8d244 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
@@ -506,16 +507,9 @@ meta_egl_create_context (MetaEgl *egl,
const EGLint *attrib_list,
GError **error)
{
- EGLContext context;
-
- context = eglCreateContext (display, config, share_context, attrib_list);
- if (context == EGL_NO_CONTEXT)
- {
- set_egl_error (error);
- return EGL_NO_CONTEXT;
- }
-
- return context;
+ return cogl_egl_create_context (display, config,
+ share_context, attrib_list,
+ error);
}
gboolean
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
};