On 02/12/2016 02:13 AM, Emil Velikov wrote:
On 11 February 2016 at 12:03, Tapani Pälli <[email protected]> wrote:
From: Daniel Czarnowski <[email protected]>
Signed-off-by: Matt Roper <[email protected]>
Cc: "11.0 11.1" <[email protected]
---
src/egl/drivers/dri2/platform_x11.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/egl/drivers/dri2/platform_x11.c
b/src/egl/drivers/dri2/platform_x11.c
index 931ee51..7a26c38 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -872,7 +872,11 @@ dri2_x11_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *draw)
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
if (dri2_dpy->dri2) {
- return dri2_x11_swap_buffers_msc(drv, disp, draw, 0, 0, 0) != -1;
+ if (dri2_x11_swap_buffers_msc(drv, disp, draw, 0, 0, 0) != -1)
+ return EGL_TRUE;
+ /* Swap failed with a window drawable. */
+ _eglError(EGL_BAD_NATIVE_WINDOW, __FUNCTION__);
+ return EGL_FALSE;
Looking at the implementation of dri2_x11_swap_buffers_msc() and I'm
wondering if failing xcb_dri2_swap_buffers_reply() really means
"failed with window drawable". Can you please elaborate a bit and
stick it in the commit message ?
I can add here something like "A return value of '-1' means that there
was error during swap with a window drawable"? It's maybe not obvious as
dri2_x11_swap_buffers_msc is undocumented but it can be seen by
inspecting the function.
// Tapani
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev