Eventually I found this after a lot of googling:
http://lists.freedesktop.org/archives/mesa-commit/2010-May/021020.html
egl: Implement EGL_NOK_swap_region
This extension adds a new function which provides an alternative to
eglSwapBuffers. eglSwapBuffersRegionNOK accepts two new parameters in
addition to those in eglSwapBuffers. The new parameters consist of a
pointer to a list of 4-integer blocks defining rectangles (x, y,
width, height) and an integer specifying the number of rectangles in
the list.
And /usr/include/EGL/eglmesaext.h declares
EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects);
There's also some example usage here:
https://github.com/blazt/piglit/blob/master/tests/egl/egl-nok-swap-region.c
So I tried using it like this:
EGLint dirtyRect[4] = { 0, 0, 0, 0 };
PFNEGLSWAPBUFFERSREGIONNOK swap_buffers_region = (PFNEGLSWAPBUFFERSREGIONNOK)
eglGetProcAddress("eglSwapBuffersRegionNOK");
and in my window resizing callback
dirtyRect[2] = windowWidth;
dirtyRect[3] = windowHeight;
and in my main loop
if (swap_buffers_region)
swap_buffers_region(egl_dpy, egl_surf, 1, dirtyRect);
else
eglSwapBuffers(egl_dpy, egl_surf);
It does seem smoother and slowed down the frame rate, but only down to the range of 180-200 FPS; so I still need to do a usleep between frames. Maybe it only blocks swapping buffers during some short interval of critical GPU operations? Or maybe I'm not doing it right. Not sure.