summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBen Widawsky <[email protected]>2013-05-07 22:42:39 -0700
committerKenneth Graunke <[email protected]>2013-05-09 16:41:44 -0700
commitfc98c471150fe7161e57535a125c9d816b891f05 (patch)
tree319122a9b5003be6f2afe0c17f856fa449c5664d /src
parentf1d2b373177dbbb582cefb0d6c88994073fab652 (diff)
i965: Actually use the user timeout in glClientWaitSync.
Use the new libdrm functionality to actually do timed waits on the sync object. Signed-off-by: Ben Widawsky <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_syncobj.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_syncobj.c b/src/mesa/drivers/dri/intel/intel_syncobj.c
index e965896df60..9657d9af959 100644
--- a/src/mesa/drivers/dri/intel/intel_syncobj.c
+++ b/src/mesa/drivers/dri/intel/intel_syncobj.c
@@ -80,20 +80,12 @@ intel_fence_sync(struct gl_context *ctx, struct gl_sync_object *s,
intel_flush(ctx);
}
-/* We ignore the user-supplied timeout. This is weaselly -- we're allowed to
- * round to an implementation-dependent accuracy, and right now our
- * implementation "rounds" to the wait-forever value.
- *
- * The fix would be a new kernel function to do the GTT transition with a
- * timeout.
- */
static void intel_client_wait_sync(struct gl_context *ctx, struct gl_sync_object *s,
GLbitfield flags, GLuint64 timeout)
{
struct intel_sync_object *sync = (struct intel_sync_object *)s;
- if (sync->bo) {
- drm_intel_bo_wait_rendering(sync->bo);
+ if (sync->bo && drm_intel_gem_bo_wait(sync->bo, timeout) == 0) {
s->StatusFlag = 1;
drm_intel_bo_unreference(sync->bo);
sync->bo = NULL;