intel: Throttle after doing copyregion/swapbuffers round trip

Before we would throttle in the flush callback prior to round-tripping
to the server to do copyregion or swapbuffer.  Now, instead just note
that we need to throttle and do it in intel_prepare_render(), which
will be called after receiving the response from the server but before
we start rendering the next frame.  Even if the server also throttles
us in swapbuffer, this just makes the throttling a no-op when we hit
intel_prepare_render().  With that we can drop the
using_dri2_swapbuffers hack and just always throttle.
This commit is contained in:
Kristian Høgsberg
2010-05-18 21:50:44 -04:00
parent f490525685
commit e67c338b41
4 changed files with 29 additions and 35 deletions

View File

@@ -110,23 +110,16 @@ intelDRI2Flush(__DRIdrawable *drawable)
if (intel->gen < 4)
INTEL_FIREVERTICES(intel);
intel->need_throttle = GL_TRUE;
if (intel->batch->map != intel->batch->ptr)
intel_batchbuffer_flush(intel->batch);
}
static void
intelDRI2Invalidate(__DRIdrawable *drawable)
{
struct intel_context *intel = drawable->driContextPriv->driverPrivate;
intel->using_dri2_swapbuffers = GL_TRUE;
dri2InvalidateDrawable(drawable);
}
static const struct __DRI2flushExtensionRec intelFlushExtension = {
{ __DRI2_FLUSH, __DRI2_FLUSH_VERSION },
intelDRI2Flush,
intelDRI2Invalidate,
dri2InvalidateDrawable,
};
static __DRIimage *