egl: set EGL_BAD_NATIVE_PIXMAP in the copy_buffers fallback
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 27 Jun 2018 19:07:20 +0000 (20:07 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 7 Aug 2018 16:59:24 +0000 (17:59 +0100)
As the spec says:

  EGL_BAD_NATIVE_PIXMAP is generated if the implementation
  does not support native pixmaps.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/egl/drivers/dri2/egl_dri2_fallbacks.h

index a664677572e3691503b0c3e8d9f8bf25b1b135e4..1482f17d4762a66a1e10d848a7cd1048a5dea932 100644 (file)
@@ -25,6 +25,7 @@
 #ifndef EGL_DRI2_FALLBACKS_INCLUDED
 #define EGL_DRI2_FALLBACKS_INCLUDED
 
+#include "eglcurrent.h"
 #include "egltypedefs.h"
 
 struct wl_buffer;
@@ -86,7 +87,7 @@ dri2_fallback_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy,
                            _EGLSurface *surf,
                            void *native_pixmap_target)
 {
-   return EGL_FALSE;
+   return _eglError(EGL_BAD_NATIVE_PIXMAP, "no support for native pixmaps");
 }
 
 static inline EGLBoolean