https://bugs.freedesktop.org/show_bug.cgi?id=28341
--- Comment #18 from Mario Kleiner mario.kleiner@tuebingen.mpg.de 2010-07-22 13:23:07 PDT --- Jerome,
as far as i can see, your flush, invalidate patch is in the right direction, but the dri2InvalidateDrawable() call just increments drawable->dri2.stamp and the current radeon dri driver in current mesa isn't checking the drawable->dri2.stamp for changes.
The intel driver has checks like...
if (drawable->lastStamp != drawable->dri2.stamp) intel_update_renderbuffers(driContext, drawable);
... in various places. Similar checks and calls to radeon_update_renderbuffers() would probably do the trick, because that would call DRI2GetBuffersWithFormat() etc. which will throttle properly until a swap is completed.