summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_screen.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-05-18 21:50:44 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-05-20 11:39:28 -0400
commite67c338b415c983bee570e6644b9684d8d1fc99b (patch)
tree68308eb16fee06bd0a3afeaaaa6fbd6c546372a8 /src/mesa/drivers/dri/intel/intel_screen.c
parentf4905256859794d0ccc67e6a56f1ca4831c0d5de (diff)
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.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_screen.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 3aed253e24..15a465c640 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -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 *