diff options
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/cell/ppu/cell_fence.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/cell/ppu/cell_fence.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/galahad/glhd_screen.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_screen.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_screen.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/identity/id_screen.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_flush.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_screen.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_screen.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.c | 20 | ||||
-rw-r--r-- | src/gallium/drivers/rbug/rbug_screen.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_fence.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_flush.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_screen.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_screen.c | 18 |
16 files changed, 64 insertions, 95 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_fence.c b/src/gallium/drivers/cell/ppu/cell_fence.c index 3014a8a7b84..181fef44f45 100644 --- a/src/gallium/drivers/cell/ppu/cell_fence.c +++ b/src/gallium/drivers/cell/ppu/cell_fence.c @@ -47,8 +47,7 @@ cell_fence_init(struct cell_fence *fence) boolean cell_fence_signalled(const struct cell_context *cell, - const struct cell_fence *fence, - unsigned flags) + const struct cell_fence *fence) { uint i; for (i = 0; i < cell->num_spus; i++) { @@ -60,10 +59,9 @@ cell_fence_signalled(const struct cell_context *cell, } -void +boolean cell_fence_finish(const struct cell_context *cell, const struct cell_fence *fence, - unsigned flags, uint64_t timeout) { while (!cell_fence_signalled(cell, fence)) { @@ -78,6 +76,7 @@ cell_fence_finish(const struct cell_context *cell, } } #endif + return TRUE; } diff --git a/src/gallium/drivers/cell/ppu/cell_fence.h b/src/gallium/drivers/cell/ppu/cell_fence.h index 3ef6cf7bbca..3568230b1c0 100644 --- a/src/gallium/drivers/cell/ppu/cell_fence.h +++ b/src/gallium/drivers/cell/ppu/cell_fence.h @@ -40,7 +40,7 @@ cell_fence_signalled(const struct cell_context *cell, unsigned flags); -extern void +extern boolean cell_fence_finish(const struct cell_context *cell, const struct cell_fence *fence, unsigned flags, diff --git a/src/gallium/drivers/galahad/glhd_screen.c b/src/gallium/drivers/galahad/glhd_screen.c index fbe19bf324b..06b6b34b74b 100644 --- a/src/gallium/drivers/galahad/glhd_screen.c +++ b/src/gallium/drivers/galahad/glhd_screen.c @@ -276,23 +276,20 @@ galahad_screen_fence_reference(struct pipe_screen *_screen, fence); } -static int +static boolean galahad_screen_fence_signalled(struct pipe_screen *_screen, - struct pipe_fence_handle *fence, - unsigned flags) + struct pipe_fence_handle *fence) { struct galahad_screen *glhd_screen = galahad_screen(_screen); struct pipe_screen *screen = glhd_screen->screen; return screen->fence_signalled(screen, - fence, - flags); + fence); } -static int +static boolean galahad_screen_fence_finish(struct pipe_screen *_screen, struct pipe_fence_handle *fence, - unsigned flags, uint64_t timeout) { struct galahad_screen *glhd_screen = galahad_screen(_screen); @@ -300,7 +297,6 @@ galahad_screen_fence_finish(struct pipe_screen *_screen, return screen->fence_finish(screen, fence, - flags, timeout); } diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index dd679f95200..031c9680d2c 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -318,25 +318,23 @@ i915_fence_reference(struct pipe_screen *screen, is->iws->fence_reference(is->iws, ptr, fence); } -static int +static boolean i915_fence_signalled(struct pipe_screen *screen, - struct pipe_fence_handle *fence, - unsigned flags) + struct pipe_fence_handle *fence) { struct i915_screen *is = i915_screen(screen); - return is->iws->fence_signalled(is->iws, fence); + return is->iws->fence_signalled(is->iws, fence) == 0; } -static int +static boolean i915_fence_finish(struct pipe_screen *screen, struct pipe_fence_handle *fence, - unsigned flags, uint64_t timeout) { struct i915_screen *is = i915_screen(screen); - return is->iws->fence_finish(is->iws, fence); + return is->iws->fence_finish(is->iws, fence) == 0; } diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c index 367581a6b41..b3b88c799d9 100644 --- a/src/gallium/drivers/i965/brw_screen.c +++ b/src/gallium/drivers/i965/brw_screen.c @@ -365,21 +365,19 @@ brw_fence_reference(struct pipe_screen *screen, { } -static int +static boolean brw_fence_signalled(struct pipe_screen *screen, - struct pipe_fence_handle *fence, - unsigned flags) + struct pipe_fence_handle *fence) { - return 0; /* XXX shouldn't this be a boolean? */ + return TRUE; } -static int +static boolean brw_fence_finish(struct pipe_screen *screen, struct pipe_fence_handle *fence, - unsigned flags, uint64_t timeout) { - return 0; + return TRUE; } diff --git a/src/gallium/drivers/identity/id_screen.c b/src/gallium/drivers/identity/id_screen.c index b289c1e5d17..56e8ac014cf 100644 --- a/src/gallium/drivers/identity/id_screen.c +++ b/src/gallium/drivers/identity/id_screen.c @@ -242,23 +242,20 @@ identity_screen_fence_reference(struct pipe_screen *_screen, fence); } -static int +static boolean identity_screen_fence_signalled(struct pipe_screen *_screen, - struct pipe_fence_handle *fence, - unsigned flags) + struct pipe_fence_handle *fence) { struct identity_screen *id_screen = identity_screen(_screen); struct pipe_screen *screen = id_screen->screen; return screen->fence_signalled(screen, - fence, - flags); + fence); } -static int +static boolean identity_screen_fence_finish(struct pipe_screen *_screen, struct pipe_fence_handle *fence, - unsigned flags, uint64_t timeout) { struct identity_screen *id_screen = identity_screen(_screen); @@ -266,7 +263,6 @@ identity_screen_fence_finish(struct pipe_screen *_screen, return screen->fence_finish(screen, fence, - flags, timeout); } diff --git a/src/gallium/drivers/llvmpipe/lp_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c index 343c6145e7e..2a3ba904fe4 100644 --- a/src/gallium/drivers/llvmpipe/lp_flush.c +++ b/src/gallium/drivers/llvmpipe/lp_flush.c @@ -92,7 +92,7 @@ llvmpipe_finish( struct pipe_context *pipe, struct pipe_fence_handle *fence = NULL; llvmpipe_flush(pipe, 0, &fence, reason); if (fence) { - pipe->screen->fence_finish(pipe->screen, fence, 0, PIPE_TIMEOUT_INFINITE); + pipe->screen->fence_finish(pipe->screen, fence, PIPE_TIMEOUT_INFINITE); pipe->screen->fence_reference(pipe->screen, &fence, NULL); } } diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index c600144a2da..446037c660a 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -349,10 +349,9 @@ llvmpipe_fence_reference(struct pipe_screen *screen, /** * Has the fence been executed/finished? */ -static int +static boolean llvmpipe_fence_signalled(struct pipe_screen *screen, - struct pipe_fence_handle *fence, - unsigned flag) + struct pipe_fence_handle *fence) { struct lp_fence *f = (struct lp_fence *) fence; return lp_fence_signalled(f); @@ -362,16 +361,15 @@ llvmpipe_fence_signalled(struct pipe_screen *screen, /** * Wait for the fence to finish. */ -static int +static boolean llvmpipe_fence_finish(struct pipe_screen *screen, struct pipe_fence_handle *fence_handle, - unsigned flag, uint64_t timeout) { struct lp_fence *f = (struct lp_fence *) fence_handle; lp_fence_wait(f); - return 0; + return TRUE; } diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index d6c2a0a199a..4cd82a51c14 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -154,21 +154,19 @@ nouveau_screen_fence_ref(struct pipe_screen *pscreen, nouveau_fence_ref(nouveau_fence(pfence), (struct nouveau_fence **)ptr); } -static int +static boolean nouveau_screen_fence_signalled(struct pipe_screen *screen, - struct pipe_fence_handle *pfence, - unsigned flags) + struct pipe_fence_handle *pfence) { - return !nouveau_fence_signalled(nouveau_fence(pfence)); + return nouveau_fence_signalled(nouveau_fence(pfence)); } -static int +static boolean nouveau_screen_fence_finish(struct pipe_screen *screen, struct pipe_fence_handle *pfence, - unsigned flags, uint64_t timeout) { - return !nouveau_fence_wait(nouveau_fence(pfence)); + return nouveau_fence_wait(nouveau_fence(pfence)); } diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index a929a2e282b..37ca2295d0a 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -423,20 +423,18 @@ static void r300_fence_reference(struct pipe_screen *screen, (struct r300_winsys_bo*)fence); } -static int r300_fence_signalled(struct pipe_screen *screen, - struct pipe_fence_handle *fence, - unsigned flags) +static boolean r300_fence_signalled(struct pipe_screen *screen, + struct pipe_fence_handle *fence) { struct r300_winsys_screen *rws = r300_screen(screen)->rws; struct r300_winsys_bo *rfence = (struct r300_winsys_bo*)fence; - return !rws->buffer_is_busy(rfence) ? 0 : 1; /* 0 == success */ + return !rws->buffer_is_busy(rfence); } -static int r300_fence_finish(struct pipe_screen *screen, - struct pipe_fence_handle *fence, - unsigned flags, - uint64_t timeout) +static boolean r300_fence_finish(struct pipe_screen *screen, + struct pipe_fence_handle *fence, + uint64_t timeout) { struct r300_winsys_screen *rws = r300_screen(screen)->rws; struct r300_winsys_bo *rfence = (struct r300_winsys_bo*)fence; @@ -450,15 +448,15 @@ static int r300_fence_finish(struct pipe_screen *screen, /* Wait in a loop. */ while (rws->buffer_is_busy(rfence)) { if (os_time_get() - start_time >= timeout) { - return 1; + return FALSE; } os_time_sleep(10); } - return 0; + return TRUE; } rws->buffer_wait(rfence); - return 0; /* 0 == success */ + return TRUE; } struct pipe_screen* r300_screen_create(struct r300_winsys_screen *rws) diff --git a/src/gallium/drivers/rbug/rbug_screen.c b/src/gallium/drivers/rbug/rbug_screen.c index d8d23bcb9c5..4f8b1003dfc 100644 --- a/src/gallium/drivers/rbug/rbug_screen.c +++ b/src/gallium/drivers/rbug/rbug_screen.c @@ -240,23 +240,20 @@ rbug_screen_fence_reference(struct pipe_screen *_screen, fence); } -static int +static boolean rbug_screen_fence_signalled(struct pipe_screen *_screen, - struct pipe_fence_handle *fence, - unsigned flags) + struct pipe_fence_handle *fence) { struct rbug_screen *rb_screen = rbug_screen(_screen); struct pipe_screen *screen = rb_screen->screen; return screen->fence_signalled(screen, - fence, - flags); + fence); } -static int +static boolean rbug_screen_fence_finish(struct pipe_screen *_screen, struct pipe_fence_handle *fence, - unsigned flags, uint64_t timeout) { struct rbug_screen *rb_screen = rbug_screen(_screen); @@ -264,7 +261,6 @@ rbug_screen_fence_finish(struct pipe_screen *_screen, return screen->fence_finish(screen, fence, - flags, timeout); } diff --git a/src/gallium/drivers/softpipe/sp_fence.c b/src/gallium/drivers/softpipe/sp_fence.c index 40d0b5970ef..7b79a0df4ea 100644 --- a/src/gallium/drivers/softpipe/sp_fence.c +++ b/src/gallium/drivers/softpipe/sp_fence.c @@ -41,24 +41,22 @@ softpipe_fence_reference(struct pipe_screen *screen, } -static int +static boolean softpipe_fence_signalled(struct pipe_screen *screen, - struct pipe_fence_handle *fence, - unsigned flags) + struct pipe_fence_handle *fence) { assert(!fence); - return 0; + return TRUE; } -static int +static boolean softpipe_fence_finish(struct pipe_screen *screen, struct pipe_fence_handle *fence, - unsigned flags, uint64_t timeout) { assert(!fence); - return 0; + return TRUE; } diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c index f16751a2163..edbce6a297a 100644 --- a/src/gallium/drivers/softpipe/sp_flush.c +++ b/src/gallium/drivers/softpipe/sp_flush.c @@ -162,7 +162,7 @@ softpipe_flush_resource(struct pipe_context *pipe, * This is for illustrative purposes only, as softpipe does not * have fences. */ - pipe->screen->fence_finish(pipe->screen, fence, 0, + pipe->screen->fence_finish(pipe->screen, fence, PIPE_TIMEOUT_INFINITE); pipe->screen->fence_reference(pipe->screen, &fence, NULL); } diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c index e64dc94b9d8..4782b4bf70e 100644 --- a/src/gallium/drivers/svga/svga_context.c +++ b/src/gallium/drivers/svga/svga_context.c @@ -241,7 +241,7 @@ void svga_context_flush( struct svga_context *svga, if (SVGA_DEBUG & DEBUG_SYNC) { if (fence) - svga->pipe.screen->fence_finish( svga->pipe.screen, fence, 0, + svga->pipe.screen->fence_finish( svga->pipe.screen, fence, PIPE_TIMEOUT_INFINITE); } diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 0dee8b1bec1..159758ed8bb 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -412,20 +412,18 @@ svga_fence_reference(struct pipe_screen *screen, } -static int +static boolean svga_fence_signalled(struct pipe_screen *screen, - struct pipe_fence_handle *fence, - unsigned flag) + struct pipe_fence_handle *fence) { struct svga_winsys_screen *sws = svga_screen(screen)->sws; - return sws->fence_signalled(sws, fence, flag); + return sws->fence_signalled(sws, fence, 0) == 0; } -static int +static boolean svga_fence_finish(struct pipe_screen *screen, struct pipe_fence_handle *fence, - unsigned flag, uint64_t timeout) { struct svga_winsys_screen *sws = svga_screen(screen)->sws; @@ -433,7 +431,7 @@ svga_fence_finish(struct pipe_screen *screen, SVGA_DBG(DEBUG_DMA|DEBUG_PERF, "%s fence_ptr %p\n", __FUNCTION__, fence); - return sws->fence_finish(sws, fence, flag); + return sws->fence_finish(sws, fence, 0) == 0; } diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c index 17f87cb906c..282a0dcef82 100644 --- a/src/gallium/drivers/trace/tr_screen.c +++ b/src/gallium/drivers/trace/tr_screen.c @@ -393,10 +393,9 @@ trace_screen_fence_reference(struct pipe_screen *_screen, } -static int +static boolean trace_screen_fence_signalled(struct pipe_screen *_screen, - struct pipe_fence_handle *fence, - unsigned flags) + struct pipe_fence_handle *fence) { struct trace_screen *tr_scr = trace_screen(_screen); struct pipe_screen *screen = tr_scr->screen; @@ -406,11 +405,10 @@ trace_screen_fence_signalled(struct pipe_screen *_screen, trace_dump_arg(ptr, screen); trace_dump_arg(ptr, fence); - trace_dump_arg(uint, flags); - result = screen->fence_signalled(screen, fence, flags); + result = screen->fence_signalled(screen, fence); - trace_dump_ret(int, result); + trace_dump_ret(bool, result); trace_dump_call_end(); @@ -418,10 +416,9 @@ trace_screen_fence_signalled(struct pipe_screen *_screen, } -static int +static boolean trace_screen_fence_finish(struct pipe_screen *_screen, struct pipe_fence_handle *fence, - unsigned flags, uint64_t timeout) { struct trace_screen *tr_scr = trace_screen(_screen); @@ -432,12 +429,11 @@ trace_screen_fence_finish(struct pipe_screen *_screen, trace_dump_arg(ptr, screen); trace_dump_arg(ptr, fence); - trace_dump_arg(uint, flags); trace_dump_arg(uint, timeout); - result = screen->fence_finish(screen, fence, flags, timeout); + result = screen->fence_finish(screen, fence, timeout); - trace_dump_ret(int, result); + trace_dump_ret(bool, result); trace_dump_call_end(); |