From: Emil Velikov <[email protected]> As the spec says, the function is a no-op when the surface is not a window one.
That spec implies that EGL_TRUE should be returned in that case, yet the ARM driver seems to return EGL_FALSE + EGL_BAD_SURFACE. The Nvidia driver returns EGL_TRUE. We follow that behaviour until a decision is made. https://gitlab.khronos.org/egl/API/merge_requests/17 Cc: samiuddi <[email protected]> Cc: Eric Engestrom <[email protected]> Cc: Erik Faye-Lund <[email protected]> Cc: Tomasz Figa <[email protected]> Cc: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> --- Since this is a high-level API decision I've moved it to eglapi.c This will allow us to avoid duplicating the check across each platform codebase ... or more crashes because we forgot to update one. --- src/egl/main/eglapi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index c8c6a50f6ad..0af31a3f774 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1222,6 +1222,9 @@ eglSwapInterval(EGLDisplay dpy, EGLint interval) if (_eglGetSurfaceHandle(surf) == EGL_NO_SURFACE) RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE); + if (surf->Type != EGL_WINDOW_BIT) + RETURN_EGL_EVAL(disp, EGL_TRUE); + interval = CLAMP(interval, surf->Config->MinSwapInterval, surf->Config->MaxSwapInterval); -- 2.18.0 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
