diff options
author | Erik Kurzinger <ekurzinger@nvidia.com> | 2022-08-12 08:22:26 -0700 |
---|---|---|
committer | Erik Kurzinger <ekurzinger@nvidia.com> | 2022-08-12 08:22:26 -0700 |
commit | 8f1ca8204a4ca7fba132b9656717f1a30bff6798 (patch) | |
tree | 99393c838d7bc4c69548bda262f7ed0bab6c8c1b /clients | |
parent | 646cc1b389cc70e742d5cebef3a3b94e9b0a0c9f (diff) | |
download | weston-8f1ca8204a4ca7fba132b9656717f1a30bff6798.tar.gz |
clients/simple-egl: call eglSwapInterval after eglMakeCurrent
If weston-simple-egl is run with the "-b" flag, it will attempt to set
the swap interval to 0 during create_surface. However, at that point, it
will not have made its EGLContext current yet, causing the
eglSwapInterval call to have no effect. To fix this, wait until the
EGLContext has been made current in init_gl before updating the swap
interval.
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Diffstat (limited to 'clients')
-rw-r--r-- | clients/simple-egl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clients/simple-egl.c b/clients/simple-egl.c index c530d8d5..c6fcc313 100644 --- a/clients/simple-egl.c +++ b/clients/simple-egl.c @@ -303,6 +303,9 @@ init_gl(struct window *window) window->egl_surface, window->display->egl.ctx); assert(ret == EGL_TRUE); + if (!window->frame_sync) + eglSwapInterval(window->display->egl.dpy, 0); + frag = create_shader(window, frag_shader_text, GL_FRAGMENT_SHADER); vert = create_shader(window, vert_shader_text, GL_VERTEX_SHADER); @@ -491,9 +494,6 @@ create_surface(struct window *window) window->wait_for_configure = true; wl_surface_commit(window->surface); - - if (!window->frame_sync) - eglSwapInterval(display->egl.dpy, 0); } static void |