summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/i915
diff options
context:
space:
mode:
authorSt├ęphane Marchesin <marcheu@chromium.org>2011-07-06 02:19:48 -0700
committerSt├ęphane Marchesin <marcheu@chromium.org>2011-07-06 02:49:58 -0700
commite53b41f2632af26c79c4f7ed5b0fdb86a1feb602 (patch)
tree9499ab923e29bae2908ccf4a37bb88376cfae7e9 /src/gallium/winsys/i915
parent2bc5e0e97ba7b6c32f6ff90cb90448173d74b89b (diff)
i915g: Improve flushing using heuristics.
Diffstat (limited to 'src/gallium/winsys/i915')
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_buffer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/winsys/i915/drm/i915_drm_buffer.c b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
index 01dd4bf062f..89d8e89e6a7 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_buffer.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
@@ -213,6 +213,15 @@ i915_drm_buffer_destroy(struct i915_winsys *iws,
FREE(buffer);
}
+static boolean
+i915_drm_buffer_is_busy(struct i915_winsys *iws,
+ struct i915_winsys_buffer *buffer)
+{
+ struct i915_drm_buffer* i915_buffer = i915_drm_buffer(buffer);
+ return drm_intel_bo_busy(i915_buffer->bo);
+}
+
+
void
i915_drm_winsys_init_buffer_functions(struct i915_drm_winsys *idws)
{
@@ -224,4 +233,5 @@ i915_drm_winsys_init_buffer_functions(struct i915_drm_winsys *idws)
idws->base.buffer_unmap = i915_drm_buffer_unmap;
idws->base.buffer_write = i915_drm_buffer_write;
idws->base.buffer_destroy = i915_drm_buffer_destroy;
+ idws->base.buffer_is_busy = i915_drm_buffer_is_busy;
}