diff options
author | Simon Ser <contact@emersion.fr> | 2021-12-01 14:03:37 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-12-01 14:03:37 +0100 |
commit | ffd4a27714833826542e1b083b3f3ad431f49107 (patch) | |
tree | 15d91b12d448bdf0215624b80a5f8ca3d1e30c57 | |
parent | 812ab2e716dc7c1ac906a206709ce009ae30c45c (diff) |
render/egl: store IMG_context_priority in wlr_egl
The next commit will split extension lookup and context
initialization.
-rw-r--r-- | include/wlr/render/egl.h | 1 | ||||
-rw-r--r-- | render/egl.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h index 903b70a3..8db0718a 100644 --- a/include/wlr/render/egl.h +++ b/include/wlr/render/egl.h @@ -40,6 +40,7 @@ struct wlr_egl { bool KHR_image_base; bool EXT_image_dma_buf_import; bool EXT_image_dma_buf_import_modifiers; + bool IMG_context_priority; // Device extensions bool EXT_device_drm; diff --git a/render/egl.c b/render/egl.c index 9dae0724..a7b39cc2 100644 --- a/render/egl.c +++ b/render/egl.c @@ -324,6 +324,9 @@ static bool egl_init(struct wlr_egl *egl, EGLenum platform, return false; } + egl->exts.IMG_context_priority = + check_egl_ext(display_exts_str, "EGL_IMG_context_priority"); + wlr_log(WLR_INFO, "Supported EGL display extensions: %s", display_exts_str); if (device_exts_str != NULL) { wlr_log(WLR_INFO, "Supported EGL device extensions: %s", device_exts_str); @@ -336,9 +339,6 @@ static bool egl_init(struct wlr_egl *egl, EGLenum platform, init_dmabuf_formats(egl); - bool ext_context_priority = - check_egl_ext(display_exts_str, "EGL_IMG_context_priority"); - size_t atti = 0; EGLint attribs[5]; attribs[atti++] = EGL_CONTEXT_CLIENT_VERSION; @@ -346,7 +346,7 @@ static bool egl_init(struct wlr_egl *egl, EGLenum platform, // Request a high priority context if possible // TODO: only do this if we're running as the DRM master - bool request_high_priority = ext_context_priority; + bool request_high_priority = egl->exts.IMG_context_priority; // Try to reschedule all of our rendering to be completed first. If it // fails, it will fallback to the default priority (MEDIUM). |