diff options
author | Chia-I Wu <[email protected]> | 2014-07-25 10:53:05 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-07-26 12:30:39 +0800 |
commit | 4714c4ec48fcb17b8484cd1c44918fcedc3ce28e (patch) | |
tree | aa8f04a7b99001e33e1587cb3309115765e15299 /src/gallium/drivers/ilo/ilo_context.c | |
parent | 654fd3e33f71702aa487b5b5249847bee73d4823 (diff) |
ilo: simplify ilo_flush()
Move fence creation to the new ilo_fence_create().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_context.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_context.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/src/gallium/drivers/ilo/ilo_context.c b/src/gallium/drivers/ilo/ilo_context.c index 2de0ed7b04c..ab750acd24c 100644 --- a/src/gallium/drivers/ilo/ilo_context.c +++ b/src/gallium/drivers/ilo/ilo_context.c @@ -63,28 +63,13 @@ ilo_flush(struct pipe_context *pipe, { struct ilo_context *ilo = ilo_context(pipe); - if (f) { - struct ilo_fence *fence; - - fence = CALLOC_STRUCT(ilo_fence); - if (fence) { - pipe_reference_init(&fence->reference, 1); - - /* reference the batch bo that we want to wait on */ - if (ilo_cp_empty(ilo->cp)) - fence->bo = ilo->last_cp_bo; - else - fence->bo = ilo->cp->bo; - - if (fence->bo) - intel_bo_reference(fence->bo); - } - - *f = (struct pipe_fence_handle *) fence; - } - ilo_cp_flush(ilo->cp, (flags & PIPE_FLUSH_END_OF_FRAME) ? "frame end" : "user request"); + + if (f) { + *f = (struct pipe_fence_handle *) + ilo_fence_create(pipe->screen, ilo->last_cp_bo); + } } static void |