summaryrefslogtreecommitdiff
path: root/src/intel_dri.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-07-30 09:39:58 -0400
committerOwain G. Ainsworth <oga@openbsd.org>2010-09-12 03:15:35 +0100
commit8ccf94a680cfff6257e66d3425a5ebd6fb4cb3c5 (patch)
treebb5f2d3ee6c90a2b2b29306f0c428988da70fc00 /src/intel_dri.c
parent171561be017d3d68b5a8258d95531265ec2af093 (diff)
Remove explicit batchbuffer submit in DRI2 copyregion
Now that we submit from the flush callback chain, we know we'll always submit before the client receives the reply or event that blocks it from rendering the next frame. (cherry picked from commit 0be3e95c844247746742805830860ace9f546d99) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'src/intel_dri.c')
-rw-r--r--src/intel_dri.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c
index d2a8cd03..6102c94b 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -396,22 +396,22 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
}
}
+ /* It's important that this copy gets submitted before the
+ * direct rendering client submits rendering for the next
+ * frame, but we don't actually need to submit right now. The
+ * client will wait for the DRI2CopyRegion reply or the swap
+ * buffer event before rendering, and we'll hit the flush
+ * callback chain before those messages are sent. We submit
+ * our batch buffers from the flush callback chain so we know
+ * that will happen before the client tries to render
+ * again. */
+
(*gc->ops->CopyArea) (src, dst,
gc,
0, 0,
drawable->width, drawable->height,
0, 0);
FreeScratchGC(gc);
-
- /* Emit a flush of the rendering cache, or on the 965 and beyond
- * rendering results may not hit the framebuffer until significantly
- * later.
- *
- * We can't rely on getting into the block handler before the DRI
- * client gets to run again so flush now.
- */
- intel_batch_submit(scrn, TRUE);
- drmCommandNone(intel->drmSubFD, DRM_I915_GEM_THROTTLE);
}
#if DRI2INFOREC_VERSION >= 4