mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
egl_dri2: set correct error code if swapbuffers fails
A return value of '-1' means that there was error during swap with a
window drawable, in this case we set error as EGL_BAD_NATIVE_WINDOW.
v2: coding style cleanup, better commit message
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit e6f1a44d14)
This commit is contained in:
parent
4687027197
commit
5c9e9e1f00
1 changed files with 6 additions and 1 deletions
|
|
@ -872,7 +872,12 @@ 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;
|
||||
} else {
|
||||
assert(dri2_dpy->swrast);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue