egl: inline fallback for swap_buffers_region
[mesa.git] / src / egl / drivers / dri2 / egl_dri2.c
index 60e0db3c7818c67583a49b70f516e0447eab0d72..0acd33961b5725dfb576f5acd3b6af3fabcd06bf 100644 (file)
@@ -2015,6 +2015,8 @@ dri2_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
    __DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf);
    EGLBoolean ret;
 
+   if (!dri2_dpy->vtbl->swap_buffers_region)
+      return EGL_FALSE;
    ret = dri2_dpy->vtbl->swap_buffers_region(drv, disp, surf, numRects, rects);
 
    /* SwapBuffers marks the end of the frame; reset the damage region for