So that they don't have the driver-specific param and return type.
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++) {
}
-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)) {
}
}
#endif
+ return TRUE;
}
unsigned flags);
-extern void
+extern boolean
cell_fence_finish(const struct cell_context *cell,
const struct cell_fence *fence,
unsigned flags,
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);
return screen->fence_finish(screen,
fence,
- flags,
timeout);
}
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;
}
{
}
-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;
}
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);
return screen->fence_finish(screen,
fence,
- flags,
timeout);
}
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);
}
}
/**
* 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);
/**
* 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;
}
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));
}
(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;
/* 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)
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);
return screen->fence_finish(screen,
fence,
- flags,
timeout);
}
}
-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;
}
* 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);
}
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);
}
}
-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;
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;
}
}
-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;
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();
}
-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);
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();
/**
* Checks whether the fence has been signalled.
- * \param flags driver-specific meaning
- * \return zero on success.
*/
- int (*fence_signalled)( struct pipe_screen *screen,
- struct pipe_fence_handle *fence,
- unsigned flags );
+ boolean (*fence_signalled)( struct pipe_screen *screen,
+ struct pipe_fence_handle *fence );
/**
* Wait for the fence to finish.
- * \param flags driver-specific meaning
* \param timeout in nanoseconds
- * \return zero on success.
*/
- int (*fence_finish)( struct pipe_screen *screen,
- struct pipe_fence_handle *fence,
- unsigned flags,
- uint64_t timeout );
+ boolean (*fence_finish)( struct pipe_screen *screen,
+ struct pipe_fence_handle *fence,
+ uint64_t timeout );
};
gctx->stctxi->flush(gctx->stctxi,
PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
if (fence) {
- screen->fence_finish(screen, fence, 0, PIPE_TIMEOUT_INFINITE);
+ screen->fence_finish(screen, fence, PIPE_TIMEOUT_INFINITE);
screen->fence_reference(screen, &fence, NULL);
}
_eglUnlockMutex(&dpy->Mutex);
/* no timed finish? */
- screen->fence_finish(screen, fence, 0x0, PIPE_TIMEOUT_INFINITE);
+ screen->fence_finish(screen, fence, PIPE_TIMEOUT_INFINITE);
ret = EGL_CONDITION_SATISFIED_KHR;
_eglLockMutex(&dpy->Mutex);
struct pipe_fence_handle *fence = swap_fences_pop_front(rsurf);
if (fence) {
- (void) screen->fence_finish(screen, fence, 0, PIPE_TIMEOUT_INFINITE);
+ (void) screen->fence_finish(screen, fence, PIPE_TIMEOUT_INFINITE);
screen->fence_reference(screen, &fence, NULL);
return TRUE;
}
c->st->flush(c->st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
if (fence) {
- xmdpy->screen->fence_finish(xmdpy->screen, fence, 0,
+ xmdpy->screen->fence_finish(xmdpy->screen, fence,
PIPE_TIMEOUT_INFINITE);
xmdpy->screen->fence_reference(xmdpy->screen, &fence, NULL);
}
pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
if (fence) {
- 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);
}
if (extents->x1 == 0 && extents->y1 == 0 &&
extents->x2 == pDraw->width && extents->y2 == pDraw->height) {
- ms->screen->fence_finish(ms->screen, dst_priv->fence, 0,
+ ms->screen->fence_finish(ms->screen, dst_priv->fence,
PIPE_TIMEOUT_INFINITE);
ms->screen->fence_reference(ms->screen, &dst_priv->fence, NULL);
}
for (i = 0; i < XORG_NR_FENCES; i++) {
if (ms->fence[i]) {
- ms->screen->fence_finish(ms->screen, ms->fence[i], 0,
+ ms->screen->fence_finish(ms->screen, ms->fence[i],
PIPE_TIMEOUT_INFINITE);
ms->screen->fence_reference(ms->screen, &ms->fence[i], NULL);
}
if (ms->dirtyThrottling) {
if (ms->fence[0])
ms->ctx->screen->fence_finish(ms->ctx->screen,
- ms->fence[0], 0,
+ ms->fence[0],
PIPE_TIMEOUT_INFINITE);
/* The amount of rendering generated by a block handler can be
xorg_exa_flush(exa, PIPE_FLUSH_RENDER_CACHE, &fence);
- exa->pipe->screen->fence_finish(exa->pipe->screen, fence, 0,
+ exa->pipe->screen->fence_finish(exa->pipe->screen, fence,
PIPE_TIMEOUT_INFINITE);
exa->pipe->screen->fence_reference(exa->pipe->screen, &fence, NULL);
}
st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
if(fence) {
- st->pipe->screen->fence_finish(st->pipe->screen, fence, 0,
+ st->pipe->screen->fence_finish(st->pipe->screen, fence,
PIPE_TIMEOUT_INFINITE);
st->pipe->screen->fence_reference(st->pipe->screen, &fence, NULL);
}
struct pipe_screen *screen = st_context(ctx)->pipe->screen;
struct st_sync_object *so = (struct st_sync_object*)obj;
- if (so->fence && screen->fence_signalled(screen, so->fence, 0) == 0) {
+ if (so->fence && screen->fence_signalled(screen, so->fence)) {
screen->fence_reference(screen, &so->fence, NULL);
so->b.StatusFlag = GL_TRUE;
}
* already called when creating a fence. */
if (so->fence &&
- screen->fence_finish(screen, so->fence, 0, timeout) == 0) {
+ screen->fence_finish(screen, so->fence, timeout)) {
screen->fence_reference(screen, &so->fence, NULL);
so->b.StatusFlag = GL_TRUE;
}