intel: Don't do client-side frame throttling with DRI2 SwapBuffers.

The server side does the throttling on our behalf now by putting the
client to sleep, so we don't need our previous hacks for limiting the
number of outstanding frames.  Same effect as
7d4e674b21.
This commit is contained in:
Eric Anholt
2010-01-25 14:53:50 -08:00
parent c7fc9bfb22
commit 7aed23c362
3 changed files with 7 additions and 1 deletions

View File

@@ -521,7 +521,8 @@ intel_glFlush(GLcontext *ctx)
* and getting our hands on that doesn't seem worth it, so we just us the
* first batch we emitted after the last swap.
*/
if (intel->first_post_swapbuffers_batch != NULL) {
if (!intel->using_dri2_swapbuffers &&
intel->first_post_swapbuffers_batch != NULL) {
drm_intel_bo_wait_rendering(intel->first_post_swapbuffers_batch);
drm_intel_bo_unreference(intel->first_post_swapbuffers_batch);
intel->first_post_swapbuffers_batch = NULL;

View File

@@ -186,6 +186,7 @@ struct intel_context
struct intel_batchbuffer *batch;
drm_intel_bo *first_post_swapbuffers_batch;
GLboolean no_batch_wrap;
GLboolean using_dri2_swapbuffers;
struct
{

View File

@@ -126,6 +126,10 @@ intelDRI2Flush(__DRIdrawable *drawable)
static void
intelDRI2FlushInvalidate(__DRIdrawable *drawable)
{
struct intel_context *intel = drawable->driContextPriv->driverPrivate;
intel->using_dri2_swapbuffers = GL_TRUE;
intelDRI2Flush(drawable);
drawable->validBuffers = GL_FALSE;
}