mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-13 08:22:16 -04:00
Merge branch 'egl-context-flush-control' into 'master'
render/egl: disable implicit flush on context change See merge request wlroots/wlroots!5303
This commit is contained in:
commit
009a8b864b
2 changed files with 9 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ struct wlr_egl {
|
|||
bool EXT_image_dma_buf_import_modifiers;
|
||||
bool IMG_context_priority;
|
||||
bool EXT_create_context_robustness;
|
||||
bool KHR_context_flush_control;
|
||||
|
||||
// Device extensions
|
||||
bool EXT_device_drm;
|
||||
|
|
|
|||
|
|
@ -295,6 +295,8 @@ static bool egl_init_display(struct wlr_egl *egl, EGLDisplay display,
|
|||
|
||||
egl->exts.EXT_create_context_robustness =
|
||||
check_egl_ext(display_exts_str, "EGL_EXT_create_context_robustness");
|
||||
egl->exts.KHR_context_flush_control =
|
||||
check_egl_ext(display_exts_str, "EGL_KHR_context_flush_control");
|
||||
|
||||
const char *device_exts_str = NULL, *driver_name = NULL;
|
||||
if (egl->exts.EXT_device_query) {
|
||||
|
|
@ -409,7 +411,7 @@ static bool egl_init(struct wlr_egl *egl, EGLenum platform,
|
|||
}
|
||||
|
||||
size_t atti = 0;
|
||||
EGLint attribs[7];
|
||||
EGLint attribs[32];
|
||||
attribs[atti++] = EGL_CONTEXT_CLIENT_VERSION;
|
||||
attribs[atti++] = 2;
|
||||
|
||||
|
|
@ -429,6 +431,11 @@ static bool egl_init(struct wlr_egl *egl, EGLenum platform,
|
|||
attribs[atti++] = EGL_LOSE_CONTEXT_ON_RESET_EXT;
|
||||
}
|
||||
|
||||
if (egl->exts.KHR_context_flush_control) {
|
||||
attribs[atti++] = EGL_CONTEXT_RELEASE_BEHAVIOR_KHR;
|
||||
attribs[atti++] = EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR;
|
||||
}
|
||||
|
||||
attribs[atti++] = EGL_NONE;
|
||||
assert(atti <= sizeof(attribs)/sizeof(attribs[0]));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue