summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-07-30 09:39:58 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-07-30 09:39:58 -0400
commit0be3e95c844247746742805830860ace9f546d99 (patch)
tree6b8d4c9d5c8bc4f6e966ff4800b0e85f14a5e679
parent69d65f9184006eac790efcff78a0e425160e95aa (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.
-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 d5dc30fe..9b6ccb37 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -383,22 +383,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