summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Marchesin <marcheu@chromium.org>2012-01-18 19:24:18 -0800
committerIan Romanick <ian.d.romanick@intel.com>2012-07-06 10:08:56 -0700
commitc60a83adc246588230854256023d31c43e7e1dde (patch)
tree9549c4ec606f389671120bedc0f58704da11f3d1
parentdb555c5d59173f01aa75b7a91630f2eced834a1f (diff)
downloadmesa-c60a83adc246588230854256023d31c43e7e1dde.tar.gz
i915g: Don't avoid flushing when we have a pending fence.
Otherwise the fence will never arrive. Also check for a NULL i915->batch. NOTE: This is a candidate for the 8.0 branch. (cherry picked from commit 32b07bb1496f5772ca16e719bb87e1702ceff196)
-rw-r--r--src/gallium/drivers/i915/i915_flush.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_flush.c b/src/gallium/drivers/i915/i915_flush.c
index 5d8e3c8274f..0a0ca7885da 100644
--- a/src/gallium/drivers/i915/i915_flush.c
+++ b/src/gallium/drivers/i915/i915_flush.c
@@ -45,7 +45,10 @@ static void i915_flush_pipe( struct pipe_context *pipe,
draw_flush(i915->draw);
- if (i915->batch->map == i915->batch->ptr) {
+ /* Only shortcut this if we have no fence, otherwise we must flush the
+ * empty batchbuffer to get our fence back.
+ */
+ if (!fence && i915->batch && (i915->batch->map == i915->batch->ptr)) {
return;
}