mirror of
https://github.com/brl/mutter.git
synced 2025-02-20 06:54:10 +00:00
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
This commit is contained in:
parent
9e54e404ee
commit
4d6f99c95d
@ -35,6 +35,7 @@
|
|||||||
#include "backends/meta-backend-private.h"
|
#include "backends/meta-backend-private.h"
|
||||||
#include "backends/meta-egl.h"
|
#include "backends/meta-egl.h"
|
||||||
#include "backends/meta-egl-ext.h"
|
#include "backends/meta-egl-ext.h"
|
||||||
|
#include "cogl/cogl-egl.h"
|
||||||
#include "meta/util.h"
|
#include "meta/util.h"
|
||||||
|
|
||||||
struct _MetaEgl
|
struct _MetaEgl
|
||||||
@ -506,16 +507,9 @@ meta_egl_create_context (MetaEgl *egl,
|
|||||||
const EGLint *attrib_list,
|
const EGLint *attrib_list,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
EGLContext context;
|
return cogl_egl_create_context (display, config,
|
||||||
|
share_context, attrib_list,
|
||||||
context = eglCreateContext (display, config, share_context, attrib_list);
|
error);
|
||||||
if (context == EGL_NO_CONTEXT)
|
|
||||||
{
|
|
||||||
set_egl_error (error);
|
|
||||||
return EGL_NO_CONTEXT;
|
|
||||||
}
|
|
||||||
|
|
||||||
return context;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -3509,6 +3509,7 @@ create_secondary_egl_context (MetaEgl *egl,
|
|||||||
{
|
{
|
||||||
EGLint attributes[] = {
|
EGLint attributes[] = {
|
||||||
EGL_CONTEXT_CLIENT_VERSION, 3,
|
EGL_CONTEXT_CLIENT_VERSION, 3,
|
||||||
|
EGL_CONTEXT_PRIORITY_LEVEL_IMG, EGL_CONTEXT_PRIORITY_HIGH_IMG,
|
||||||
EGL_NONE
|
EGL_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user